pub struct ExpansionPanelList {
pub key: Option<KeyRef>,
pub children: Vec<ExpansionPanel>,
pub expansion_callback: Option<ExpansionPanelCallback>,
pub animation_duration: Duration,
pub initial_open_panel_value: Option<Rc<dyn AnyEq>>,
pub expanded_header_padding: EdgeInsets,
pub divider_color: Option<Color>,
pub elevation: f64,
pub expand_icon_color: Option<Color>,
pub material_gap_size: f64,
/* private fields */
}Expand description
A material expansion panel list that lays out its children and animates expansions.
The expansion_callback is called when the expansion state
changes. For normal ExpansionPanelList widgets, it is the responsibility of the parent
widget to rebuild the ExpansionPanelList with updated values for
ExpansionPanel::is_expanded. For ExpansionPanelList::radio widgets, the open state is
tracked internally and the callback is invoked both for the previously open panel, which is
closing, and the previously closed panel, which is opening.
Fields§
§key: Option<KeyRef>§children: Vec<ExpansionPanel>The children of the expansion panel list. They are laid out in a similar fashion to
ListBody.
expansion_callback: Option<ExpansionPanelCallback>The callback that gets called whenever one of the expand/collapse buttons is pressed. The arguments passed to the callback are the index of the pressed panel and whether the panel is currently expanded or not.
animation_duration: DurationThe duration of the expansion animation.
initial_open_panel_value: Option<Rc<dyn AnyEq>>The value of the panel that initially begins open. (This value is only used when
initializing with the ExpansionPanelList::radio constructor.)
expanded_header_padding: EdgeInsetsThe padding that surrounds the panel header when expanded.
By default, 16px of space is added to the header vertically (above and below) during expansion.
divider_color: Option<Color>Defines color for the divider when ExpansionPanel::is_expanded is false.
If divider_color is None, then DividerThemeData::color is used. If that is None,
then ThemeData::divider_color is used.
elevation: f64Defines elevation for the ExpansionPanel while it’s expanded.
By default, the value of elevation is 2.
expand_icon_color: Option<Color>The color of the icon. Defaults to Colors::BLACK54 when the theme’s brightness is
light and to Colors::WHITE60 when it is dark.
material_gap_size: f64Defines the MaterialGap::size of the gap between panels when expanded.
Defaults to 16.0.
Implementations§
Source§impl ExpansionPanelList
impl ExpansionPanelList
Sourcepub fn new() -> ExpansionPanelList
pub fn new() -> ExpansionPanelList
Creates an expansion panel list widget. The expansion_callback is triggered when an
expansion panel expand/collapse button is pushed; Dart’s optional named arguments are
the setters.
Sourcepub fn radio(
children: impl IntoIterator<Item = ExpansionPanelRadio>,
) -> ExpansionPanelList
pub fn radio( children: impl IntoIterator<Item = ExpansionPanelRadio>, ) -> ExpansionPanelList
Creates a radio expansion panel list widget.
This widget allows for at most one panel in the list to be open. The expansion panel
callback is triggered when an expansion panel expand/collapse button is pushed. The
children are radio panels, each with a unique value.
Sourcepub fn key(self, key: KeyRef) -> ExpansionPanelList
pub fn key(self, key: KeyRef) -> ExpansionPanelList
Dart ExpansionPanelList(key:).
Sourcepub fn children(
self,
children: impl IntoIterator<Item = ExpansionPanel>,
) -> ExpansionPanelList
pub fn children( self, children: impl IntoIterator<Item = ExpansionPanel>, ) -> ExpansionPanelList
Dart ExpansionPanelList(children:).
Sourcepub fn expansion_callback(
self,
expansion_callback: ExpansionPanelCallback,
) -> ExpansionPanelList
pub fn expansion_callback( self, expansion_callback: ExpansionPanelCallback, ) -> ExpansionPanelList
Dart ExpansionPanelList(expansionCallback:).
Sourcepub fn animation_duration(
self,
animation_duration: Duration,
) -> ExpansionPanelList
pub fn animation_duration( self, animation_duration: Duration, ) -> ExpansionPanelList
Dart ExpansionPanelList(animationDuration:).
Sourcepub fn initial_open_panel_value(self, value: impl AnyEq) -> ExpansionPanelList
pub fn initial_open_panel_value(self, value: impl AnyEq) -> ExpansionPanelList
Dart ExpansionPanelList.radio(initialOpenPanelValue:).
Sourcepub fn expanded_header_padding(
self,
expanded_header_padding: EdgeInsets,
) -> ExpansionPanelList
pub fn expanded_header_padding( self, expanded_header_padding: EdgeInsets, ) -> ExpansionPanelList
Dart ExpansionPanelList(expandedHeaderPadding:).
Sourcepub fn divider_color(self, divider_color: Color) -> ExpansionPanelList
pub fn divider_color(self, divider_color: Color) -> ExpansionPanelList
Dart ExpansionPanelList(dividerColor:).
Sourcepub fn elevation(self, elevation: f64) -> ExpansionPanelList
pub fn elevation(self, elevation: f64) -> ExpansionPanelList
Dart ExpansionPanelList(elevation:).
Sourcepub fn expand_icon_color(self, expand_icon_color: Color) -> ExpansionPanelList
pub fn expand_icon_color(self, expand_icon_color: Color) -> ExpansionPanelList
Dart ExpansionPanelList(expandIconColor:).
Sourcepub fn material_gap_size(self, material_gap_size: f64) -> ExpansionPanelList
pub fn material_gap_size(self, material_gap_size: f64) -> ExpansionPanelList
Dart ExpansionPanelList(materialGapSize:).
Trait Implementations§
Source§impl Debug for ExpansionPanelList
impl Debug for ExpansionPanelList
Source§impl Default for ExpansionPanelList
impl Default for ExpansionPanelList
Source§fn default() -> ExpansionPanelList
fn default() -> ExpansionPanelList
Source§impl StatefulWidget for ExpansionPanelList
impl StatefulWidget for ExpansionPanelList
Source§type State = ExpansionPanelListState
type State = ExpansionPanelListState
Source§fn create_state(&self) -> ExpansionPanelListState
fn create_state(&self) -> ExpansionPanelListState
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn as_preferred_size_widget(
&self,
) -> Option<&(dyn PreferredSizeWidget + 'static)>
fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Widget::type_name. A stateful form another widget kind becomes (an animated or
status transition widget) names the widget it wraps.Auto Trait Implementations§
impl !RefUnwindSafe for ExpansionPanelList
impl !Send for ExpansionPanelList
impl !Sync for ExpansionPanelList
impl !UnwindSafe for ExpansionPanelList
impl Forget for ExpansionPanelList
impl Freeze for ExpansionPanelListwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<ExpansionPanel>: Freeze,
*const RcInner<dyn Fn(&mut App, usize, bool)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, usize, bool)>>: Freeze,
PhantomData<Rc<dyn AnyEq>>: Freeze,
*const RcInner<dyn AnyEq> is !null: Freeze,
PhantomData<RcInner<dyn AnyEq>>: Freeze,
impl Move for ExpansionPanelList
impl Unpin for ExpansionPanelList
impl UnsafeUnpin for ExpansionPanelListwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<ExpansionPanel>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, usize, bool)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, usize, bool)>>: UnsafeUnpin,
PhantomData<Rc<dyn AnyEq>>: UnsafeUnpin,
*const RcInner<dyn AnyEq> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn AnyEq>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<W> IntoWidget<StatefulKind> for Wwhere
W: StatefulWidget,
impl<W> IntoWidget<StatefulKind> for Wwhere
W: StatefulWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.