result_library 1.0.0 copy "result_library: ^1.0.0" to clipboard
result_library: ^1.0.0 copied to clipboard

A robust Result type implementation for handling success and error states in Flutter and Dart applications.

example/main.dart

import 'package:result_library/result_library.dart';

void main() {
  // Success case
  var success = ResultBuilder.ok<int, String>(42);
  print(success.isOk()); // true
  print(success.unwrap()); // 42

  // Error case
  var failure = ResultBuilder.err<int, String>('Something went wrong');
  print(failure.isErr()); // true
  print(failure.unwrapErr()); // Something went wrong
}
0
likes
150
points
12
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A robust Result type implementation for handling success and error states in Flutter and Dart applications.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on result_library