Skip to content

Commit

Permalink
feat: [firebase_ui_auth] [firebase_ui_oauth] Allow for custom labels …
Browse files Browse the repository at this point in the history
…to be used for custom OAuth providers (#9858)

* Added `label` field to `ThemedOAuthProviderButtonStyle`

* Added comment

* Code simplification

* Formatting

* Removed dependency overrides
  • Loading branch information
Rexios80 committed Nov 24, 2022
1 parent 02d394b commit fd0b815
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Expand Up @@ -110,7 +110,8 @@ class OAuthProviderButton extends StatelessWidget {
),
label: variant == OAuthButtonVariant.icon
? ''
: resolveProviderButtonLabel(provider.providerId, labels),
: provider.style.label ??
resolveProviderButtonLabel(provider.providerId, labels),
auth: auth,
);

Expand Down
Expand Up @@ -46,6 +46,11 @@ abstract class ThemedOAuthProviderButtonStyle {
double get iconPadding => 0;
String get assetsPackage;

/// A custom label string.
///
/// Required for custom OAuth providers.
String? get label => null;

/// {@macro ui.oauth.themed_oauth_provider_button_style}
const ThemedOAuthProviderButtonStyle();

Expand Down

0 comments on commit fd0b815

Please sign in to comment.