initialize method
void
initialize({
- required bool showCompletionView,
- required VoidCallback completion,
- VoidCallback? onCompleted,
- VoidCallback? onCancelled,
- dynamic onError()?,
- Branding? branding,
- required BuildContext context,
Implementation
void initialize({
required bool showCompletionView,
required VoidCallback completion,
VoidCallback? onCompleted,
VoidCallback? onCancelled,
Function(String)? onError,
Branding? branding,
required BuildContext context
}) {
_showCompletionView = showCompletionView;
_completion = completion;
_onCompletedCallback = onCompleted;
_onCancelledCallback = onCancelled;
_onErrorCallback = onError;
_context = context;
state = state.copyWith(
branding: branding,
);
final webSocketManager = _ref.read(webSocketManagerProvider.notifier);
webSocketManager.onPreflightResponse = handleApiNavigation;
}