Skip to content

Function0Ops<T0>

extension Function0Ops<T0> on T0 Function()

Provides additional functions on functions with 0 parameters.

Methods

andThen() extension

T1 Function() andThen<T1>(T1 Function(T0) fn)

Composes this function with the provided function, this function being applied first.

Available on Function0<T0>, provided by the Function0Ops<T0> extension

Implementation
dart
Function0<T1> andThen<T1>(Function1<T0, T1> fn) => () => fn(this());