expanded property
bool
get
expanded
Whether this option is expanded (or should be upon becoming visible)
Implementation
bool get expanded => _expanded;
set
expanded
(bool expanded)
Implementation
set expanded(bool expanded) {
if (_expanded == expanded) return;
_expanded = expanded;
if (!_pending) {
_pending = true;
// Schedules a microtask (if one isn't pending already). This ensures that
// any iterative code deciding the value of expanded doesn't flood the
// stream with incidental events (only broadcasts when writing is done)
scheduleMicrotask(() {
_pending = false;
_expandEvents.add(_expanded);
});
}
}