tristate property

bool tristate
final

If true, then the checkbox's value can be true, false, or null.

CheckboxMenuButton displays a dash when its value is null.

When a tri-state checkbox (tristate is true) is tapped, its onChanged callback will be applied to true if the current value is false, to null if value is true, and to false if value is null (i.e. it cycles through false => true => null => false when tapped).

If tristate is false (the default), value must not be null.

Implementation

final bool tristate;