runFunction method
Implementation
Future<dynamic> runFunction(
BuildContext context, SupabaseAction action, int loop) async {
if (action is SelectSupabaseAction) {
final request = getRequest(context.apisState, action);
if (getIt.isRegistered<UseCaseRegistry>()) {
if (_useCaseRegistry.doesUseCaseExist(request.id)) {
final res =
await _useCaseRegistry.callUseCase(request.id, request.toJson());
if (context.mounted) {
await _fold(
context: context,
res: res,
loop: loop,
action: action,
request: request,
);
}
return;
}
}
return await execute(
context,
request,
action,
loop,
);
}
return null;
}