ZdsSplitNavigator class

A ZdsSplitNavigator used to navigate the screen for the split view for tablet.

By default the primary widget will be visible in the tablet portrait mode and in the tablet landscape mode screen will be split into two part and secondary widget will be displayed on the right side of of the the screen. The push operation will push the page only on the right side of the part.

Inheritance
Available Extensions

Constructors

ZdsSplitNavigator({required Widget primaryWidget, required WidgetBuilder emptyBuilder, required bool shouldSplit, double widthRatio = 0.4, RouteFactory? onGenerateRoute, double? maxPrimaryWidth, GlobalKey<NavigatorState>? splitNavigatorKey, bool boxShadowDivider = true, bool alwaysSplit = false, Key? key})
Creates a split navigator.
const

Properties

alwaysSplit bool
To split the screen respective of orientation Note: In QChat we are showing split view in portrait also Defaults to false.
final
boxShadowDivider bool
Whether to divide the views using a shadow, rather than a line.
final
emptyBuilder WidgetBuilder
Initial page that will be visible on the right side in the landscape mode. Typically Scaffold.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxPrimaryWidth double?
Max width for primary widget when it's being displayed in split mode.
final
onGenerateRoute RouteFactory?
Called to generate a route for a given RouteSettings.
final
primaryWidget Widget
Widget that will be shown at the left side in the landscape mode. and full screen in the portrait mode. Typically Scaffold.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldSplit bool
Flag used to decide whether split navigator should be used or not.
final
splitNavigatorKey GlobalKey<NavigatorState>?
Navigator key used in split mode.
final
widthRatio double
Primary to secondary width ratio
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ZdsSplitNavigator>
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.
override
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) ZdsSplitNavigatorState
Retrieves the nearest ZdsSplitNavigatorState ancestor from the given BuildContext.
popUntilRoot(BuildContext context) → void
Pops all routes from the split navigator until the root route.
push<T extends Object?>(BuildContext context, Route<T> route, {bool rootNavigator = false}) Future<T?>
Pushes a new route, either onto the split navigator if available or onto the regular navigator.
pushDetails<T extends Object?>(BuildContext context, Route<T> route, {bool rootNavigator = false}) Future<T?>
Pushes a details route, either onto the split navigator if available or onto the regular navigator.
pushNamedDetails<T extends Object?>(BuildContext context, String routeName, {Object? arguments, bool rootNavigator = false}) Future<T?>
Pushes a named details route, either onto the split navigator if available or onto the regular navigator.

Constants

emptyRoute → const String
String used for empty detail routes.