PersistentTabViewBase class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PersistentTabViewBase
- Implementers
- Available extensions
Constructors
-
PersistentTabViewBase.new({Key? key, List<
Widget> screens = const [], PersistentTabController? controller, Widget? floatingActionButton, HideOnScrollSettings hideOnScrollSettings = const HideOnScrollSettings(), EdgeInsets margin = EdgeInsets.zero, bool confineToSafeArea = true, bool handleAndroidBackButtonPress = true, double? bottomScreenMargin, bool resizeToAvoidBottomInset = true, bool stateManagement = true, NavBarAnimationSettings animationSettings = const NavBarAnimationSettings(), bool isVisible = true, BuildContext? context, List<PersistentBottomNavBarItem> items = const [], Color? backgroundColor, ValueChanged<int> ? onItemSelected, NavBarDecoration decoration = const NavBarDecoration(), EdgeInsets padding = EdgeInsets.zero, NeumorphicProperties? neumorphicProperties, Widget? customWidget, int itemCount = 0, Future<bool> onWillPop(BuildContext)?, bool isCustomWidget = false, dynamic selectedTabScreenContext(BuildContext)?, }) -
const
Properties
- animationSettings → NavBarAnimationSettings
-
Navigation Bar animation properties.
final
- backgroundColor → Color?
-
Background color of bottom navigation bar.
white
by default.final - bottomScreenMargin → double?
-
Bottom margin of the screen.
final
- confineToSafeArea → bool
-
Will confine the NavBar's items in the safe area defined by the device.
final
- context → BuildContext?
-
final
- controller → PersistentTabController?
-
Controller for persistent bottom navigation bar. Will be declared if left empty.
final
-
final
- customWidget → Widget?
-
Custom navigation bar widget. To be only used when
navBarStyle
is set toNavBarStyle.custom
.final - decoration → NavBarDecoration
-
Specifies the curve properties of the NavBar.
final
- floatingActionButton → Widget?
-
A custom widget which is displayed at the bottom right of the display at all times.
final
- handleAndroidBackButtonPress → bool
-
Handles android back button actions. Defaults to
true
.final - hashCode → int
-
The hash code for this object.
no setterinherited
-
final
- hideOnScrollSettings → HideOnScrollSettings
-
When these scroll controllers detect a scroll down motion, the navigation bar hides automatically. A hidden navigation bar appears again when scroll up motion is detected.
final
- isCustomWidget → bool
-
final
- isVisible → bool
-
Hides the navigation bar with an transition animation. Use it in conjuction with Provider for better results.
final
- itemCount → int
-
If using
custom
navBarStyle, define this instead of theitems
propertyfinal -
items
→ List<
PersistentBottomNavBarItem> -
List of persistent bottom navigation bar items to be displayed in the navigation bar.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsets
-
The margin around the navigation bar.
final
-
Specifies the navBarHeight
final
-
final
-
final
-
Style for persistent bottom navigation bar. Accepts
NavBarStyle
to determine the theme.final - neumorphicProperties → NeumorphicProperties?
-
Style the
neumorphic
navigation bar item.final -
onItemSelected
→ ValueChanged<
int> ? -
Callback when page or tab change is detected.
final
-
onWillPop
→ Future<
bool> Function(BuildContext)? -
If you want to perform a custom action on Android when exiting the app, you can write your logic here.
final
- padding → EdgeInsets
-
padding
for the persistent navigation bar content.final -
Defines the pop behavior when an already selected nav bar item/tab is pressed.
final
- resizeToAvoidBottomInset → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
screens
→ List<
Widget> -
Screens that will be displayed on tapping of persistent bottom navigation bar items.
final
- selectedTabScreenContext → dynamic Function(BuildContext)?
-
final
- stateManagement → bool
-
Preserves the state of each tab's screen.
true
by default.final
Methods
-
animate(
{Key? key, List< Effect> ? effects, AnimateCallback? onInit, AnimateCallback? onPlay, AnimateCallback? onComplete, bool? autoPlay, Duration? delay, AnimationController? controller, Adapter? adapter, double? target, double? value}) → Animate -
Available on Widget, provided by the AnimateWidgetExtensions extension
Wraps the target Widget in an Animate instance, and returns the instance for chaining calls. Ex.myWidget.animate()
is equivalent toAnimate(child: myWidget)
. -
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _PersistentTabViewState -
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, 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