StackedAvatar class

스택된 아바타(사진)

children 에는 Avatar 또는 UserAvatar 를 사용하면 된다. children 에 자식 위젯이 없으면 빈 공간만 나타난다. 즉, 아무것도 나타나지 않는다.

size 는 크기를 나타내며, 가로/세로 동일한 크기이다. children 의 수에 따라서 가로 크기가 결정된다.

borderWidth 의 값이 0 이면 테두리가 없다. 기본값은 2 이다. 주의 할 것은, 테두리가 있으면 테두리의 크기만큼 size 가 줄어든다. 예를 들어, size 가 48 이고, borderWidth 가 2 이면, 실제 child의 크기는 44 가 되므로 적절하게 조절을 하여야 한다.

leftFactor 는 왼쪽으로 이동하는 정도를 나타내며, 0.5 를 기본값으로 한다. 0.5 는 size 의 절반만큼 이동한다는 의미이다. 0.0 은 이동하지 않고, 1.0 은 size 의 크기만큼 이동한다. 0.2 로 하면, size 의 20% 만큼 이동한다.

주의, StackedAvatar 는 SizedBox 로 감싸서 최대 너비를 재한하고 있으므로, 가로 크기가 무제한으로 늘어나지 않는다. 1 개이면 size 만큼, 2 개이면 size + size * leftFactor 만큼 커진다.

Inheritance

Constructors

StackedAvatar({Key? key, required List<Widget> children, double size = 48, double radius = 20, double borderWidth = 2, double leftFactor = 0.5})
const

Properties

borderWidth double
final
children List<Widget>
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leftFactor double
final
radius double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size double
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