Skip to content

Files

Latest commit

 

History

History
71 lines (50 loc) · 3.51 KB

gf-avatar.md

File metadata and controls

71 lines (50 loc) · 3.51 KB
description
GF Flutter Avatar Widgets come with lots of custom properties like Square, Circle shape and also can use with Badge or other GF widgets.

GF Flutter Avatar

Flutter Avatar Widget

GFAvatar is a Flutter Avatar which is an image basically used to display the user picture in the profile section. GFAvatar has different shapes wherein the popular is a Circular Avatar.

GF Flutter Circle Avatar

The Flutter Circle Avatar widget has a circle shape image**. GFAvatar** comes with different shapes, in which one of the default shapes is a circle. To place the image inside the GFAvatar, the image should be given inbackgroundImageproperty. The below code shows a simple Circle Avatar.

Flutter Circle Avatar

import 'package:getwidget/getwidget.dart';

GFAvatar(
  backgroundImage:NetworkImage(AvatarUrl),
)

GF Flutter Standard Avatar

GFAvatar has another type of avatar called Standard Avatar. It is a Square shape avatar with slightly rounded corners as shown in the below image. The code below gives a Standard Square Avatar.

Flutter Standard Square Avatar

import 'package:getwidget/getwidget.dart';

GFAvatar(
  backgroundImage:NetworkImage(AvatarUrl),
  shape: GFAvatarShape.standard
)

GF Flutter Square Avatar

GFAvatar has another type of avatar called Square Avatar. It is a Square shape avatar with no rounded corners as shown in the below image. The code below gives a Standard Avatar.

Flutter Square Avatar Widget

import 'package:getwidget/getwidget.dart';

GFAvatar(
  backgroundImage:NetworkImage(AvatarUrl),
  shape: GFAvatarShape.square
)

GF Avatar Custom Properties:

The look and feel of GFAvatar can be customized using the following properties:

Name Description
child type of [Widget], which can have text, icon, etc
backgroundColor GFColor or Color to fill the background of the avatar
foregroundColor GFColor or Color to change the textColor inside the avatar
radius size of the avatar
minRadius minimum size of the avatar
maxRadius maximum size of the avatar
size size of the avatar i.e GFSize.large, GFSize.medium, GFSize.small
shape shape of the avatar i.e, GFAvatarShape.standard, GFAvatarShape.circle, GFAvatarShape.square
borderRadius extra radius to avatar shapes, not applicable to the circular avatar