Answers for "how to change button background color in flutter"

1

raised button background color doesn't changeflutter

RaisedButton(
              onPressed: null,
              child: Text('Get in'), // change it to sign-in
              color: Colors.blue,
              disabledColor: Colors.blue,//add this to your code
            )
Posted by: Guest on October-19-2020
0

add background color to button flutte

bool isButtonPressed = false;

RaisedButton(
            color: isButtonPressed ? Colors.green : Colors.red,
            onPressed: () {
              setState(() {
                isButtonPressed =!isButtonPressed;
              });
            },
          ),
Posted by: Guest on February-04-2021

Code answers related to "how to change button background color in flutter"

Browse Popular Code Answers by Language