-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from tyler-jewell/stable
add new example app
- Loading branch information
Showing
200 changed files
with
1,256 additions
and
7,389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Test Example App | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: 'test-example-app' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
cache: true | ||
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' | ||
- run: dart pub global activate melos | ||
- run: cd example && melos all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
{} | ||
{ | ||
"cSpell.words": [ | ||
"autofocus", | ||
"dartpad", | ||
"Kumar", | ||
"Pawan" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM dart:latest | ||
|
||
ARG FLUTTER_CHANNEL=stable | ||
|
||
ENV FLUTTER_GIT_URL=https://github.com/flutter/flutter.git | ||
ENV FLUTTER_HOME=/flutter | ||
ENV PATH="$PATH:$FLUTTER_HOME/bin" | ||
|
||
# Clone and configure Flutter | ||
RUN git clone $FLUTTER_GIT_URL $FLUTTER_HOME -b $FLUTTER_CHANNEL --depth 1 \ | ||
&& flutter config --enable-web | ||
|
||
# activate melos | ||
RUN dart pub global activate melos | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
CMD ["bash", "-c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,55 @@ | ||
# example | ||
# VelocityX Example Application | ||
|
||
A new Flutter project. | ||
Welcome to the VelocityX example application. This application is designed to showcase the capabilities of the VelocityX library, a minimalist Flutter framework that helps you build applications rapidly. It uses VelocityX for state management (VxState), UI extensions, and more. | ||
|
||
## Getting Started | ||
## Application Overview | ||
|
||
This project is a starting point for a Flutter application. | ||
The application is a simple user management system. It uses `VxState` for state management, which allows us to manage the state of our application in a predictable way. The UI is built using various VelocityX extensions, which provide a wide range of pre-styled widgets and utility functions for building responsive layouts. | ||
|
||
A few resources to get you started if this is your first Flutter project: | ||
## Running the Application | ||
|
||
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) | ||
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) | ||
This project uses Melos to manage scripts for building, testing, and analyzing the code. Here are some of the scripts you can run: | ||
|
||
- **Build**: To build the application, run the following command in your terminal: | ||
|
||
```sh | ||
melos run build | ||
``` | ||
|
||
- **Analyze**: To analyze the dart code: | ||
|
||
```sh | ||
melos analyze | ||
``` | ||
|
||
- **Format**: To format the code: | ||
|
||
```sh | ||
melos format | ||
``` | ||
|
||
- **Build**: To run flutter tests (including goldens test): | ||
|
||
```sh | ||
melos test | ||
``` | ||
|
||
- **Run all** To run all of these (think CI machine, [build, format, analyze, test]): | ||
|
||
```sh | ||
melos all | ||
``` | ||
|
||
## Application Structure | ||
|
||
The application is structured as follows: | ||
|
||
- lib/main.dart: This is the entry point of the application. | ||
- lib/data: This directory contains the data models and related code. For example, user.dart defines the User model. | ||
- lib/mutations: This directory contains the mutations, which are functions that encapsulate changes to the state of the application. For example, get_user.dart defines a function for fetching a user. | ||
- lib/pages: This directory contains the pages of the application. Each page is a separate widget. For example, home_page.dart defines the home page of the application. | ||
- lib/stores: This directory contains the stores, which manage the state of the application. | ||
- test: This directory contains the tests for the application. | ||
|
||
We hope you find this example application useful as a starting point for your own VelocityX projects. Happy coding! | ||
|
||
For help getting started with Flutter, view our | ||
[online documentation](https://flutter.dev/docs), which offers tutorials, | ||
samples, guidance on mobile development, and a full API reference. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
include: package:flutter_lints/flutter.yaml | ||
include: package:very_good_analysis/analysis_options.yaml | ||
|
||
linter: | ||
# In addition to the flutter_lints | ||
rules: | ||
- always_declare_return_types | ||
- avoid_void_async | ||
- cancel_subscriptions | ||
- close_sinks | ||
- directives_ordering | ||
- flutter_style_todos | ||
- package_api_docs | ||
- test_types_in_equals | ||
- throw_in_finally | ||
- unawaited_futures | ||
- unnecessary_statements | ||
- unsafe_html | ||
- use_super_parameters | ||
analyzer: | ||
exclude: | ||
- "**/*.g.dart" | ||
- "**/*.freezed.dart" | ||
- "**/*.gr.dart" | ||
- "**/*.icon.dart" | ||
- "**/*.part.dart" | ||
- "**/*.pbenum.dart" | ||
- "**/*.pb.dart" | ||
- "**/*.pbjson.dart" | ||
- "**/*.pbgrpc.dart" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.