TxSquareAvatar class
展示图标或用户名称的方形框。
参数说明请参考CircleAvatar
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- TxSquareAvatar
Constructors
-
TxSquareAvatar.new({Key? key, Widget? child, Color? backgroundColor, ImageProvider<
Object> ? backgroundImage, ImageProvider<Object> ? foregroundImage, ImageErrorListener? onBackgroundImageError, ImageErrorListener? onForegroundImageError, Color? foregroundColor, double? radius, double? minRadius, double? maxRadius, BorderRadiusGeometry? borderRadius, BoxFit? foregroundImageFit, BoxFit? backgroundImageFit}) -
const
Properties
- backgroundColor → Color?
-
用于填充圆圈的颜色。更改背景颜色将导致头像动画化为新颜色。
final
-
backgroundImage
→ ImageProvider<
Object> ? -
圆圈的背景图像。更改背景图像将导致头像动画化为新图像。
final
- backgroundImageFit → BoxFit?
-
backgroundImage 的填充方式
final
- borderRadius → BorderRadiusGeometry?
-
圆角大小
final
- child → Widget?
-
树中此小部件下方的小组件
final
- foregroundColor → Color?
-
圆圈中文本的默认文本颜色。
final
-
foregroundImage
→ ImageProvider<
Object> ? -
圆的前景图像。
final
- foregroundImageFit → BoxFit?
-
foregroundImage 的填充方式
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxRadius → double?
-
头像的最大大小,以半径(直径的一半)表示。
final
- minRadius → double?
-
头像的最小大小,以半径(直径的一半)表示
final
- onBackgroundImageError → ImageErrorListener?
-
加载 backgroundImage 时发出的错误的可选错误回调。
final
- onForegroundImageError → ImageErrorListener?
-
加载
前台图像
时发出的错误的可选错误回调。final - radius → double?
-
头像的大小,以半径(直径的一半)表示。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Constants
- defaultRadius → const double