OneTapBottomSheet constructor

const OneTapBottomSheet({
  1. required Key key,
  2. required dynamic onAuth(
    1. OneTapOAuth? oAuth,
    2. AuthData authData
    ),
  3. dynamic onAuthCode(
    1. AuthCodeData data,
    2. bool isCompletion
    ) = _defaultOnAuthCode,
  4. dynamic onError(
    1. OneTapOAuth? oAuth,
    2. AuthError error
    ) = _defaultOnError,
  5. required String serviceName,
  6. OneTapBottomSheetScenario scenario = OneTapBottomSheetScenario.enterService,
  7. bool autoHideOnSuccess = true,
  8. Set<OneTapOAuth> alternativeOAuths = const {},
  9. OneTapBottomSheetStyle style = const OneTapBottomSheetStyle(type: OneTapBottomSheetType.light),
  10. UIAuthParams authParams = const UIAuthParams._(),
  11. 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);