sword_result 0.1.0
sword_result: ^0.1.0 copied to clipboard
Result type and helpers for SwordStack.
SwordResult #
Result type and helpers for error handling in Dart and Flutter.
Usage #
import 'package:sword_result/sword_result.dart';
final Result<int, String> value = Result.ok(42);
final Result<int, String> parsed = Result.tryCatch(
() => int.parse('123'),
(error, stackTrace) => 'parse_failed',
);