Left<L, R> class

A class that represents the left value in an Either instance.

This class is used to indicate that an instance of Either contains a left value of type L.

Instances of Left are created using the constructor and take a value of type L as a parameter.

Inheritance

Constructors

Left(L left)
Creates a new instance of Left with a value of type L.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
isLeft bool
A getter that returns a boolean indicating whether the instance of Either is a Left instance.
no setteroverride
isRight bool
A getter that returns a boolean indicating whether the instance of Either is a Right instance.
no setteroverride
left → L
The left value of type L.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fold<T>(T leftFn(L l), T rightFn(R r)) → T
A generic method that takes two functions, leftFn and rightFn, as parameters.
override
leftOrNull() → L?
Returns the value of the left property if the Either instance is a Left instance, otherwise returns null.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rightOrNull() → R?
Returns the value of the Right property if the Either instance is a Right instance, otherwise returns null.
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override