


# CustomRoutine&lt;R, Data> constructor




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


const
CustomRoutine&lt;R, Data>({required [FutureOr](https://api.flutter.dev/flutter/dart-async/FutureOr-class.html)&lt;Result&lt;R, AppException>> routine(), required [FutureOr](https://api.flutter.dev/flutter/dart-async/FutureOr-class.html)&lt;Result&lt;Data?, AppException>> attachedLogic(Result&lt;R, AppException> routineResult), required void onError(AppException exception), required void onSuccess(R result, Data? data)})





## Implementation

```dart
const CustomRoutine({
  required this.routine,
  required this.attachedLogic,
  required this.onError,
  required this.onSuccess,
});
```







