OneTapBottomSheet constructor
- required Key key,
- required dynamic onAuth(
- OneTapOAuth? oAuth,
- AuthData authData
- dynamic onAuthCode(
- AuthCodeData data,
- bool isCompletion
- dynamic onError(
- OneTapOAuth? oAuth,
- AuthError error
- required String serviceName,
- OneTapBottomSheetScenario scenario = OneTapBottomSheetScenario.enterService,
- bool autoHideOnSuccess = true,
- Set<
OneTapOAuth> alternativeOAuths = const {}, - OneTapBottomSheetStyle style = const OneTapBottomSheetStyle(type: OneTapBottomSheetType.light),
- UIAuthParams authParams = const UIAuthParams._(),
- bool fastAuthEnabled = true,
Constructs a modal bottom sheet.
There are some parameters, that you can provide. key
can be used to retrieve State of the widget.
onAuth
will be called after successful auth if you passed PublicFlowData to authParams
.
onAuthCode
will be called if you passed ConfidentialFlowData to authParams
.
onError
will be called if any error was encountered during auth.
alternativeOAuths
can be specified to allow login with other OAuth providers.
style
allows to style the widget. fastAuthEnabled
allows to disable user fetching on Android.
authParams
specify auth flow and scopes. Read more about them in UIAuthParamsBuilder.
scenario
allows to adjust text on a sheet for your specific usage scenario.
autoHideOnSuccess
allows to disable automatic sheet dismissing after successful auth.
serviceName
specifies what name will be displayed in the top left corner of a sheet.
Implementation
const OneTapBottomSheet({
required Key key,
required Function(OneTapOAuth? oAuth, AuthData authData) onAuth,
Function(AuthCodeData data, bool isCompletion) onAuthCode =
_defaultOnAuthCode,
Function(OneTapOAuth? oAuth, AuthError error) onError = _defaultOnError,
required String serviceName,
OneTapBottomSheetScenario scenario = OneTapBottomSheetScenario.enterService,
bool autoHideOnSuccess = true,
Set<OneTapOAuth> alternativeOAuths = const {},
OneTapBottomSheetStyle style = const OneTapBottomSheetStyle(
type: OneTapBottomSheetType.light,
),
UIAuthParams authParams = const UIAuthParams._(),
bool fastAuthEnabled = true,
}) : _onAuth = onAuth,
_onAuthCode = onAuthCode,
_onError = onError,
_serviceName = serviceName,
_scenario = scenario,
_autoHideOnSuccess = autoHideOnSuccess,
_alternativeOAuths = alternativeOAuths,
_style = style,
_authParams = authParams,
_fastAuthEnabled = fastAuthEnabled,
super(key: key);