-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
p: google_sign_inThe Google Sign-In pluginThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform team
Description
Steps to reproduce
In the renderButton method in the google_sign_in_web.dart, it depends on a FutureBuilder:
return FutureBuilder<void>(
future: _initialized,
builder: (BuildContext context, AsyncSnapshot<void> snapshot) {
if (snapshot.hasData) {
...
}
return const Text('Getting ready');
},
);
}
However, the future it depends on changed from:
Future<void> get initialized {
_assertIsInitCalled();
return Future.wait<void>(<Future<void>>[
_jsSdkLoadedFuture,
_initCalled!.future,
]);
}
to
Future<void> get _initialized => _initCalled.future;
The if (snapshot.hasData) check never succeeds. Previously it would return an array of two null values. Now it just returns a null value, which is always false for hasData
Expected results
Instead of checking for hasData, check the connection state to see if it's done.
Actual results
It displays "Getting ready" all the time
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p: google_sign_inThe Google Sign-In pluginThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform team