Skip to content
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

feat: [firebase_ui_auth] [firebase_ui_oauth] Allow for custom labels to be used for custom OAuth providers #9858

Merged
merged 6 commits into from
Nov 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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