BaseCrossPlatformTabScaffold class
A cross-platform tab scaffold that provides bottom navigation for both platforms
For iOS/Cupertino: Uses CupertinoTabScaffold with CupertinoTabBar For Android/Material: Uses Scaffold with BottomNavigationBar
This widget handles the complete scaffold structure and tab management. Note: This is different from the existing BaseTabScaffold in the scaffold directory.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BaseStatelessWidget
- BaseCrossPlatformTabScaffold
Constructors
-
BaseCrossPlatformTabScaffold({Key? key, required List<
BottomNavigationBarItem> tabs, required IndexedWidgetBuilder tabBuilder, CupertinoTabController? controller, Color? backgroundColor, bool resizeToAvoidBottomInset = true, BaseAppBar? appBar, int currentIndex = 0, ValueChanged<int> ? onTap, BottomNavigationBarType type = BottomNavigationBarType.fixed, Color? selectedItemColor, Color? unselectedItemColor, double selectedFontSize = 14.0, double unselectedFontSize = 12.0, double iconSize = 24.0, double? elevation, bool showSelectedLabels = true, bool showUnselectedLabels = true, Color? activeColor, Color? inactiveColor, Border? border, double tabBarHeight = 50.0, BaseParam? baseParam}) -
const
Properties
- activeColor → Color?
-
Active color for Cupertino tab bar
final
- appBar → BaseAppBar?
-
Optional app bar (only used in Material mode)
final
- backgroundColor → Color?
-
Background color of the scaffold
final
- baseParam → BaseParam?
-
Personalization parameters, gets platform parameters first, then mode parameters
finalinherited
- border → Border?
-
Border for Cupertino tab bar
final
- controller → CupertinoTabController?
-
Optional controller for managing tab state
final
- currentIndex → int
-
Current selected tab index
final
- elevation → double?
-
Elevation of bottom navigation bar (Material only)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconSize → double
-
Size of tab icons
final
- inactiveColor → Color?
-
Inactive color for Cupertino tab bar
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onTap
→ ValueChanged<
int> ? -
Callback when a tab is tapped
final
- resizeToAvoidBottomInset → bool
-
Whether the body should resize when the keyboard appears
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedFontSize → double
-
Font size for selected labels
final
- selectedItemColor → Color?
-
Color of selected items
final
- showSelectedLabels → bool
-
Whether to show selected labels
final
- showUnselectedLabels → bool
-
Whether to show unselected labels
final
- tabBarHeight → double
-
Height of Cupertino tab bar
final
- tabBuilder → IndexedWidgetBuilder
-
Builder function for tab content
final
-
tabs
→ List<
BottomNavigationBarItem> -
List of tabs to display in the bottom navigation
final
- type → BottomNavigationBarType
-
Type of bottom navigation bar (Material only)
final
- unselectedFontSize → double
-
Font size for unselected labels
final
- unselectedItemColor → Color?
-
Color of unselected items
final
Methods
-
beforeBuild(
BuildContext context) → void -
Called before build
inherited
-
beforeBuildByCupertino(
BuildContext context) → void -
Called before buildByCupertino
inherited
-
beforeBuildByCupertinoNative(
BuildContext context) → void -
Called before buildByCupertinoNative (native iOS implementation)
inherited
-
beforeBuildByMaterial(
BuildContext context) → void -
Called before buildByMaterial
inherited
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
inherited
-
buildByCupertino(
BuildContext context) → Widget - build on cupertino mode (Flutter implementation)
-
buildByCupertinoNative(
BuildContext context) → dynamic -
build on cupertino mode with native iOS components (cupertino_native package)
This is called when baseParam.nativeIOS = true
Default implementation falls back to buildByCupertino()
inherited
-
buildByMaterial(
BuildContext context) → Widget - build on material mode
-
commonBuild(
BuildContext context, BaseParam? baseParam) → dynamic -
inherited
-
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
-
getBuildMode(
BaseParam? baseParam) → WidgetBuildMode -
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
-
valueOf(
String key, dynamic value) → dynamic -
inherited
-
valueOfBaseParam(
BaseParam? baseParam, String key, dynamic value) → dynamic -
No reflection available in Dart
First get value from platform, then from mode, finally from value itself
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited