简体   繁体   English

如何更改 FlutterFireUI 屏幕中注册/登录文本按钮的颜色?

[英]How Do I change the Color of the Register/Login TextButton in FlutterFireUI Screen?

I'm trying to change the color of the Register button in the "don't have an account? Register" widget in the FlutterFireUI loginScreen page我正在尝试更改 FlutterFireUI loginScreen 页面中“没有帐户?注册”小部件中注册按钮的颜色

the button I want to change我要更改的按钮

I thought it was a TextButton at first like the forget password button so I added the following code inside the ThemeData widget for the MaterialApp一开始我以为它是一个 TextButton,就像忘记密码按钮一样,所以我在 MaterialApp 的 ThemeData 小部件中添加了以下代码

textButtonTheme: TextButtonThemeData(
     style: TextButton.styleFrom(
     foregroundColor:  Color(0xFF6F73D2),// Text Color
    ),
 ),

but it turned out to be a RichText widget instead但它原来是一个 RichText 小部件

I looked online for hours but I can't find how to change its color我在网上看了几个小时,但找不到如何改变它的颜色

RichText(
          text: TextSpan(
            text: "Don't have an account? ",
            style: TextStyle(color: Colors.black),
            children: [
              TextSpan(
                text: ' Register',
                style: TextStyle(
                  fontWeight: FontWeight.bold,
                  color: Color(0xFF6F73D2),
                ),
                recognizer: TapGestureRecognizer()
                  ..onTap = () {
                    //BUTTON ACTION
                  },
              ),
            ],
          ),
        ),

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为我的 iOS 应用程序创建仅允许授权用户(由我确定)并且不包含“注册帐户”功能的登录功能 - How do I create a login feature for my iOS app that only allows authorized users (determined by me) and does not include a "register account" feature Firebase:如何在应用检查中注册我的 Flutter 应用? - Firebase: How do I register my Flutter app in app check? 如何在 firestore 上创建登录 function 注册 - How to create login function register on firestore Flutter Firebase - 注册后无法导航到登录屏幕 - Flutter Firebase - Unable to Navigate to Login Screen after Register Flutter:注册成功后如何让用户自动登录? - Flutter: How to make user login automatically after register successfully? 如何为推送通知注册 Google Classroom API? - How do I register Google Classroom API for push notifications? 如何在 FCM 控制台 UI 之外注册新的 vapidKeys - How do I register new vapidKeys outside FCM console UI 如何在 VSCode 中更改 Terraform 版本? - How do I Change the Terraform Version in VSCode? 如何更改 Redshift 中的列数据类型? - How do I change column data type in Redshift? 如何更改与谷歌云项目关联的 email 地址? - How do I change the email address associated with a google cloud project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM