ProfilePhoto class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ProfilePhoto
Constructors
-
ProfilePhoto({required double totalWidth, required Color color, int outlineWidth = 0, double cornerRadius = 10, Color outlineColor = Colors.lightBlue, VoidCallback? onTap, VoidCallback? onLongPress, String name = '', NameDisplayOptions? nameDisplayOption = NameDisplayOptions.initials, Color? fontColor, String? fontFamily, FontWeight? fontWeight, int textPadding = 10, ImageProvider<
Object> ? image, bool? showName, Alignment badgeAlignment = Alignment.bottomRight, ImageProvider<Object> ? badgeImage, double badgeSize = 0, Key? key})
Properties
- badgeAlignment → Alignment
-
Alignment of the badge. Default is bottom right.
final
-
badgeImage
→ ImageProvider<
Object> ? -
Image to be shown as a badge in the corner of the ProfilePhoto.
final
- badgeSize → double
-
Size of the badge. Default is 0.
final
- color → Color
-
Sets the main color to show if there is no image.
final
- cornerRadius → double
-
Sets the radius of ProfilePhoto. Defualt is 10. (for a circle set equal to totalWidth).
final
- fontColor → Color?
-
Font color to use if a name is visible.
final
- fontFamily → String?
-
Font to use if a name is visible.
final
- fontWeight → FontWeight?
-
Sets the font weight of the name if visible.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
image
→ ImageProvider<
Object> ? -
Image to be displayed.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- name → String
-
users name, which can be showed or not in various ways using nameDisplayOptions.
final
- nameDisplayOption → NameDisplayOptions?
-
Sets various ways a name can be shown. Defualt is initials.
final
- onLongPress → VoidCallback?
-
onLongPress callback.
final
- onTap → VoidCallback?
-
onTap callback.
final
- outlineColor → Color
-
Sets the color of the outer edge. If outlineWidth == 0, this doesn't do anything.
final
- outlineWidth → int
-
Sets the width of the outer edge of the ProfilePhoto. Default is 0. (inset from totalWidth).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showName → bool?
-
Bool to set if the name should be visible. By default, true if there is no image, false if there is an image set.
final
- textPadding → int
-
Sets spacing (top, right, bottom & left) around name if its visible. Defualt is 10.
final
- totalWidth → double
-
Sets the total width and height of the 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