MasterDetailScaffold class

A scaffold for implementing the master-detail flow

Inheritance

Constructors

MasterDetailScaffold({required WidgetBuilder masterPaneBuilder, required double masterPaneWidth, required PreferredSizeWidget detailsAppBar, required WidgetBuilder detailsPaneBuilder, required PreferredSizeWidget initialAppBar, required String initialRoute, required String detailsRoute, required DetailsPaneRouteChangedCallback onDetailsPaneRouteChanged, WidgetBuilder? initialDetailsPaneBuilder, double? twoPanesWidthBreakpoint, MasterDetailPageRouteBuilder? pageRouteBuilder, Widget? floatingActionButton, FloatingActionButtonLocation? floatingActionButtonLocation, FloatingActionButtonAnimator? floatingActionButtonAnimator, List<Widget>? persistentFooterButtons, Widget? drawer, Widget? endDrawer, Widget? bottomNavigationBar, Widget? bottomSheet, Color? backgroundColor, bool? resizeToAvoidBottomInset, bool primary = true, DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start, bool extendBody = false, bool extendBodyBehindAppBar = false, Color? drawerScrimColor, double? drawerEdgeDragWidth, Key? key})
const

Properties

backgroundColor Color?
final
bottomNavigationBar Widget?
final
bottomSheet Widget?
final
detailsAppBar PreferredSizeWidget
The app bar to shown when only the details pane is visible i.e. when on the detailsRoute after the user has selected an item.
final
detailsPaneBuilder WidgetBuilder
Creates the content to show in the details pane
final
detailsRoute String
The name of the details route. When trying to show specific content in the details pane, navigation must be done used named routes and be done in a manner similar to Uri-based navigation. For example, if detailsRoute is set to be item, navigation can be done as follows
final
drawer Widget?
See Scaffold.drawer. Only shown when both panes are displayed or if only one pane is visible, it's the master pane that is shown
final
drawerDragStartBehavior DragStartBehavior
final
drawerEdgeDragWidth double?
final
drawerScrimColor Color?
final
endDrawer Widget?
See Scaffold.endDrawer. Only shown when both panes are displayed or if only one pane is visible, it's the master pane that is shown
final
extendBody bool
final
extendBodyBehindAppBar bool
final
floatingActionButton Widget?
The button to display above the details pane and will only be shown when the detailsPaneBuilder is visible
final
floatingActionButtonAnimator FloatingActionButtonAnimator?
final
floatingActionButtonLocation FloatingActionButtonLocation?
final
hashCode int
The hash code for this object.
no setterinherited
initialAppBar PreferredSizeWidget
The app bar to show when the both the master and details pane are visible. If only one pane is visible, this the app bar that is shown when it's the master pane that is visible i.e. when on the initialRoute as the user has selected an item yet
final
initialDetailsPaneBuilder WidgetBuilder?
Creates the widget to show when both the master and details pane are visible but there aren't any details to show. If null, then defaults to showing a Container.
final
initialRoute String
The name of the initial route. When the instance of the Navigator associated with the MasterDetails
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
masterPaneBuilder WidgetBuilder
Creates the content to show in the master pane
final
masterPaneWidth double
The width of the master pane. The details pane will occur the remaining space
final
onDetailsPaneRouteChanged → DetailsPaneRouteChangedCallback
Callback that is involved when the details that need to be displayed change. The callback is triggered in the following conditions:
final
pageRouteBuilder → MasterDetailPageRouteBuilder?
Function that creates a modal route that can be used determine what the transition should be when navigation occurs. If left as null, then the MaterialMasterDetailPageRoute is used as a default
final
persistentFooterButtons List<Widget>?
final
primary bool
final
resizeToAvoidBottomInset bool?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
twoPanesWidthBreakpoint double?
The minimum width at which both the master and details pane will be shown
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() MasterDetailScaffoldState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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

Static Methods

of(BuildContext context, {bool nullOk = false}) MasterDetailScaffoldState?
The state of the nearest instance of the MasterDetailScaffold widget.