bodychart_heatmap 1.0.1
bodychart_heatmap: ^1.0.1 copied to clipboard
A Flutter package for visualizing and highlighting human body parts. Supports heatmap intensity levels and body charts for fitness, medical, and anatomy apps.
bodychart_heatmap #
An interactive Flutter package for visualizing and highlighting body parts for fitness, medical, or tracking applications.
It provides two main widgets: BodyHeatmap (for intensity visualization) and BodyChart (for selected parts highlighting).
Preview #
Installation #
Add the dependency in your pubspec.yaml:
dependencies:
bodychart_heatmap: ^1.0.0
or run:
flutter pub add bodychart_heatmap
Then run:
flutter pub get
Usage #
BodyHeatmap #
import 'package:bodychart_heatmap/bodychart_heatmap.dart';
BodyHeatmap(
selectedParts: {
"chest": 1,
"back": 3,
"arm": 2,
"leg": 3,
"butt": 1,
"shoulder": 0,
"neck": 1,
"abs": 1,
},
baseColor: Colors.blueAccent,
unselectedColor: const Color(0xFFCCCCCC),
width: 350,
showToolTip: true,
toolTipTextStyle: const TextStyle(fontSize: 14, color: Colors.black),
toolTipAlignment: MainAxisAlignment.end,
)
BodyHeatmap Parameters #
| Property | Type | Default | Description |
|---|---|---|---|
selectedParts |
Map<String,int> |
Required | Body parts with intensity values:0 = unselected (uses unselectedColor),1 = low, 2 = medium, 3 = high. |
baseColor |
Color |
Required | Main color used for highlighting. |
unselectedColor |
Color |
Color(0xFFCCCCCC) |
Color for unselected/0-value parts. |
width |
double |
300 |
Custom width of the heatmap widget. |
showToolTip |
bool |
true |
Whether to show the legend/tooltip. |
toolTipTextStyle |
TextStyle |
TextStyle(fontSize:14,color:Colors.black) |
Style for tooltip labels. |
toolTipAlignment |
MainAxisAlignment |
MainAxisAlignment.center |
Alignment of the tooltip row (.start, .center, .end). |
BodyChart #
import 'package:bodychart_heatmap/bodychart_heatmap.dart';
BodyChart(
selectedParts: {"chest", "arm", "abs","back","butt"},
selectedColor: Colors.green,
unselectedColor: Colors.grey.shade300,
viewType: BodyViewType.both,
width: 250,
)
BodyChart Parameters #
| Parameter | Type | Default | Description |
|---|---|---|---|
selectedParts |
Set<String> |
required | The set of body parts to highlight. • front: {"neck","shoulder","chest","arm","abs","leg","full body"} • back: {"neck","back","shoulder","arm","butt","leg","full body"} • both: {"neck","shoulder","chest","arm","abs","leg","butt","back","full body"} |
selectedColor |
Color |
Color(0xFFBCF246) |
Color used for highlighted/selected body parts. |
unselectedColor |
Color |
Color(0xFFCCCCCC) |
Color used for unselected body parts. |
viewType |
BodyViewType |
BodyViewType.both |
Body view type: front, back, or both. |
width |
double |
250 |
Custom width of the body chart widget. |