chain abstract method
Returns a strongly-typed chained callback that calls through to the two provided callbacks, a
and b
, in order.
Useful for executing multiple callbacks where only a single callback is accepted.
Returns false
if one or more of the provided callbacks returns false
.
Gracefully handles when a
and/or b
are null, always returning a callable function.
Implementation
Function chain(covariant Function? a, covariant Function? b);