resolveProviderButtonLabel static method

String resolveProviderButtonLabel(
  1. String providerId,
  2. FirebaseUILocalizationLabels labels
)

Returns a text that should be displayed on the button.

Implementation

static String resolveProviderButtonLabel(
  String providerId,
  FirebaseUILocalizationLabels labels,
) {
  switch (providerId) {
    case 'google.com':
      return labels.signInWithGoogleButtonText;
    case 'facebook.com':
      return labels.signInWithFacebookButtonText;
    case 'twitter.com':
      return labels.signInWithTwitterButtonText;
    case 'apple.com':
      return labels.signInWithAppleButtonText;
    default:
      throw Exception('Unknown providerId $providerId');
  }
}