ReactiveHome class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ReactiveHome
- Available extensions
Constructors
-
ReactiveHome({Key? key, required List<
Widget> pages, required List<ReactiveDestination> reactiveDestinations, double mobileWhenWidthIs = 500, Color? backgroundColor, double? elevation, Color? indicatorColor, ShapeBorder? indicatorShape, }) -
The
ReactiveHomeclass is a widget that displays either aReactiveTabletViewor aReactiveMobileViewbased 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
-
The
animationDurationForNavBarparameter in theReactiveHomeclass is used to specify the duration of the animation when switching between different pages in the navigation bar. By setting theanimationDurationForNavBarparameter, 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 namedbackgroundColorfinal -
The
backgroundColorForNavBarparameter is used to specify the background color of the navigation bar in theReactiveHomewidget. By setting thebackgroundColorForNavBarparameter, you can customize the background color of the navigation bar to match the design of your app.final -
The
backgroundColorForNavRailparameter is used to specify the background color of the navigation rail in theReactiveHomewidget. By setting thebackgroundColorForNavRailparameter, you can customize the background color of the navigation rail to match the design of your app.final -
The
bottomNavBarHeightForNavBarparameter is used to specify the height of the bottom navigation bar in theReactiveHomewidget when using the navigation bar layout. By setting thebottomNavBarHeightForNavBarparameter, 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
elevationparameter in theReactiveHomeclass 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. Theelevationparameter takes adoublevalue, where a higher value will result in a higher elevation.final -
The
elevationForNavBarparameter is used to specify the elevation of the navigation bar in theReactiveHomewidget. 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 theelevationForNavBarparameter, you can customize the elevation of the navigation bar to match the design of your app.final -
The
elevationForNavRailparameter in theReactiveHomeclass 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 theelevationForNavRailparameter, you can customize the elevation of the navigation rail to match the design of your app.final -
Indicates that the NavigationRail should be in the extended state.
final
-
The
groupAlignmentForNavRailparameter in theReactiveHomeclass is used to specify the alignment of the reactive destinations in the navigation rail. It takes adoublevalue 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 thegroupAlignmentForNavRailparameter, 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
indicatorColorparameter in theReactiveHomeclass 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 theindicatorColorparameter, you can customize the color of the indicator to match the design of your app.final -
The
indicatorColorForNavBarparameter 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 theindicatorColorForNavBarparameter, you can customize the color of the indicator to match the design of your app.final -
The
indicatorColorForNavRailparameter 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 theindicatorColorForNavRailparameter, you can customize the color of the indicator to match the design of your app.final - indicatorShape → ShapeBorder?
-
The
indicatorShapeparameter in theReactiveHomeclass 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 theindicatorShapeparameter, you can customize the shape of the indicator to match the design of your app. TheindicatorShapeparameter takes aShapeBorderobject, which can be a predefined shape such asRoundedRectangleBorderorCircleBorder, or a custom shape created using theShapeBorderclass.final -
The
indicatorShapeForNavBarparameter 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 theindicatorShapeForNavBarparameter, you can customize the shape of the indicator to match the design of your app. TheindicatorShapeForNavBarparameter takes aShapeBorderobject, which can be a predefined shape such asRoundedRectangleBorderorCircleBorder, or a custom shape created using theShapeBorderclass.final -
Overrides the default value of NavigationRail's selection indicator shape,
when
useIndicatoris true.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
The
labelBehaviorForNavBarparameter in theReactiveHomeclass 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 -
Defines the layout and behavior of the labels for the default, unextended
NavigationRail.
final
-
The leading widget in the rail that is placed above the destinations.
final
-
The final width when the animation is complete for setting
extendedto true. This is only used whenextendedis set to true. The default value is 256.final -
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.pagesparameter in theReactiveHomeclass is used to specify the list of pages that will be displayed in the widget. It is marked asrequired, which means that it must be provided when creating an instance of theReactiveHomewidget. Thepagesparameter is a list ofWidgetobjects, representing the different pages that will be shown in the widget.final -
reactiveDestinations
→ List<
ReactiveDestination> -
The
reactiveDestinations;is a parameter in theReactiveHomeclass. It is used to specify the list ofReactiveDestinationobjects that will be displayed in the widget. TheReactiveDestinationclass represents a destination in the navigation rail or navigation bar. EachReactiveDestinationobject 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
-
The visual properties of the icon in the selected destination.
final
-
The TextStyle of a destination's label when it is selected.
final
-
The
shadowColorForNavBarparameter is used to specify the color of the shadow that appears below the navigation bar in theReactiveHomewidget. By setting theshadowColorForNavBarparameter, you can customize the color of the shadow to match the design of your app.final -
The trailing widget in the rail that is placed below the destinations.
final
-
The visual properties of the icon in the unselected destination.
final
-
The TextStyle of a destination's label when it is unselected.
final
-
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 functionalgnreturns anAlignwidget with specified alignment, height factor, width factor, and child. -
asptRto(
double aspectRatio) → AspectRatio -
Available on Widget, provided by the AspectRatioExt extension
The functionasptRtoreturns anAspectRatiowidget 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 functioncntrtakes in optional parametershfandwfand returns aCenterwidget 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 functionexpdreturns anExpandedwidget with a specified flex value and child widget. -
expdH(
) → SizedBox -
Available on Widget, provided by the ExpandedExt extension
The functionexpdHreturns aSizedBoxwidget with a height ofdouble.infinityand a child widget wrapped in anExpandedwidget. -
expdW(
) → SizedBox -
Available on Widget, provided by the ExpandedExt extension
The functionexpdWreturns aSizedBoxwidget with the width set todouble.infinityand a child widget wrapped in anExpandedwidget. -
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 functionfitdbxreturns aFittedBoxwidget 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 functionflxblreturns aFlexiblewidget with specifiedfitandflexproperties, and the child widget. -
fracSzdBox(
{double? hf, double? wf, Al al = Al.c}) → FractionallySizedBox -
Available on Widget, provided by the FracSzdBox extension
ThefracSzdBoxfunction returns aFractionallySizedBoxwidget 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 functionlimtdbxreturns aLimitedBoxwidget 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 functionpreturns aPaddingwidget with a specified padding value and the child widget. -
p12(
) → Padding -
Available on Widget, provided by the PaddingExt extension
The functionp12returns aPaddingwidget 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 functionp16returns aPaddingwidget 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 functionp20returns aPaddingwidget 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 functionp24returns aPaddingwidget 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 functionphreturns aPaddingwidget with horizontal padding ofpand the child widget. -
ph12(
) → Padding -
Available on Widget, provided by the PaddingExt extension
The functionph12returns aPaddingwidget with horizontal padding of 12.0. -
ph16(
) → Padding -
Available on Widget, provided by the PaddingExt extension
The functionph16returns aPaddingwidget with horizontal padding of 16.0. -
ph20(
) → Padding -
Available on Widget, provided by the PaddingExt extension
The functionph20returns aPaddingwidget 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 functionpLRBreturns aPaddingwidget 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 functionpLRTreturns aPaddingwidget 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 functionpLTRBreturns aPaddingwidget 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 functionpOnlyreturns aPaddingwidget 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
Theposfunction returns aPositionedwidget 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
Thepsymtcfunction returns aPaddingwidget with the specified horizontal and vertical padding values. -
pv(
double p) → Padding -
Available on Widget, provided by the PaddingExt extension
The functionpvreturns aPaddingwidget with vertical padding ofpand the child widget as its child. -
pv12(
) → Padding -
Available on Widget, provided by the PaddingExt extension
The functionpv12returns aPaddingwidget with a vertical padding of 12.0. -
pv16(
) → Padding -
Available on Widget, provided by the PaddingExt extension
The functionpv16returns aPaddingwidget with a vertical padding of 16.0. -
pv20(
) → Padding -
Available on Widget, provided by the PaddingExt extension
The functionpv20returns aPaddingwidget 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 functionslivadaptreturns aSliverToBoxAdapterwidget with the given key and child. -
szdbox(
{double? h, double? w}) → SizedBox -
Available on Widget, provided by the SizedBoxExtWidget extension
Theszdboxfunction returns aSizedBoxwidget 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