netglade_utils library

NetGlade Dart utils library used internally at netglade.

Classes

Error<S, E>
None<T>
Option<T>
Returns optionally given type T wrapped in Some.
Result<S, E>
Returns either Success S or Error E type.
Some<T>
Success<S, E>

Typedefs

Copy<T> = T? Function()?
Used to determine between using default parameter value and passing null.
ErrorCallback<T, S, E> = T Function(Error<S, E> value)
ErrorValueCallback<T, E> = T Function(E error)
NoneCallback<TResult> = TResult Function()
NullableErrorCallback<T, S, E> = T? Function(Error<S, E> value)
NullableNoneCallback<TResult> = TResult? Function()
NullableSomeCallback<TResult, T> = TResult? Function(Some<T> value)
NullableSuccessCallback<T, S, E> = T? Function(Success<S, E> value)
OnTakingTooLongCallback = void Function()
Selector<T, K> = K Function(T selectFrom)
SomeCallback<TResult, T> = TResult Function(Some<T> value)
SuccessCallback<T, S, E> = T Function(Success<S, E> value)
SuccessValueCallback<T, S> = T Function(S success)
ValueNoneCallback<TResult> = TResult Function()
ValueSomeCallback<TResult, T> = TResult Function(T some)