TDNavBar class

Inheritance
Implemented types

Constructors

TDNavBar({Key? key, List<TDNavBarItem>? leftBarItems, List<TDNavBarItem>? rightBarItems, Widget? titleWidget, String? title, Color? titleColor, Font? titleFont, FontFamily? titleFontFamily, FontWeight? titleFontWeight = FontWeight.w500, bool centerTitle = true, double opacity = 1.0, Color? backgroundColor, double titleMargin = 16, EdgeInsetsGeometry? padding, double height = 44, bool screenAdaptation = true, bool useDefaultBack = true, VoidCallback? onBack, bool useBorderStyle = false, TDNavBarItemBorder? border, Widget? belowTitleWidget})
const

Properties

backgroundColor Color?
背景颜色
final
belowTitleWidget Widget?
belowTitleWidget navbar 下方的widget
final
border TDNavBarItemBorder?
边框
final
centerTitle bool
标题是否居中
final
hashCode int
The hash code for this object.
no setterinherited
height double
高度
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leftBarItems List<TDNavBarItem>?
左边操作项
final
onBack VoidCallback?
返回事件
final
opacity double
透明度
final
padding EdgeInsetsGeometry?
内部填充
final
preferredSize Size
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
rightBarItems List<TDNavBarItem>?
右边操作项
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenAdaptation bool
是否进行屏幕适配,默认true
final
title String?
标题文案
final
titleColor Color?
标题颜色
final
titleFont Font?
标题字体尺寸
final
titleFontFamily FontFamily?
标题字体样式
final
titleFontWeight FontWeight?
标题字体粗细
final
titleMargin double
中间文案左右两边间距
final
titleWidget Widget?
标题控件,优先级高于title文案
final
useBorderStyle bool
是否使用边框模式
final
useDefaultBack bool
是否使用默认的返回
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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