circle_chart 1.0.0 copy "circle_chart: ^1.0.0" to clipboard
circle_chart: ^1.0.0 copied to clipboard

This is a library for creating an animated circle chart widget and add given other widget under the chart.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:circle_chart/circle_chart.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Circle chart Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: const MyHomePage(title: 'Circle chart Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  final String title;
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  @override
  MyHomePageState createState() => MyHomePageState();
}

class MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            CircleChart(
              progressNumber: 4,
              maxNumber: 10,
              children: [
                const Icon(Icons.arrow_upward),
                const Text(
                  'This is kind of circle chart.',
                ),
                Text(
                  "This is kind of description",
                  style: Theme.of(context).textTheme.headline4,
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
19
likes
130
pub points
52%
popularity

Publisher

unverified uploader

This is a library for creating an animated circle chart widget and add given other widget under the chart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

auto_size_text, flutter

More

Packages that depend on circle_chart