ExpansionTileController class - material library (original) (raw)
Enables control over a single ExpansionTile's expanded/collapsed state.
It can be useful to expand or collapse an ExpansionTileprogrammatically, for example to reconfigure an existing expansion tile based on a system event. To do so, create an ExpansionTilewith an ExpansionTileController that's owned by a stateful widget or look up the tile's automatically created ExpansionTileControllerwith ExpansionTileController.of
The controller's expand and collapse methods cause the the ExpansionTile to rebuild, so they may not be called from a build method.
Constructors
Create a controller to be used with ExpansionTile.controller.
Properties
The hash code for this object.
no setterinherited
Whether the ExpansionTile built with this controller is in expanded state.
no setter
A representation of the runtime type of the object.
no setterinherited
Methods
collapse()→ void
Collapses the ExpansionTile that was built with this controller.
expand()→ void
Expands the ExpansionTile that was built with this controller;
noSuchMethod(Invocation invocation)→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
A string representation of this object.
inherited
Operators
operator ==(Object other)→ bool
The equality operator.
inherited
Static Methods
maybeOf(BuildContext context)→ ExpansionTileController?
Finds the ExpansionTile from the closest instance of this class that encloses the given context and returns its ExpansionTileController.
of(BuildContext context)→ ExpansionTileController
Finds the ExpansionTileController for the closest ExpansionTile instance that encloses the given context.