Last updated:
0 purchases
flutter prime
flutter_prime #
A library of useful, reusable, methods and extensions for Flutter. Includes prime, a library of useful, reusable, methods and extensions for Dart.
Installation #
To use this package, add flutter_prime as a dependency in your pubspec.yaml file.
dependencies:
flutter_prime: any
copied to clipboard
Import the library #
import 'package:flutter_prime/flutter_prime.dart';
copied to clipboard
Usage #
TODO: add info here
Check dependencies #
You can check for missing, under-promoted, over-promoted, and unused dependencies using the dependency_validator package.
dart run dependency_validator
copied to clipboard
You can upgrade dependencies with the following commands:
dart pub upgrade
dart pub outdated
dart pub upgrade --major-versions
copied to clipboard
The steps required will depend on details provided by those commands.
Linting #
If using VS Code, it should keep your Dart files nicely formatted automatically. If you're not using VS Code, you can ensure the code formatted correctly using the command:
dart format . -l 240
copied to clipboard
We also use yamllint to keep our .yaml files neat and correct. Run the following command to view any issues with our .yaml files:
yamllint .
copied to clipboard
Our rules configuration is in the .yamllint.yaml file. If you run yamllint from a folder that doesn't have the configuration in it (or a link to it), you can specify to use our config file by executing yamllint -c ../path/to/.yamllint.yaml.
Analysis #
VS Code will display hints inline when the dart analyzer detects an issue with the code. You can manually run the analyzer to view all of the issues at once with the command:
dart analyze .
copied to clipboard
You can then fix the issues manually, or in most cases, use a built-in quick fix to correct the issue. Use the following command to see the issues that can be fixed automatically:
dart fix --dry-run .
copied to clipboard
And then run this command to apply those fixes if they look ok to you:
dart fix --apply .
copied to clipboard
Notes #
Please send me suggestions/bug fixes.
gizmos.dev #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.