Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/naveteam/flutter-boilerplate
https://github.com/naveteam/flutter-boilerplate
Last synced: about 14 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/naveteam/flutter-boilerplate
- Owner: naveteam
- Created: 2021-11-01T17:23:54.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-05T05:25:50.000Z (over 1 year ago)
- Last Synced: 2023-05-05T07:42:56.242Z (over 1 year ago)
- Language: Dart
- Size: 156 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# :rocket: Flutter Boilerplate
## :star: Packages already configured
- [Dio](https://pub.dev/packages/dio)
- [Shared Preferences](https://pub.dev/packages/shared_preferences)
- [Flutter Secure Storage](https://pub.dev/packages/flutter_secure_storage)
- [Provider](https://pub.dev/packages/provider)
- [Flutter DotEnv](https://pub.dev/packages/flutter_dotenv)
- [Equatable](https://pub.dev/packages/equatable)
- [Json Annotation](https://pub.dev/packages/json_annotation)## :fire: Starting a new project
```sh
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/naveteam/flutter-boilerplate/main/setup.sh)"
```## :wrench: Usage
1. Install all dependencies
```sh
$ flutter pub get
```2. Create .env file at the root with key:value pairs corresponding to `.env.example`
> It's a required step since we use code-generation tool to generate helper classes for environment variables.
3. Run code-generation tool
```sh
$ flutter pub run build_runner build
```4. Start coding :smile:
### :raised_hand: Wait a minute
1. You can check if there's an update available for all dependencies running `flutter pub outdated`. You also can update with `flutter pub upgrade` or `flutter pub upgrade --major-versions`. Check if it doesn't have any huge breakchange before upgrading with `--major-versions` argument.
2. It's possible to modify the application dart package name. You only have to edit the `name` property at `pubspec.yaml`, replace all imports with `package:flutter_boilerplate` to `package:[your-package-name]` and download all dependencies with `flutter pub get` again. **You must** follow the [dart guidelines](https://dart.dev/tools/pub/pubspec#name) for the package name or it will fail.
3. If you want to use a [State Management Library](https://flutter.dev/docs/development/data-and-backend/state-mgmt/options) alternative to `ChangeNotifier + Provider`, run `flutter pub remove provider`, install what you need with `flutter pub add [package_name]` and refactor all view models to match with the library of your choice.## :computer: Code Pattern
TBD