tie_fp 0.0.6 copy "tie_fp: ^0.0.6" to clipboard
tie_fp: ^0.0.6 copied to clipboard

Functional Opinionated library for Flutter

example/tie_fp_example.dart

import 'package:tie_fp/tie_fp.dart';

import 'utils.dart';

void main() async {
  Result<int> result = await performOperation();

  if (result.isError()) {
    print('An error occurred: ${result.getError()} ${result.stackTrace()}');
  } else {
    int value = result.getValue();
    print('Operation successful! Result: $value');
  }

  // final v = test().toResult();
}

Result tryCatchExample<T>() =>
    Result.wrapFunction(() => performOperationThatMayThrowException());

List<int> test() => List.generate(1, (index) => index);

Object performOperationThatMayThrowException() => throw UnimplementedError();
0
likes
0
points
172
downloads

Publisher

verified publisherunacorbatanegra.dev

Weekly Downloads

Functional Opinionated library for Flutter

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on tie_fp