value property

bool value

False if this control is "inactive" (not checked, off, or unselected).

If value is true then the control "active" (checked, on, or selected). If tristate is true and value is null, then the control is considered to be in its third or "indeterminate" state.

When the value changes, this object starts the positionController and position animations to animate the visual appearance of the control to the new value.

Implementation

bool get value => _value;
void value= (bool value)

Implementation

set value(bool value) {
  assert(tristate || value != null);
  if (value == _value)
    return;
  _value = value;
  markNeedsSemanticsUpdate();
  _position
    ..curve = Curves.easeIn
    ..reverseCurve = Curves.easeOut;
  if (tristate) {
    switch (_positionController.status) {
      case AnimationStatus.forward:
      case AnimationStatus.completed:
        _positionController.reverse();
        break;
      default:
        _positionController.forward();
    }
  } else {
    if (value == true)
      _positionController.forward();
    else
      _positionController.reverse();
  }
}