FlutterFire_UI 包如何去除“没有账户?注册”文字

问题描述 投票:0回答:2

我一直在关注此文档,并且能够自定义背景颜色、添加自定义图像并使用构建器编辑字幕和页脚,但我对如何编辑 FlutterFire_UI 在其

SignInScreen()
小部件中的默认文本感到困惑.

enter image description here

我想编辑“登录”文本和“没有帐户?注册”文本。如果我不使用电子邮件和密码而仅使用 Google、Facebook 和 Apple 登录方法,则不需要注册选项。

查看 SignInScreen() 小部件的构造函数的源代码,我没有看到与这两个文本字段相关的任何内容:

 const SignInScreen({
    Key? key,
    List<ProviderConfiguration>? providerConfigs,
    FirebaseAuth? auth,
    this.headerMaxExtent,
    this.headerBuilder,
    this.sideBuilder,
    this.oauthButtonVariant = OAuthButtonVariant.icon_and_text,
    this.desktopLayoutDirection,
    this.resizeToAvoidBottomInset = false,
    this.showAuthActionSwitch,
    this.email,
    this.subtitleBuilder,
    this.footerBuilder,
    this.loginViewKey,
    this.actions = const [],
    this.breakpoint = 800,
    this.styles,
  }) : super(key: key, providerConfigs: providerConfigs, auth: auth);


  [1]: https://i.sstatic.net/jfhVd.png
flutter firebase firebase-authentication flutter-layout
2个回答
3
投票

showAuthActionSwitch: false,
选项将解决您的问题。

return SignInScreen({
   showAuthActionSwitch: false,
   // ...
})

0
投票

有没有办法也删除“登录”文本?

© www.soinside.com 2019 - 2024. All rights reserved.