You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lib/either.dart:7:39: Error: The constructor function type 'Left<dynamic, dynamic> Function(dynamic)' isn't a subtype of 'Either<L, R> Function(L)'.
- 'Left' is from 'package:sandbox/either.dart' ('lib/either.dart').
- 'Either' is from 'package:sandbox/either.dart' ('lib/either.dart').
const factory Either.left(L left) = Left;
^
lib/either.dart:8:41: Error: The constructor function type 'Right<dynamic, dynamic> Function(dynamic)' isn't a subtype of 'Either<L, R> Function(R)'.
- 'Right' is from 'package:sandbox/either.dart' ('lib/either.dart').
- 'Either' is from 'package:sandbox/either.dart' ('lib/either.dart').
const factory Either.right(R right) = Right;
^
Am I doing something wrong? Or should it be possible to create this? Thanks for any help.
The text was updated successfully, but these errors were encountered:
In Dartz package we have Either<L,R> type to represent either L type or R type.
I thought that this should mimic this behavior
and usage
However, I am getting the following error
Am I doing something wrong? Or should it be possible to create this? Thanks for any help.
The text was updated successfully, but these errors were encountered: