ReactiveHome class

Inheritance
Available extensions

Constructors

ReactiveHome({Key? key, required List<Widget> pages, required List<ReactiveDestination> reactiveDestinations, bool extendedForNavRail = true, double mobileWhenWidthIs = 500, NavigationRailLabelType labelTypeForNavRail = NavigationRailLabelType.all, Color? backgroundColor, double? elevation, Color? indicatorColor, ShapeBorder? indicatorShape, double? groupAlignmentForNavRail, double? minExtendedWidthForNavRail, double? minWidthForNavRail, Widget? leadingForNavRail, Widget? trailingForNavRail, bool? useIndicatorForNavRail, TextStyle? selectedLabelTextStyleForNavRail, TextStyle? unselectedLabelTextStyleForNavRail, IconThemeData? selectedIconThemeForNavRail, IconThemeData? unselectedIconThemeForNavRail, Color? backgroundColorForNavBar, double? elevationForNavBar, Color? indicatorColorForNavBar, ShapeBorder? indicatorShapeForNavBar, Color? backgroundColorForNavRail, double? elevationForNavRail, Color? indicatorColorForNavRail, ShapeBorder? indicatorShapeForNavRail, double? bottomNavBarHeightForNavBar, Duration? animationDurationForNavBar, Color? shadowColorForNavBar, NavigationDestinationLabelBehavior? labelBehaviorForNavBar})
The ReactiveHome class is a widget that displays either a ReactiveTabletView or a ReactiveMobileView based on the screen width. Meaning it helps you make reactive layouts multiple screens , like tablets , mobiles , desktop , web by adding navigation rail (for tablets and web apps) and navigation bar (for mobile phones)
const

Properties

animationDurationForNavBar Duration?
The animationDurationForNavBar parameter in the ReactiveHome class is used to specify the duration of the animation when switching between different pages in the navigation bar. By setting the animationDurationForNavBar parameter, you can customize the duration of the animation to match the desired visual effect in your app.
final
backgroundColor Color?
The line backgroundColor; is declaring a nullable variable named backgroundColor
final
backgroundColorForNavBar Color?
The backgroundColorForNavBar parameter is used to specify the background color of the navigation bar in the ReactiveHome widget. By setting the backgroundColorForNavBar parameter, you can customize the background color of the navigation bar to match the design of your app.
final
backgroundColorForNavRail Color?
The backgroundColorForNavRail parameter is used to specify the background color of the navigation rail in the ReactiveHome widget. By setting the backgroundColorForNavRail parameter, you can customize the background color of the navigation rail to match the design of your app.
final
bottomNavBarHeightForNavBar double?
The bottomNavBarHeightForNavBar parameter is used to specify the height of the bottom navigation bar in the ReactiveHome widget when using the navigation bar layout. By setting the bottomNavBarHeightForNavBar parameter, you can customize the height of the bottom navigation bar to match the design of your app.
final
currentindex int
no setterinherited
elevation double?
The elevation parameter in the ReactiveHome class is used to specify the elevation of the widget. Elevation is a visual effect that gives the widget a sense of depth and makes it appear to be floating above the surface. The elevation parameter takes a double value, where a higher value will result in a higher elevation.
final
elevationForNavBar double?
The elevationForNavBar parameter is used to specify the elevation of the navigation bar in the ReactiveHome widget. Elevation is a visual effect that gives the widget a sense of depth and makes it appear to be floating above the surface. By setting the elevationForNavBar parameter, you can customize the elevation of the navigation bar to match the design of your app.
final
elevationForNavRail double?
The elevationForNavRail parameter in the ReactiveHome class is used to specify the elevation of the navigation rail in the widget. Elevation is a visual effect that gives the widget a sense of depth and makes it appear to be floating above the surface. By setting the elevationForNavRail parameter, you can customize the elevation of the navigation rail to match the design of your app.
final
extendedForNavRail bool
Indicates that the NavigationRail should be in the extended state.
final
groupAlignmentForNavRail double?
The groupAlignmentForNavRail parameter in the ReactiveHome class is used to specify the alignment of the reactive destinations in the navigation rail. It takes a double value between -1.0 and 1.0, where -1.0 represents aligning the destinations to the top of the navigation rail, 0.0 represents aligning the destinations to the center, and 1.0 represents aligning the destinations to the bottom of the navigation rail. By setting the groupAlignmentForNavRail parameter, you can customize the vertical alignment of the reactive destinations in the navigation rail to match the design of your app.
final
hashCode int
The hash code for this object.
no setterinherited
indicatorColor Color?
The indicatorColor parameter in the ReactiveHome class is used to specify the color of the indicator in the navigation rail or navigation bar. The indicator is a visual element that highlights the currently selected destination. By setting the indicatorColor parameter, you can customize the color of the indicator to match the design of your app.
final
indicatorColorForNavBar Color?
The indicatorColorForNavBar parameter is used to specify the color of the indicator in the navigation bar. The indicator is a visual element that highlights the currently selected destination in the navigation bar. By setting the indicatorColorForNavBar parameter, you can customize the color of the indicator to match the design of your app.
final
indicatorColorForNavRail Color?
The indicatorColorForNavRail parameter is used to specify the color of the indicator in the navigation rail. The indicator is a visual element that highlights the currently selected destination in the navigation rail. By setting the indicatorColorForNavRail parameter, you can customize the color of the indicator to match the design of your app.
final
indicatorShape ShapeBorder?
The indicatorShape parameter in the ReactiveHome class is used to specify the shape of the indicator in the navigation rail or navigation bar. The indicator is a visual element that highlights the currently selected destination. By setting the indicatorShape parameter, you can customize the shape of the indicator to match the design of your app. The indicatorShape parameter takes a ShapeBorder object, which can be a predefined shape such as RoundedRectangleBorder or CircleBorder, or a custom shape created using the ShapeBorder class.
final
indicatorShapeForNavBar ShapeBorder?
The indicatorShapeForNavBar parameter is used to specify the shape of the indicator in the navigation bar. The indicator is a visual element that highlights the currently selected destination in the navigation bar. By setting the indicatorShapeForNavBar parameter, you can customize the shape of the indicator to match the design of your app. The indicatorShapeForNavBar parameter takes a ShapeBorder object, which can be a predefined shape such as RoundedRectangleBorder or CircleBorder, or a custom shape created using the ShapeBorder class.
final
indicatorShapeForNavRail ShapeBorder?
Overrides the default value of NavigationRail's selection indicator shape, when useIndicator is true.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelBehaviorForNavBar NavigationDestinationLabelBehavior?
The labelBehaviorForNavBar parameter in the ReactiveHome class is used to specify the behavior of the labels in the navigation bar. It determines how the labels are displayed when there is limited space in the navigation bar.
final
labelTypeForNavRail NavigationRailLabelType
Defines the layout and behavior of the labels for the default, unextended NavigationRail.
final
leadingForNavRail Widget?
The leading widget in the rail that is placed above the destinations.
final
minExtendedWidthForNavRail double?
The final width when the animation is complete for setting extended to true. This is only used when extended is set to true. The default value is 256.
final
minWidthForNavRail double?
The smallest possible width for the rail regardless of the destination's icon or label size.
final
mobileWhenWidthIs double
Specfiy at what screen width you want the mobile view (bottomNavBar)
final
pages List<Widget>
The required this.pages parameter in the ReactiveHome class is used to specify the list of pages that will be displayed in the widget. It is marked as required, which means that it must be provided when creating an instance of the ReactiveHome widget. The pages parameter is a list of Widget objects, representing the different pages that will be shown in the widget.
final
reactiveDestinations List<ReactiveDestination>
The reactiveDestinations; is a parameter in the ReactiveHome class. It is used to specify the list of ReactiveDestination objects that will be displayed in the widget. The ReactiveDestination class represents a destination in the navigation rail or navigation bar. Each ReactiveDestination object contains properties such as an icon, label, and route. These properties define how each destination will be displayed in the navigation rail or navigation bar.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedIconThemeForNavRail IconThemeData?
The visual properties of the icon in the selected destination.
final
selectedLabelTextStyleForNavRail TextStyle?
The TextStyle of a destination's label when it is selected.
final
shadowColorForNavBar Color?
The shadowColorForNavBar parameter is used to specify the color of the shadow that appears below the navigation bar in the ReactiveHome widget. By setting the shadowColorForNavBar parameter, you can customize the color of the shadow to match the design of your app.
final
trailingForNavRail Widget?
The trailing widget in the rail that is placed below the destinations.
final
unselectedIconThemeForNavRail IconThemeData?
The visual properties of the icon in the unselected destination.
final
unselectedLabelTextStyleForNavRail TextStyle?
The TextStyle of a destination's label when it is unselected.
final
useIndicatorForNavRail bool?
If true, adds a rounded NavigationIndicator behind the selected destination's icon.
final

Methods

algn({double? hf, double? wf, Al al = Al.c}) Align

Available on Widget, provided by the AlignCntrExt extension

The function algn returns an Align widget with specified alignment, height factor, width factor, and child.
asptRto(double aspectRatio) AspectRatio

Available on Widget, provided by the AspectRatioExt extension

The function asptRto returns an AspectRatio widget with a specified aspect ratio and child widget.
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
changePage(int index) → void
inherited
cntr({double? hf, double? wf}) Center

Available on Widget, provided by the AlignCntrExt extension

The function cntr takes in optional parameters hf and wf and returns a Center widget with the specified height and width factors, and the child widget.
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
expd({int flex = 1}) Expanded

Available on Widget, provided by the ExpandedExt extension

The function expd returns an Expanded widget with a specified flex value and child widget.
expdH() SizedBox

Available on Widget, provided by the ExpandedExt extension

The function expdH returns a SizedBox widget with a height of double.infinity and a child widget wrapped in an Expanded widget.
expdW() SizedBox

Available on Widget, provided by the ExpandedExt extension

The function expdW returns a SizedBox widget with the width set to double.infinity and a child widget wrapped in an Expanded widget.
fitdbx({Al al = Al.c, Clip clpbhvr = Clip.antiAlias, BoxFit fit = BoxFit.contain, Key? key}) FittedBox

Available on Widget, provided by the FittedBoxExt extension

The function fitdbx returns a FittedBox widget with specified alignment, clip behavior, fit, and child.
flxbl({FlexFit fit = FlexFit.loose, int flex = 1}) Flexible

Available on Widget, provided by the ExpandedExt extension

The function flxbl returns a Flexible widget with specified fit and flex properties, and the child widget.
fracSzdBox({double? hf, double? wf, Al al = Al.c}) FractionallySizedBox

Available on Widget, provided by the FracSzdBox extension

The fracSzdBox function returns a FractionallySizedBox widget with optional height and width factors and alignment.
limtdbx({double mxH = double.infinity, double mxW = double.infinity}) LimitedBox

Available on Widget, provided by the LimitedBoxExt extension

The function limtdbx returns a LimitedBox widget with specified maximum height and width, and the child widget as its child.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
p(double val) Padding

Available on Widget, provided by the PaddingExt extension

The function p returns a Padding widget with a specified padding value and the child widget.
p12() Padding

Available on Widget, provided by the PaddingExt extension

The function p12 returns a Padding widget with a padding of 12 pixels on all sides and the child widget passed to it.
p16() Padding

Available on Widget, provided by the PaddingExt extension

The function p16 returns a Padding widget with a padding of 16 pixels on all sides and the child widget passed to it.
p20() Padding

Available on Widget, provided by the PaddingExt extension

The function p20 returns a Padding widget with a padding of 20 pixels on all sides and the child widget passed to it.
p24() Padding

Available on Widget, provided by the PaddingExt extension

The function p24 returns a Padding widget with a padding of 24.0 on all sides and the child widget as its child.
ph(double p) Padding

Available on Widget, provided by the PaddingExt extension

The function ph returns a Padding widget with horizontal padding of p and the child widget.
ph12() Padding

Available on Widget, provided by the PaddingExt extension

The function ph12 returns a Padding widget with horizontal padding of 12.0.
ph16() Padding

Available on Widget, provided by the PaddingExt extension

The function ph16 returns a Padding widget with horizontal padding of 16.0.
ph20() Padding

Available on Widget, provided by the PaddingExt extension

The function ph20 returns a Padding widget with a horizontal padding of 20.
ph24() Padding

Available on Widget, provided by the PaddingExt extension

The function adds horizontal padding of 24 pixels to a widget.
pLRB({double p = 12.0, double? l, double? r, double? b}) Padding

Available on Widget, provided by the PaddingExt extension

The function pLRB returns a Padding widget with customizable padding values for left, right, and bottom, or a default value if not provided.
pLRT({double p = 12.0, double? l, double? r, double? t}) Padding

Available on Widget, provided by the PaddingExt extension

The function pLRT returns a Padding widget with customizable padding values for left, right, and top, or a default value if not provided.
pLTRB(double l, double t, double r, double b) Padding

Available on Widget, provided by the PaddingExt extension

The function pLTRB returns a Padding widget with specified left, top, right, and bottom padding values.
pOnly({double l = 0, double r = 0, double t = 0, double b = 0}) Padding

Available on Widget, provided by the PaddingExt extension

The function pOnly returns a Padding widget with specified padding values for left, right, top, and bottom.
pos({double? h, double? w, double? l, double? r, double? b, double? t, Key? key}) Positioned

Available on Widget, provided by the PositionedExt extension

The pos function returns a Positioned widget with specified positioning properties and a child widget.
psymtc({double h = 0.0, double v = 0.0}) Padding

Available on Widget, provided by the PaddingExt extension

The psymtc function returns a Padding widget with the specified horizontal and vertical padding values.
pv(double p) Padding

Available on Widget, provided by the PaddingExt extension

The function pv returns a Padding widget with vertical padding of p and the child widget as its child.
pv12() Padding

Available on Widget, provided by the PaddingExt extension

The function pv12 returns a Padding widget with a vertical padding of 12.0.
pv16() Padding

Available on Widget, provided by the PaddingExt extension

The function pv16 returns a Padding widget with a vertical padding of 16.0.
pv20() Padding

Available on Widget, provided by the PaddingExt extension

The function pv20 returns a Padding widget with a vertical padding of 20.
pv24() Padding

Available on Widget, provided by the PaddingExt extension

The function adds vertical padding of 24.0 units to a given widget.
setIndex(int index) → void
inherited
slivadapt({Key? key}) SliverToBoxAdapter

Available on Widget, provided by the SliverToBoxAdaptarExt extension

The function slivadapt returns a SliverToBoxAdapter widget with the given key and child.
szdbox({double? h, double? w}) SizedBox

Available on Widget, provided by the SizedBoxExtWidget extension

The szdbox function returns a SizedBox widget with the specified height, width, and child.
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, int wrapWidth = 65}) 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