init method

  1. @override
Future<void> init(
  1. {List<String> scopes = const <String>[],
  2. SignInOption signInOption = SignInOption.standard,
  3. String? hostedDomain,
  4. String? clientId}
)
override

Initializes the plugin. Deprecated: call initWithParams instead.

The hostedDomain argument specifies a hosted domain restriction. By setting this, sign in will be restricted to accounts of the user in the specified domain. By default, the list of accounts will not be restricted.

The list of scopes are OAuth scope codes to request when signing in. These scope codes will determine the level of data access that is granted to your application by the user. The full list of available scopes can be found here: developers.google.com/identity/protocols/googlescopes

The signInOption determines the user experience. SigninOption.games is only supported on Android.

See: https://developers.google.com/identity/sign-in/web/reference#gapiauth2initparams

Implementation

@override
Future<void> init({
  List<String> scopes = const <String>[],
  SignInOption signInOption = SignInOption.standard,
  String? hostedDomain,
  String? clientId,
}) {
  return initWithParams(SignInInitParameters(
      scopes: scopes,
      signInOption: signInOption,
      hostedDomain: hostedDomain,
      clientId: clientId));
}