I'm trying to display different color when Material button is disabled. I'm adding property disabledColor and disabledTextColor. However, disabledTextColor showing exact color entered but disabledColor not showing any color.
Here is my code
disabledColor:Colors.grey, //not working for background color of button disabledTextColor:Colors.black, // working for text color of button
MaterialButton(
padding: EdgeInsets.all(10.0),
disabledElevation: 1,
disabledColor: Colors.black45,
disabledTextColor: Colors.white70,
color:Colors.indigo,
textColor: Colors.white,
child: Text("Verify",style: TextStyle(
fontSize: 18.0,
),),
onPressed: null,
),
I expect the output should display grey as background color and black as text color.