flutter_circular_text 0.3.0

Circular Text Widget #

pub package

Installation #

Add dependency in pubspec.yaml:

dependencies:
  flutter_circular_text: "^0.3.0"

Import in your project:

import 'package:flutter_circular_text/circular_text.dart';

Basic usage #

CircularText(
  children: [
    TextItem(
      text: Text(
        "Chuck Norris".toUpperCase(),
        style: TextStyle(
          fontSize: 28,
          color: Colors.blue,
          fontWeight: FontWeight.bold,
        ),
      ),
      space: 12,
      startAngle: -90,
      startAngleAlignment: StartAngleAlignment.center,
      direction: CircularTextDirection.clockwise,
    ),
    TextItem(
      text: Text(
        "top 100 Facts".toUpperCase(),
        style: TextStyle(
          fontSize: 20,
          color: Colors.amberAccent,
          fontWeight: FontWeight.bold,
        ),
      ),
      space: 10,
      startAngle: 90,
      startAngleAlignment: StartAngleAlignment.center,
      direction: CircularTextDirection.anticlockwise,
    ),
  ],
  radius: 125,
  position: CircularTextPosition.inside,
  backgroundPaint: Paint()..color = Colors.grey.shade200,
)

Examples #

example project contains single and multi text demos

Demos #

Single Text Demo #

alt tag

Multi Text Demo #

Changelog #

Check Changelog for updates

Bugs/Requests #

Reporting issues and requests for new features are always welcome.

0.3.0 #

  • Added multi Text support
  • Added StartAngleAlignment property to align text around startAngle
  • Added single and multi text examples

0.2.1 #

  • Added Text, changed angle position and added some minor changes

0.2.0 #

  • Added support to handle PaintingStyle.stroke

0.1.0 #

  • Initial version

example/README.md

example #

Example project contains single and multi circular text demos.

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_circular_text: ^0.3.0

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:flutter_circular_text/circular_text.dart';
import 'package:flutter_circular_text/circular_text/model.dart';
import 'package:flutter_circular_text/circular_text/widget.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
75
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
87
Learn more about scoring.

We analyzed this package on Feb 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Fix lib/circular_text/widget.dart. (-0.50 points)

Analysis of lib/circular_text/widget.dart reported 1 hint:

line 150 col 8: The declaration '_debugDrawLines' isn't referenced.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test