-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[gsi_web] Adds Sign In button. #3636
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
Conversation
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.
packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart
Outdated
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart
Outdated
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_web/lib/src/button_configuration.dart
Outdated
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_web/lib/src/button_configuration.dart
Outdated
Show resolved
Hide resolved
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.
FYI: using BoxConstraints from a LayoutBuilder may provide a better first guess than Size(1, 1).
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.
For the best user experience in this usage, the initialSize should be guesstimated off of the button configuration.
The layout builder however tells me the constraints that flutter will apply to my widget, but it does not tell me what's the rendered size of the contents of the html element view, so I'm not sure that the estimation is going to be better (if I understand the layout builder correctly, in that case the widget will start large, and then likely shrink, and with Size(1,1) it'll start small and likely grow?)
* Adds web-only renderButton method. * Implements new platform interface methods. * canAccessScopes method and userDataEvents stream. * Adds button_tester example app. * Adds a flex view that reflows flutter apps from its contents.
|
Hey, @stuartmorgan just a quick heads-up that this is almost ready to land. Please do take a look! I've updated the README with the latest changes; instructing users to (The latter change made me want to release this as a major version change, so people who have already migrated to 0.11 get these changes by accident) I've also added a new test app (that only uses this plugin) to test what the button looks like with different configuration values (I've deployed the latest version to the URL I linked in the description). Thanks! 🙏 |
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.
The metadata LGTM with nits; I mostly didn't review the implementation part since that was already done.
packages/google_sign_in/google_sign_in_web/example/lib/button_tester.dart
Outdated
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart
Outdated
Show resolved
Hide resolved
|
Let's go with this! When programmers attempt to use |
[gsi_web] Adds Sign In button.

canAccessScopesmethod anduserDataEventsstream.Breaking change:
silentSignInnow returns a non-null user, after popular demand (and adding a method to check if a usercanAccessScopes).Issues
Testing
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.