-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[google_sign_in_web]Fix renderButton stuck on "Getting ready" for Web (Future<void> issue) #11081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -280,7 +280,7 @@ class GoogleSignInPlugin extends GoogleSignInPlatform { | |
| key: Key(config.hashCode.toString()), | ||
| future: initialized, | ||
| builder: (BuildContext context, AsyncSnapshot<void> snapshot) { | ||
| if (snapshot.hasData) { | ||
| if (snapshot.connectionState == ConnectionState.done) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this change correctly handles a completed For example: builder: (BuildContext context, AsyncSnapshot<void> snapshot) {
if (snapshot.hasError) {
// In case of error, show an empty box or an error message.
// Consider logging the error as well.
return const SizedBox.shrink();
}
if (snapshot.connectionState == ConnectionState.done) {
return FlexHtmlElementView(
viewType: 'gsi_login_button',
onElementCreated: (Object element) {
_gisSdkClient.renderButton(element, config);
},
);
}
return const Text('Getting ready');
},
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without restoring all the changes reverted in 1.1.2, this change isn't really doing anything. |
||
| return FlexHtmlElementView( | ||
| viewType: 'gsi_login_button', | ||
| onElementCreated: (Object element) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was fixed in 1.1.2, so this changelog isn't accurate.