🌟 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),
    );

Libraries

canvas_helper
click_listener
color_helper
cricle_shape
hexagon_shape
pentagon_shape
rectangle_shape
rounded_letter
shape
shape_configuration
shape_type
triangle_shape

Dart

dart:ui
Built-in types and core primitives for a Flutter application. [...]

Core

dart:async
Support for asynchronous programming, with classes such as Future and Stream. [...]
dart:collection
Classes and utilities that supplement the collection support in dart:core. [...]
dart:convert
Encoders and decoders for converting between different data representations, including JSON and UTF-8. [...]
dart:core
Built-in types, collections, and other core functionality for every Dart program. [...]
dart:developer
Interact with developer tools such as the debugger and inspector. [...]
dart:math
Mathematical constants and functions, plus a random number generator. [...]
dart:typed_data
Lists that efficiently handle fixed sized data (for example, unsigned 8 byte integers) and SIMD numeric types. [...]

VM

dart:io
File, socket, HTTP, and other I/O support for non-web applications. [...]
dart:isolate
Concurrent programming using isolates: independent workers that are similar to threads but don't share memory, communicating only via messages. [...]