composeAsync function

Future Function(dynamic x) composeAsync(
  1. List<Function> fns
)

Implementation

Future Function(dynamic x) composeAsync(List<Function> fns) => (x) async {
      var _x = x;
      final _reversed = fns.reversed.toList();
      for (Function fn in _reversed) {
        _x = await fn(_x);
      }
      return _x;
    };