eitherx 2.0.0 eitherx: ^2.0.0 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
}