Skip to content

Expansible maintainState property's default value conflicts with its documentation #178045

Description

@Reprevise

Expansible's maintainState property has a default value of true, but the documentation states that it's default value is false. The easy fix is to update the documentation, but is there any willingness to attempt to change the default value?

const Expansible({
super.key,
required this.headerBuilder,
required this.bodyBuilder,
required this.controller,
this.expansibleBuilder = _defaultExpansibleBuilder,
this.duration = const Duration(milliseconds: 200),
this.curve = Curves.ease,
this.reverseCurve,
this.maintainState = true,
});

/// Whether the state of the body is maintained when the widget expands or
/// collapses.
///
/// If true, the body is kept in the tree while the widget is
/// collapsed. Otherwise, the body is removed from the tree when the
/// widget is collapsed and recreated upon expansion.
///
/// Defaults to false.
final bool maintainState;

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework teamwaiting for PR to land (fixed)A fix is in flight

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions