preconditions 0.7.1
preconditions: ^0.7.1 copied to clipboard
Pure Dart library for management of preconditions in Flutter apps. Has the user granted all permissions? Is the phone online? Is there enough free disk space?
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add preconditions
With Flutter:
$ flutter pub add preconditions
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
preconditions: ^0.7.1
Alternatively, your editor might support dart pub get
or flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:preconditions/preconditions.dart';