flutter_avatar 0.1.0
flutter_avatar: ^0.1.0

Flutter Android iOS web

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 #

PropertyDescription
radiusThe size of the [FlutterAvatar], which is half of the Diameter. Defaults to 20.
childThe widget below this widget [FlutterAvatar] in the widget tree
borderRadiusThe corners of the [FlutterAvatar] are rounded by the value of the [borderRadius].
shapeThe shape to be used for the [FlutterAvatar], can be [BoxShape.circle] or [BoxShape.rectangle].
badgeThe title displayed to the user
badgePositionThe title displayed to the user
avatarShadowThe [avatarShadow] is cast behind the [FlutterAvatar] widget
backgroundColorThe color used to fill the [FlutterAvatar]
elevationThe elevation of the [FlutterAvatar] widget. Defaults to 5.0 if no value is given.
elevationColorThe 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.

2
likes
100
pub points
0%
popularity

Various ready to use Avatars in your Flutter apps

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

jegedetimilehin2001@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_avatar