


# call method




    *[<Null safety>](https://dart.dev/null-safety)*




[FutureOr](https://api.flutter.dev/flutter/dart-async/FutureOr-class.html)&lt;void> call
()








## Implementation

```dart
FutureOr<void> call() async {
  final result = await routine.call();

  // Call custom logic
  final customRoutineResult = await attachedLogic.call(result);

  // Check for errors
  if (result.isErr) {
    onError.call(result.err!);

    return;
  }
  if (customRoutineResult.isErr) {
    onError.call(customRoutineResult.err!);

    return;
  }

  // If no error
  return onSuccess.call(result.ok as R, customRoutineResult.ok);
}
```







