circulito 0.3.2 circulito: ^0.3.2 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.3.2
Usage #
Use the Circulito widget in your Flutter app:
Circulito(
maxSize: 480,
padding: 20.0,
strokeWidth: 80,
startPoint: StartPoint.left,
background: CirculitoBackground(),
strokeCap: CirculitoStrokeCap.round,
direction: CirculitoDirection.clockwise,
sectionValueType: SectionValueType.percentage,
sections: [
// Male percentage.
CirculitoSection(
value: .35,
color: Colors.blue,
hoverColor: Colors.blueAccent,
),
// Female percentage.
CirculitoSection(
value: .40,
color: Colors.pink,
hoverColor: Colors.pinkAccent,
),
],
);
Parameters #
background
: The background of the wheel to be painted.
child
: The widget to be shown over the wheel.
circulitoDirection:
Determines the direction of the wheel.
direction:
Determines the direction of the wheel.
isCentered:
Whether the widget should be centered or not inside the parent widget.
maxSize
: The maximum size the widget can grow inside its parent.
padding:
The padding to be applied to the widget.
sections
: A list of CirculitoSection objects representing each chart section.
startPoint:
Determines the start point of the wheel.
strokeCap
: The type of cap to use for the stroke (round or butt).
strokeWidth
: The width of the stroke that defines the chart's outline.
License #
This project is licensed under the MIT License - see the LICENSE file for details.