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

This package brings a Kotlin-like Result<T> to Dart, using extension types for zero-cost wrapping.

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add inline_result

With Flutter:

 $ flutter pub add inline_result

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

dependencies:
  inline_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:inline_result/inline_result.dart';
4
likes
160
points
40
downloads

Publisher

unverified uploader

Weekly Downloads

This package brings a Kotlin-like Result<T> to Dart, using extension types for zero-cost wrapping.

Repository (GitHub)
View/report issues

Topics

#result #inline #either #errors

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

meta

More

Packages that depend on inline_result