invoke<A extends OdinAction> static method

Future invoke<A extends OdinAction>({
  1. dynamic data,
})

Implementation

static Future<dynamic> invoke<A extends OdinAction>({dynamic data}) async {
  for (dynamic action in _actions.values) {
    if (action.runtimeType == A) {
      return await action.handle(data);
    }
  }

  return null;
}