circulito 0.2.0
circulito: ^0.2.0 copied to clipboard
Circulito provides a simple circular wheel chart for visualizing data using percentages and colors.
Circulito #
Circulito provides a simple circular wheel chart for visualizing data using percentages and colors.
Features #
- Display circular wheel charts with customizable sections.
- Easily visualize data by providing percentages and corresponding colors.
Getting started #
Add the package to your pubspec.yaml file:
dependencies:
circulito: ^0.1.0
Usage #
Use the Circulito widget in your Flutter app:
Circulito(
maxSize: 500,
strokeWidth: 50,
backgroundColor: Colors.grey,
padding: const EdgeInsets.all(20),
strokeCap: CirculitoStrokeCap.round,
sections: [
// Male percentage.
CirculitoSection(color: Colors.blue, percentage: 0.45),
// Female percentage.
CirculitoSection(color: Colors.pink, percentage: 0.35),
],
child: const Center(child: Text('Genders')),
),
Parameters #
maxSize: The maximum size the widget can grow inside its parent.
strokeWidth: The width of the stroke that defines the chart's outline.
strokeCap: The type of cap to use for the stroke (round or butt).
startPoint: Determines the start point of the wheel.
circulitoDirection: Determines the direction of the wheel.
backgroundColor: The background color of the wheel to be painted.
padding: The padding to be applied to the widget.
sections: A list of CirculitoSection objects representing each chart section.
isCentered: Whether the widget should be centered or not inside the parent widget.
child: The widget to be shown over the wheel.
License #
This project is licensed under the MIT License - see the LICENSE file for details.