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

LabelText Color #9

Closed
leszekkrol opened this issue Jul 14, 2020 · 2 comments
Closed

LabelText Color #9

leszekkrol opened this issue Jul 14, 2020 · 2 comments

Comments

@leszekkrol
Copy link

Hello, How can I change the label text color? We create an application in black, so that the text entered in the field is invisible to the user. Changing ThemeData does not affect the color on the form. Any ideas?

Example of ThemeData:

ThemeData(
        primaryColor: Color.fromRGBO(26, 30, 37, 1.0),
        backgroundColor: Color.fromRGBO(26, 30, 37, 1.0),
        textTheme: TextTheme(
          headline1: TextStyle(color: Colors.white),
          headline6: TextStyle(color: Colors.white),
          bodyText2: TextStyle(color: Colors.white),
        ),
        inputDecorationTheme: InputDecorationTheme(
          fillColor: Colors.white,
          focusColor: Colors.white,
          hoverColor: Colors.white,
          hintStyle: TextStyle(
            color: Color.fromRGBO(183, 192, 182, 1.0)
          ),
          counterStyle: TextStyle(
            color: Color.fromRGBO(183, 192, 182, 1.0)
          ),
          labelStyle: TextStyle(
            color: Color.fromRGBO(183, 192, 182, 1.0)
          ),
          contentPadding: new EdgeInsets.symmetric(vertical: 0.0),
        ),
        cursorColor: Colors.white,
        indicatorColor: Colors.white,
        focusColor: Colors.white,
        fontFamily: 'Avenir',
        scaffoldBackgroundColor: Colors.black,
        pageTransitionsTheme: PageTransitionsTheme(
          builders: {
            TargetPlatform.android: CupertinoPageTransitionsBuilder(),
            TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
          }
        )
      ),
@kozw
Copy link
Contributor

kozw commented Jul 14, 2020

The style of the TextField is null, and defaults to the subtitle1 text style from the current theme.

Something like this should work:

textTheme: TextTheme(
  subtitle1: TextStyle(color: Colors.white),
  ...
),

@kozw kozw closed this as completed Jul 14, 2020
@leszekkrol
Copy link
Author

@kozw Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants