text_drawable_flutter 0.0.2
text_drawable_flutter: ^0.0.2 copied to clipboard

To be able to show text avatar of text initials like contact app.

text_drawable_flutter #

A Flutter package for displaying initials in circle avatar same like android text drawable library.

Screenshot

Import it #

import 'package:text_drawable_flutter/text_drawable_flutter.dart';

Use it #

TextDrawable(
  text: 'Vishal Makasana',
  padding: EdgeInsets.all(12),
  length: 1,
)

TextDrawable Properties #

PropertyTypeDescription
textStringThe full text you wish to display the initials for. Only the length initials will be displayed.
lengthintThe length of how many initials will be shown?
heightdoubleHeight of the TextDrawable widget.
widthdoubleWidth of the TextDrawable widget. Defaults to 48.
backgroundColorColorBackground color to for the widget. If not specified, a random color will be generated.
textStyleTextStyleTextStyle for the text to be displayed. Default fontSize is 18. color is determined based on contrast with the backgroundColor.
boxShapeBoxShapeShape of the widget. Defaults to BoxShape.circle.
borderRadiusBorderRadiusGeometryBorder radius of the widget. Only specify this if boxShape == BoxShape.rectangle.
paddingEdgeInsetsGeometryDefault is EdgeInsets.all(8). To give space around text initials.

Example #

Take a look at the example file.

License #

This project has been licensed under the MIT License. Check the LICENSE file for the details.

2
likes
110
pub points
21%
popularity

Publisher

flutterly.in

To be able to show text avatar of text initials like contact app.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on text_drawable_flutter