Skip to content

[google_sign_in] Add future that completes when the plugin is (really) ready. #71607

@ditman

Description

@ditman

Use case

Google Sign In (web) is some times slow to start up and silently sign in the current user; however there's no way for app developers to let users know about this delay.

There's currently a future in the plugin side that can be used to compute the initialization status of the plugin, without having to touch platform-dependent code:

https://github.com/flutter/plugins/blob/master/packages/google_sign_in/google_sign_in/lib/google_sign_in.dart#L227-L228

(However, it can become null if the initialization fails)

Proposal

As proposed by @SwissCheese5 here:

A Future in the Google Sign In package that completes as soon as the javascript script finishes loading. That way we can show a loading indicator on sites and act accordingly. This will not break anything and only provides an extra feature people can use to make sure google sign in finishes loading.

Metadata

Metadata

Labels

P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: google_sign_inThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions