Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhomlala/roundedletter
Rounded letter for flutter
https://github.com/jhomlala/roundedletter
dart flutter flutter-package flutter-widget
Last synced: 11 days ago
JSON representation
Rounded letter for flutter
- Host: GitHub
- URL: https://github.com/jhomlala/roundedletter
- Owner: jhomlala
- License: apache-2.0
- Created: 2019-01-04T17:29:17.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-02T17:20:50.000Z (almost 4 years ago)
- Last Synced: 2024-10-13T08:44:37.513Z (27 days ago)
- Topics: dart, flutter, flutter-package, flutter-widget
- Language: Dart
- Size: 1.39 MB
- Stars: 23
- Watchers: 2
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# :star2: Rounded Letter
[![pub package](https://img.shields.io/pub/v/rounded_letter.svg)](https://pub.dartlang.org/packages/rounded_letter)
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.
## :raised_hands:Features
:heavy_check_mark: 5 shapes: Circle(default), Triangle, Rectangle, Pentagon, Hexagon
:heavy_check_mark: Customizable shape size and color, text size and color
:heavy_check_mark: Support for 1 and 2 letter(s)
:heavy_check_mark: Shape border
:heavy_check_mark: Support for gesture detection## :electric_plug: Install
```yaml
dependencies:
rounded_letter: ^0.0.6
```### :bulb: Import
```dart
import 'package:rounded_letter/rounded_letter.dart';
```
### :camera: Screenshots
### :question: Usage
```dart
//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),
);
```