safe_result 2.0.0 copy "safe_result: ^2.0.0" to clipboard
safe_result: ^2.0.0 copied to clipboard

A Dart package providing a Result type for handling success and error cases in a type-safe way, with support for custom error types.

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add safe_result

With Flutter:

 $ flutter pub add safe_result

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  safe_result: ^2.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:safe_result/safe_result.dart';
3
likes
150
points
62
downloads

Publisher

verified publishernolann-dev.xyz

Weekly Downloads

A Dart package providing a Result type for handling success and error cases in a type-safe way, with support for custom error types.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on safe_result