flutter_avatar 0.1.0 copy "flutter_avatar: ^0.1.0" to clipboard
flutter_avatar: ^0.1.0 copied to clipboard

Various ready to use Avatars in your Flutter apps

flutter_avatar #

Various ready to use Avatars in your Flutter apps

Showcase 1 Showcase 2

Installing #

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  flutter_avatar: ^0.1.0

How To Use #

In your file add the following import:

import 'package:flutter_avatar/flutter_avatar.dart';

Create a FlutterAvatar widget:

  FlutterAvatar(
      backgroundColor: Colors.blue,
      radius: 50,
      shape: BoxShape.circle,
      avatarShadow: BoxShadow(
        color: Colors.blue.withOpacity(0.6),
        blurRadius: 15,
        spreadRadius: 5,
        offset: Offset(0, -1),
      ),
      child: Text(
        'TJ',
        style: TextStyle(
          fontSize: 35,
          color: Colors.white,
          fontWeight: FontWeight.bold,
        ),
      ),
    );

Customizations #

Property Description
radius The size of the [FlutterAvatar], which is half of the Diameter. Defaults to 20.
child The widget below this widget [FlutterAvatar] in the widget tree
borderRadius The corners of the [FlutterAvatar] are rounded by the value of the [borderRadius].
shape The shape to be used for the [FlutterAvatar], can be [BoxShape.circle] or [BoxShape.rectangle].
badge The title displayed to the user
badgePosition The title displayed to the user
avatarShadow The [avatarShadow] is cast behind the [FlutterAvatar] widget
backgroundColor The color used to fill the [FlutterAvatar]
elevation The elevation of the [FlutterAvatar] widget. Defaults to 5.0 if no value is given.
elevationColor The color of the [elevation]

Contributions #

Feel free to contribute to this project.

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.
If you fixed a bug or implemented a feature, please send a pull request.

3
likes
30
points
17
downloads

Publisher

verified publishertimilehinjegede.com

Weekly Downloads

Various ready to use Avatars in your Flutter apps

Repository (GitHub)

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_avatar