setMaterialState method Null safety

  1. @protected
void setMaterialState(
  1. MaterialState state,
  2. bool isSet
)
protected">@protected

Mutator to mark a MaterialState value as either active or inactive.

Implementation

@protected
void setMaterialState(MaterialState state, bool isSet) {
  return isSet ? addMaterialState(state) : removeMaterialState(state);
}