BackdropNavigationBackLayer class

Implements the back layer to be used for navigation.

This class can be used as BackdropScaffold.backLayer. It enables to use the back layer as a navigation list, similar to a Drawer.

Usage example:

int _currentIndex = 0;
final List<Widget> _pages = [Widget1(), Widget2()];

@override
Widget build(BuildContext context) {
  return MaterialApp(
    title: 'Backdrop Demo',
    home: BackdropScaffold(
      appBar: BackdropAppBar(
        title: Text("Navigation Example"),
        actions: <Widget>[
          BackdropToggleButton(
            icon: AnimatedIcons.list_view,
          )
        ],
      ),
      stickyFrontLayer: true,
      frontLayer: _pages[_currentIndex],
      backLayer: BackdropNavigationBackLayer(
        items: [
          ListTile(title: Text("Widget 1")),
          ListTile(title: Text("Widget 2")),
        ],
        onTap: (int position) => {setState(() => _currentIndex = position)},
      ),
    ),
  );
}
Inheritance

Constructors

BackdropNavigationBackLayer({Key? key, required List<Widget> items, ValueChanged<int>? onTap, IndexedWidgetBuilder? separatorBuilder, EdgeInsetsGeometry? itemPadding, ShapeBorder? itemSplashBorder, Color? itemSplashColor})
Creates an instance of BackdropNavigationBackLayer to be used with BackdropScaffold.

Properties

hashCode int
The hash code for this object.
no setterinherited
itemPadding EdgeInsetsGeometry?
Allows to set a Padding for each item of the list.
final
items List<Widget>
The items to be inserted into the underlying ListView of the BackdropNavigationBackLayer.
final
itemSplashBorder ShapeBorder?
Sets a custom border on the list items' InkWell. See InkResponse.customBorder.
final
itemSplashColor Color?
Sets a custom splash color on the list items. See InkResponse.splashColor.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTap ValueChanged<int>?
Callback that is called whenever a list item is tapped by the user.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
separatorBuilder IndexedWidgetBuilder?
Customizable separatorBuilder used with ListView.separated.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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