SectionView<K extends Object, Section, Item> class

Rich view of a visible section header passed to a header builder.

Constructors

SectionView({required K key, required Section section, required int itemCount, required bool isExpanded, required bool isCollapsible, required SectionedListController<K, Section, Item> controller})
const

Properties

controller → SectionedListController<K, Section, Item>
The controller backing this view, available as an escape hatch. Convenience methods on this view delegate to the controller.
final
hashCode → int
The hash code for this object.
no setterinherited
isCollapsible → bool
Whether the user can toggle this section's expansion. false when the parent widget was created with collapsible: false.
final
isExpanded → bool
Whether the section is currently expanded.
final
itemCount → int
Total items currently belonging to this section, regardless of expansion state. Visible count is isExpanded ? itemCount : 0.
final
key → K
Unique identifier for this section.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
section → Section
User payload for the section header.
final

Methods

addItem(Item item, {int? index, bool animate = true}) → void
Adds item under this section. Forwards to SectionedListController.addItem.
collapse({bool animate = true}) → void
Collapses this section.
expand({bool animate = true}) → void
Expands this section.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove({bool animate = true}) → void
Removes this section (and all its items).
toggle({bool animate = true}) → void
Toggles expansion.
toString() → String
A string representation of this object.
inherited
update(Section section) → void
Replaces this section's payload. Asserts that the section still exists.

Operators

operator ==(Object other) → bool
The equality operator.
inherited