either_dart 1.0.0 either_dart: ^1.0.0 copied to clipboard
Error handler library for type-safe and easy work with errors on Dart and Flutter. Either is an alternative to Nullable value and Exceptions.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add either_dart
With Flutter:
$ flutter pub add either_dart
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
either_dart: ^1.0.0
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:either_dart/either.dart';