Import
import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;Usage
const ui.Avatar(
name: 'Alex Morgan',
size: ui.ComponentSize.md,
)API Reference
The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.
Avatar
const Avatar({
super.key,
this.name,
this.initials,
this.imageUrl,
this.assetPath,
this.image,
this.fallbackIcon,
this.size,
this.dimension,
this.customSize,
this.shape = AvatarShape.circle,
this.backgroundColor,
this.foregroundColor,
this.borderRadius,
this.fit = BoxFit.cover,
this.showName = false,
this.nameSpacing,
this.placeholder,
});| Parameter | Type | Required | Default |
|---|---|---|---|
key | Key? | No | null |
name | String? | No | null |
initials | String? | No | null |
imageUrl | String? | No | null |
assetPath | String? | No | null |
image | ImageProvider<Object>? | No | null |
fallbackIcon | Widget? | No | null |
size | AvatarSize? | No | null |
dimension | double? | No | null |
customSize | double? | No | null |
shape | AvatarShape | No | AvatarShape.circle |
backgroundColor | Color? | No | null |
foregroundColor | Color? | No | null |
borderRadius | double? | No | null |
fit | BoxFit | No | BoxFit.cover |
showName | bool | No | false |
nameSpacing | double? | No | null |
placeholder | Widget? | No | null |
Application Setup
Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.
Source
lib/src/widgets/media/avatar/avatar.dart
This reference is generated from the Avatar declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

