late_init 1.0.2
late_init: ^1.0.2 copied to clipboard
Execute code at a later stage, but before build has been called for the first time. Useful for initializations that depends on the context
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add late_initThis will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
late_init: ^1.0.2Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:late_init/late_init.dart';