EnhanceNumberCard class
强化数字展示的组件
使用场景:强化数字、字母部分。比如 成交量\30. 其中30是重点展示的信息,字体是特殊的字体。 该组件会将上述的单个组件,以流式的方式 流下来。
该组件可以通过rowCount属性来控制,每一行具体的显示几个。
该组件需要配合NumberInfoItemModel使用,NumberInfoItemModel是每个元素的单独模型。
布局规则
1:每一行展示指定个数的Item,其中多余指定个数 则换行。
如果行中Item的个数多于一个 则平分屏幕
2:item的左右间距是rightPadding
,默认是20。
行与行之间的间距是runningSpace,默认是16
3:item的上下两部分的间距是itemRunningSpace,默认是8。
4:在强化的数字信息前后分别可以设置 辅助信息
NumberInfoWidget( rowCount: 2, itemChildren: NumberInfoItemModel( title: '数字信息数字信息数字信息数字信息数字信息数字信息', number: '3', preDesc: '前', lastDesc: '后', ), NumberInfoItemModel( title: '数字信息', number: '3', preDesc: '前', lastDesc: '后', iconTapCallBack: (data) {}), NumberInfoItemModel( title: '数字信息', number: '3', preDesc: '前', lastDesc: '后', ), NumberInfoItemModel( title: '数字信息', number: '3', preDesc: '前', lastDesc: '后', ), , ),
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- EnhanceNumberCard
Constructors
-
EnhanceNumberCard({Key? key, List<
NumberInfoItemModel> ? itemChildren, int rowCount = 3, double? runningSpace, double? itemRunningSpace, EdgeInsets padding = const EdgeInsets.only(left: 20, right: 20), Color backgroundColor = Colors.white, TextAlign itemTextAlign = TextAlign.left, EnhanceNumberCardConfig? themeData}) -
create BrnEnhanceNumberCard
const
Properties
- backgroundColor → Color
-
背景色 默认为白色
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
itemChildren
→ List<
NumberInfoItemModel> ? -
待展示的信息
final
- itemRunningSpace → double?
-
Item的上半部分和下半部分的间距 默认为8
final
- itemTextAlign → TextAlign
-
文本内容对齐方式
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- padding → EdgeInsets
-
左侧的间距 默认20
final
- rowCount → int
-
每一行显示的数量 默认为3
final
- runningSpace → double?
-
如果超过一行,行间距则 默认为16
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- themeData → EnhanceNumberCardConfig?
-
the theme config of BrnEnhanceNumberCard
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
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
-
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