Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hoc081098 committed Aug 23, 2022
1 parent bcbf41f commit 02d96c0
Showing 1 changed file with 48 additions and 47 deletions.
95 changes: 48 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ dependencies:
## Documentation & example
- Documentation: https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/dart_either-library.html
- Example: https://github.com/hoc081098/dart_either/tree/master/example/lib
- **Documentation**: https://pub.dev/documentation/dart_either/latest/dart_either/dart_either-library.html
- **Example**: https://github.com/hoc081098/dart_either/tree/master/example/lib
- **Flutter Example**: https://github.com/hoc081098/node-auth-flutter-BLoC-pattern-RxDart
## Either monad
Expand Down Expand Up @@ -137,18 +138,18 @@ final nullableValue = right.orNull(); // 10

</details>

## Use - [Documentation](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/dart_either-library.html)
## Use - [Documentation](https://pub.dev/documentation/dart_either/latest/dart_either/dart_either-library.html)

### 1. Creation

#### 1.1. Factory constructors

- [Either.left](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/Either.left.html)
- [Either.right](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/Either.right.html)
- [Either.binding](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/Either.binding.html)
- [Either.catchError](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/Either.catchError.html)
- [Left](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Left/Left.html)
- [Right](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Right-class.html)
- [Either.left](https://pub.dev/documentation/dart_either/latest/dart_either/Either/Either.left.html)
- [Either.right](https://pub.dev/documentation/dart_either/latest/dart_either/Either/Either.right.html)
- [Either.binding](https://pub.dev/documentation/dart_either/latest/dart_either/Either/Either.binding.html)
- [Either.catchError](https://pub.dev/documentation/dart_either/latest/dart_either/Either/Either.catchError.html)
- [Left](https://pub.dev/documentation/dart_either/latest/dart_either/Left/Left.html)
- [Right](https://pub.dev/documentation/dart_either/latest/dart_either/Right-class.html)

```dart
// Left('Left value')
Expand All @@ -173,14 +174,14 @@ Either.catchError(

#### 1.2. Static methods

- [Either.catchFutureError](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/catchFutureError.html)
- [Either.catchStreamError](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/catchStreamError.html)
- [Either.fromNullable](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/fromNullable.html)
- [Either.futureBinding](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/futureBinding.html)
- [Either.parSequenceN](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/parSequenceN.html)
- [Either.parTraverseN](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/parTraverseN.html)
- [Either.sequence](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/sequence.html)
- [Either.traverse](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/traverse.html)
- [Either.catchFutureError](https://pub.dev/documentation/dart_either/latest/dart_either/Either/catchFutureError.html)
- [Either.catchStreamError](https://pub.dev/documentation/dart_either/latest/dart_either/Either/catchStreamError.html)
- [Either.fromNullable](https://pub.dev/documentation/dart_either/latest/dart_either/Either/fromNullable.html)
- [Either.futureBinding](https://pub.dev/documentation/dart_either/latest/dart_either/Either/futureBinding.html)
- [Either.parSequenceN](https://pub.dev/documentation/dart_either/latest/dart_either/Either/parSequenceN.html)
- [Either.parTraverseN](https://pub.dev/documentation/dart_either/latest/dart_either/Either/parTraverseN.html)
- [Either.sequence](https://pub.dev/documentation/dart_either/latest/dart_either/Either/sequence.html)
- [Either.traverse](https://pub.dev/documentation/dart_either/latest/dart_either/Either/traverse.html)

```dart
import 'package:http/http.dart' as http;
Expand Down Expand Up @@ -270,10 +271,10 @@ Either<String, BuiltList<Uri>> urisEither = Either.traverse(
```

#### 1.3. Extension methods
- [Stream.toEitherStream](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/ToEitherStreamExtension/toEitherStream.html)
- [Future.toEitherFuture](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/ToEitherFutureExtension/toEitherFuture.html)
- [T.left](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/ToEitherObjectExtension/left.html)
- [T.right](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/ToEitherObjectExtension/right.html)
- [Stream.toEitherStream](https://pub.dev/documentation/dart_either/latest/dart_either/ToEitherStreamExtension/toEitherStream.html)
- [Future.toEitherFuture](https://pub.dev/documentation/dart_either/latest/dart_either/ToEitherFutureExtension/toEitherFuture.html)
- [T.left](https://pub.dev/documentation/dart_either/latest/dart_either/ToEitherObjectExtension/left.html)
- [T.right](https://pub.dev/documentation/dart_either/latest/dart_either/ToEitherObjectExtension/right.html)

```dart
/// Stream.toEitherStream
Expand Down Expand Up @@ -301,35 +302,35 @@ Either<String, int> right = 2.right<String>();

### 2. Operations

- [isLeft](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/isLeft.html)
- [isRight](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/isRight.html)
- [fold](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/fold.html)
- [foldLeft](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/foldLeft.html)
- [swap](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/swap.html)
- [tapLeft](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/tapLeft.html)
- [tap](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/tap.html)
- [map](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/map.html)
- [mapLeft](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/mapLeft.html)
- [flatMap](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/flatMap.html)
- [bimap](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/bimap.html)
- [exists](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/exists.html)
- [all](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/all.html)
- [getOrElse](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/getOrElse.html)
- [orNull](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/orNull.html)
- [getOrHandle](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/getOrHandle.html)
- [findOrNull](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/findOrNull.html)
- [when](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/when.html)
- [handleErrorWith](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/handleErrorWith.html)
- [handleError](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/handleError.html)
- [redeem](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/redeem.html)
- [redeemWith](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/Either/redeemWith.html)
- [toFuture](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/AsFutureEitherExtension/toFuture.html)
- [getOrThrow](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/GetOrThrowEitherExtension/getOrThrow.html)
- [isLeft](https://pub.dev/documentation/dart_either/latest/dart_either/Either/isLeft.html)
- [isRight](https://pub.dev/documentation/dart_either/latest/dart_either/Either/isRight.html)
- [fold](https://pub.dev/documentation/dart_either/latest/dart_either/Either/fold.html)
- [foldLeft](https://pub.dev/documentation/dart_either/latest/dart_either/Either/foldLeft.html)
- [swap](https://pub.dev/documentation/dart_either/latest/dart_either/Either/swap.html)
- [tapLeft](https://pub.dev/documentation/dart_either/latest/dart_either/Either/tapLeft.html)
- [tap](https://pub.dev/documentation/dart_either/latest/dart_either/Either/tap.html)
- [map](https://pub.dev/documentation/dart_either/latest/dart_either/Either/map.html)
- [mapLeft](https://pub.dev/documentation/dart_either/latest/dart_either/Either/mapLeft.html)
- [flatMap](https://pub.dev/documentation/dart_either/latest/dart_either/Either/flatMap.html)
- [bimap](https://pub.dev/documentation/dart_either/latest/dart_either/Either/bimap.html)
- [exists](https://pub.dev/documentation/dart_either/latest/dart_either/Either/exists.html)
- [all](https://pub.dev/documentation/dart_either/latest/dart_either/Either/all.html)
- [getOrElse](https://pub.dev/documentation/dart_either/latest/dart_either/Either/getOrElse.html)
- [orNull](https://pub.dev/documentation/dart_either/latest/dart_either/Either/orNull.html)
- [getOrHandle](https://pub.dev/documentation/dart_either/latest/dart_either/Either/getOrHandle.html)
- [findOrNull](https://pub.dev/documentation/dart_either/latest/dart_either/Either/findOrNull.html)
- [when](https://pub.dev/documentation/dart_either/latest/dart_either/Either/when.html)
- [handleErrorWith](https://pub.dev/documentation/dart_either/latest/dart_either/Either/handleErrorWith.html)
- [handleError](https://pub.dev/documentation/dart_either/latest/dart_either/Either/handleError.html)
- [redeem](https://pub.dev/documentation/dart_either/latest/dart_either/Either/redeem.html)
- [redeemWith](https://pub.dev/documentation/dart_either/latest/dart_either/Either/redeemWith.html)
- [toFuture](https://pub.dev/documentation/dart_either/latest/dart_either/AsFutureEitherExtension/toFuture.html)
- [getOrThrow](https://pub.dev/documentation/dart_either/latest/dart_either/GetOrThrowEitherExtension/getOrThrow.html)

### 3. Extensions on `Future<Either<L, R>>`.

- [thenFlatMapEither](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/AsyncFlatMapFutureExtension/thenFlatMapEither.html)
- [thenMapEither](https://pub.dev/documentation/dart_either/1.0.0-beta06/dart_either/AsyncMapFutureExtension/thenMapEither.html)
- [thenFlatMapEither](https://pub.dev/documentation/dart_either/latest/dart_either/AsyncFlatMapFutureExtension/thenFlatMapEither.html)
- [thenMapEither](https://pub.dev/documentation/dart_either/latest/dart_either/AsyncMapFutureExtension/thenMapEither.html)

```dart
Future<Either<AsyncError, dynamic>> httpGetAsEither(String uriString) {
Expand Down

0 comments on commit 02d96c0

Please sign in to comment.