ItemNormalWidget class

Inheritance

Constructors

ItemNormalWidget({Key? key, Widget? leading, required Widget title, Widget? subtitle, Widget? trailing, EdgeInsetsGeometry? contentPadding, GestureTapCallback? onTap})
const

Properties

contentPadding EdgeInsetsGeometry?
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading Widget?
final
onTap GestureTapCallback?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subtitle Widget?
final
title Widget
final
trailing Widget?
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}) 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

Static Methods

divideTiles({required Iterable<Widget> childs, Divider divider = const Divider(height: 0.0)}) Iterable<Widget>
给行布局添加底部线条, 默认使用ThemeDataDivider绘制线条 例: ItemNormalWidget布局原生中会绘制底部线条 ListView(
headItem({Widget? leading, required String title, String? subtitle, int? subtitleMaxLines, GestureTapCallback? onTap}) Widget
基础Item定义, onTap不为空时显示右侧小箭头 icon 左侧图标,可不定义
item({Icon? icon, required String title, String? subtitle, Widget? trailing = const Icon(Icons.chevron_right), GestureTapCallback? onTap}) Widget
基础Item定义, onTap不为空时显示右侧小箭头 icon 左侧图标,可不定义
selectItem({Widget? leading, required String title, String? subtitle, GestureTapCallback? onTap}) Widget
右侧无图标selectItem定义 icon 左侧图标,可不定义
switchItem({Icon? icon, required String title, bool value = false, ValueChanged<bool>? onChanged}) Widget
switch定义, onChanged icon 左侧图标,可不定义