rounded_letter 0.0.6

  • Readme
  • Changelog
  • Example
  • Installing
  • 89

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

0.0.6 #

  • Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library.

0.0.5 #

  • Added support for bold and italic text effect
  • Widget optimization

0.0.4 #

  • Added support for triangle, hexagon and pentagon
  • Added support for click detection. Use ClickListener to detect click. To get know which element was pressed, setup key parameter
  • Code refactor

0.0.3 #

  • Added border feature. Use borderWidth and borderColor to setup border.
  • Added rectangle shape. To use rectangle, specify shapeType: ShapeType.rectangle.
  • Added support for 2 letters.

0.0.2 #

  • Better letter M and W positioning
  • Code refactor
  • Bug fixes

0.0.1 #

  • Initial version

example/README.md

rounded_letter_example #

Demonstrates how to use the rounded_letter plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  rounded_letter: ^0.0.6

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:rounded_letter/rounded_letter.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
82
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
89
Learn more about scoring.

We analyzed this package on Dec 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-0.68 points)

91 out of 92 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/click_listener.dart.

Run flutter format to format lib/click_listener.dart.

Format lib/color_helper.dart.

Run flutter format to format lib/color_helper.dart.

Format lib/pentagon_shape.dart.

Run flutter format to format lib/pentagon_shape.dart.

Fix additional 5 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/rounded_letter.dart (Run flutter format to format lib/rounded_letter.dart.)
  • lib/shape.dart (Run flutter format to format lib/shape.dart.)
  • lib/shape_configuration.dart (Run flutter format to format lib/shape_configuration.dart.)
  • lib/shape_type.dart (Run flutter format to format lib/shape_type.dart.)
  • lib/triangle_shape.dart (Run flutter format to format lib/triangle_shape.dart.)

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8