eitherx 1.0.4 eitherx: ^1.0.4 copied to clipboard
Either provides a way to handle errors and exceptions in a more expressive and concise way
import 'package:eitherx/eitherx.dart';
void main() {
final myEither = right<String, int>(45);
final String result = myEither.fold(
(error) => 'Error: $error',
(value) => 'Value: $value',
);
print(result); // Output: Value: 45
}