Home > Enterprise >  Changing the themeColor of CheckBoxListTile globally using material3
Changing the themeColor of CheckBoxListTile globally using material3

Time:12-07

In Flutter enter image description here

Note: The documentation works if i remove usematerial3:true

CodePudding user response:

there is a checkboxTheme property inside ThemeData.

You can update something like this.

checkboxTheme: CheckboxThemeData(
      fillColor: MaterialStateProperty.all<Color>(Colors.purple),
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(3),
      ),
      side: BorderSide(color: Colors.grey.shade100, width: 1.5),
    ),

Happy coding:)

  • Related