Answers for "background color button html"

8

elevated button background color

ElevatedButton(
  style: ButtonStyle(
    backgroundColor: MaterialStateProperty.resolveWith<Color>(
      (Set<MaterialState> states) {
        if (states.contains(MaterialState.pressed))
          return Colors.green;
        return null; // Use the component's default.
      },
    ),
  ),
)
Posted by: Guest on March-05-2021
2

elevated button background color

ElevatedButton(
        style: ButtonStyle(
             backgroundColor: MaterialStateProperty.resolveWith<Color>(
                (Set<MaterialState> states) {
            if (states.contains(MaterialState.pressed))
              return Colors.green;
            return Colors.green;
          },
        ),
     ),
 )
Posted by: Guest on April-14-2022

Code answers related to "background color button html"

Browse Popular Code Answers by Language