GiancarloCode/form_bloc

TextStyle cannot change text color in TextFieldBlocBuilder

aideric opened this issue · 2 comments

In the latest flutter form bloc

flutter_form_bloc: ^0.30.1

The text style cannot change the color of TextFieldBlocBuilder

                      TextFieldBlocBuilder(
                        textFieldBloc: formBloc.text1,
                        decoration: const InputDecoration(
                          labelText: 'TextFieldBlocBuilder textStyle red',
                          prefixIcon: Icon(Icons.text_fields),
                        ),
                        textStyle: TextStyle(color: Colors.red),
                      ),
                      TextFieldBlocBuilder(
                        textFieldBloc: formBloc.text1,
                        decoration: const InputDecoration(
                          labelText: 'TextFieldBlocBuilder textColor red',
                          prefixIcon: Icon(Icons.text_fields),
                        ),
                        textColor: MaterialStateProperty.all(Colors.red),
                      ),

you can add this code to

to test it

However, the textColor can change it.
Maybe need a migration guide for the user to migrate text style color to text color or fix it.

textColor is used to customize the color of the text, but textStyle is used to customize fontSize, weight, and other attributes.

Thank you.
I just want to point out that in the old version, we can set text color by textStyle color. But in the new version we can't.
I think we should provide migration guide to the users.