update method

bool update(
  1. MaterialState state, {
  2. required bool value,
})

Implementation

bool update(MaterialState state, {required bool value}) {
  final result = value ? _states.add(state) : _states.remove(state);
  if (result) for (final notify in _observers) notify();
  return result;
}