getMaterialState method
Implementation
MaterialStateProperty<Color> getMaterialState() =>
MaterialStateProperty.resolveWith<Color>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return withOpacity(0.5);
}
return this;
},
);