invariant_future 1.0.3
invariant_future: ^1.0.3 copied to clipboard
An extension type `IFuture` adjusting the typing of `Future`. The type parameter is invariant, and some member signatures have more strict static typing than `Future`.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add invariant_futureWith Flutter:
$ flutter pub add invariant_futureThis will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
invariant_future: ^1.0.3Alternatively, 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:invariant_future/invariant_future_member.dart';
import 'package:invariant_future/invariant_future_union.dart';