rounded_letter 0.0.6 copy "rounded_letter: ^0.0.6" to clipboard
rounded_letter: ^0.0.6 copied to clipboard

Useful Flutter widget which allows you to create letter inside shape. Can be used for placeholders (for example user avatars).

🌟 Rounded Letter #

pub package

Useful Flutter widget which allows you to create letter inside shape. Can be used for placeholders (for example user avatars).

This package is named 'Rounded letter' because main idea was letter inside circle just like Android 5.0 contacts. Later idea has evolved into more shapes.

πŸ™ŒFeatures #

βœ”οΈ 5 shapes: Circle(default), Triangle, Rectangle, Pentagon, Hexagon
βœ”οΈ Customizable shape size and color, text size and color
βœ”οΈ Support for 1 and 2 letter(s)
βœ”οΈ Shape border
βœ”οΈ Support for gesture detection

πŸ”Œ Install #

dependencies:
  rounded_letter: ^0.0.5

πŸ’‘ Import #

import 'package:rounded_letter/rounded_letter.dart';

πŸ“· Screenshots #

❓ Usage #

//minimal example, with default circle size = 40, letter font size = 20 and blue color
RoundedLetter(letter: "A");

//circle with red color and circle size = 40 and letter font size = 20
RoundedLetter.withRedCircle("B", 40, 20);

//circle with green color and circle size = 40 and letter font size = 20
RoundedLetter.withGreenCircle("C", 40, 20);

//circle with blue color and circle size = 40 and letter font size = 20
RoundedLetter.withBlueCircle("D", 40, 20);

//rectangle
RoundedLetter(
      text: "JH",
      shapeColor: Color.fromARGB(255, 245, 127, 23),
      shapeType: ShapeType.rectangle,
      borderColor: Color.fromARGB(255, 0, 0, 0),
      borderWidth: 2,
    );

//triangle
RoundedLetter(
      text: "JH",
      shapeColor: Color.fromARGB(255, 245, 127, 23),
      shapeType: ShapeType.triangle,
      borderColor: Color.fromARGB(255, 0, 0, 0),
      borderWidth: 2,
    );
    
//pentagon
RoundedLetter(
      text: "JH",
      shapeColor: Color.fromARGB(255, 245, 127, 23),
      shapeType: ShapeType.pentagon,
      borderColor: Color.fromARGB(255, 0, 0, 0),
      borderWidth: 2,
    );
    
//hexagon
RoundedLetter(
      text: "JH",
      shapeColor: Color.fromARGB(255, 245, 127, 23),
      shapeType: ShapeType.hexagon,
      borderColor: Color.fromARGB(255, 0, 0, 0),
      borderWidth: 2,
    );
    
//full example:
RoundedLetter(
      text: "JH",
      shapeType: ShapeType.rectangle,
      fontColor: Color.fromARGB(255,255,255,255),
      shapeColor: Color.fromARGB(255, 245, 127, 23),
      shapeSize: 40,
      fontSize: 20,
      borderWidth: 2,
      borderColor: Color.fromARGB(255, 0, 0, 0),
    );
5
likes
40
pub points
61%
popularity

Publisher

unverified uploader

Useful Flutter widget which allows you to create letter inside shape. Can be used for placeholders (for example user avatars).

Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on rounded_letter