resultk 1.0.0

Result.dart #

CI codecov

This project is an implement of Kotlin/Result.kt for dart.

Example #


final Result<String> result = runCatching(()=> xxxx);
if(result.isSucess) {
    // do if succeed
}
result.onSuccess((v) {
    // do if succeed
});
result.onFailure((e) {
  // do if failure
});

License #

see license file.

1.0.0 #

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  resultk: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:resultk/resultk.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
41
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
20
Learn more about scoring.

This package is not analyzed, because it is discontinued.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.0 <3.0.0