SignInGoogle constructor
SignInGoogle({
- required dynamic clientId,
- dynamic scopes = const ['email'],
- dynamic debugLog = false,
clientId- use Google OAuth Chrome Application Client Id standalone app
- use Google OAuth Web Application Client Id for webpage
- cannot be empty
scopes: scopes for OAuth signin- Default
['email']for Google api
- Default
debugLog: force print of log message. Defaultfalse
Implementation
SignInGoogle({
required clientId,
scopes = const ['email'],
debugLog = false,
}) : _api = GoogleSignIn(clientId: clientId, scopes: scopes),
super(
clientId: clientId,
debugLog: debugLog,
scopes: scopes,
) {
String debugPrefix = '$runtimeType.SignInGoogle()';
assert(clientId.isNotEmpty, '$debugPrefix:clientId cannot be empty');
_api.onCurrentUserChanged.listen((account) {
_apiOnUserChange(account);
});
lazy.log('$debugPrefix:GoogleSignIn().listen():done', forced: debugLog);
}