BaseTabBar class

BaseTabBar use CupertinoTabBar by cupertino *** not support cupertino = { forceUseMaterial: true }. use BottomNavigationBar by material *** not support material = { forceUseCupertino: true }.

Inheritance

Constructors

BaseTabBar({Key key, List<BaseBarItem> items, ValueChanged<int> onTap, int currentIndex = 0, double iconSize, Color backgroundColor, bool showIndicator = true, Color activeColor = CupertinoColors.activeBlue, Color inactiveColor = CupertinoColors.inactiveGray, Border border = const Border(top: BorderSide(color: _kDefaultTabBarBorderColor, width: 0.0, style: BorderStyle.solid)), double elevation = 8.0, BottomNavigationBarType type, Color fixedColor, Color selectedItemColor, Color unselectedItemColor, IconThemeData selectedIconTheme = const IconThemeData(), IconThemeData unselectedIconTheme = const IconThemeData(), double selectedFontSize = 14.0, double unselectedFontSize = 12.0, TextStyle selectedLabelStyle, TextStyle unselectedLabelStyle, bool showSelectedLabels = true, bool showUnselectedLabels, Map<String, dynamic> cupertino, Map<String, dynamic> material})
const

Properties

activeColor Color
*** general properties end *** *** cupertino properties start *** CupertinoTabBar.activeColor
final
backgroundColor Color
CupertinoTabBar.backgroundColor or BottomNavigationBar.backgroundColor
final
border Border
CupertinoTabBar.border
final
cupertino Map<String, dynamic>
final, inherited
currentIndex int
CupertinoTabBar.currentIndex or BottomNavigationBar.currentIndex
final
elevation double
*** cupertino properties end *** *** material properties start *** BottomNavigationBar.elevation
final
fixedColor Color
BottomNavigationBar.fixedColor
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
iconSize double
CupertinoTabBar.iconSize or BottomNavigationBar.iconSize
final
inactiveColor Color
CupertinoTabBar.inactiveColor
final
items List<BaseBarItem>
See also: [...]
final
key Key
*** general properties start ***
final
material Map<String, dynamic>
final, inherited
onTap ValueChanged<int>
CupertinoTabBar.onTap or BottomNavigationBar.onTap
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
selectedFontSize double
BottomNavigationBar.selectedFontSize
final
selectedIconTheme IconThemeData
BottomNavigationBar.selectedIconTheme
final
selectedItemColor Color
BottomNavigationBar.selectedItemColor
final
selectedLabelStyle TextStyle
BottomNavigationBar.selectedLabelStyle
final
showIndicator bool
when icon is null, then will add an indicator
final
showSelectedLabels bool
BottomNavigationBar.showSelectedLabels
final
showUnselectedLabels bool
BottomNavigationBar.showUnselectedLabels
final
type BottomNavigationBarType
BottomNavigationBar.type
final
unselectedFontSize double
BottomNavigationBar.unselectedFontSize
final
unselectedIconTheme IconThemeData
BottomNavigationBar.unselectedIconTheme
final
unselectedItemColor Color
BottomNavigationBar.unselectedItemColor
final
unselectedLabelStyle TextStyle
BottomNavigationBar.unselectedLabelStyle
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget. [...]
inherited
buildBefore(BuildContext context) → void
build之前调用
inherited
buildByCupertino(BuildContext context) Widget
build on cupertino mode
override
buildByCupertinoBefore(BuildContext context) → void
buildByCupertino之前调用
inherited
buildByMaterial(BuildContext context) Widget
build on material mode
override
buildByMaterialBefore(BuildContext context) → void
buildByMaterial之前调用
inherited
copyWith({ValueChanged<int> onTap, int currentIndex = 0}) BaseTabBar
*** material properties end *** 用户BaseTabScaffold里构建bottomNavigationBar
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. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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
valueFromCupertino(String key, dynamic value) → dynamic
从cupertino获取key对应的值, 如果为null取value的值, 如果还是null则取material里的值
inherited
valueFromMap(Map<String, dynamic> map, String key, dynamic value) → dynamic
从cupertino获取key对应的值, 如果为null取value的值, 如果还是null则取material里的值
inherited
valueFromMaterial(String key, dynamic value) → dynamic
从material获取key对应的值, 如果为null取value的值, 如果还是null则取cupertino里的值
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
@nonVirtual, inherited