Last updated:
0 purchases
map chart jp
map_chart_jp #
A map chart of Japan.
Getting Started #
You need to prepare data by prefecture and JpMapController.
Write this code in the StatefulWidget.
Map<Prefecture,ChartData> dataMap = {};
late JpMapController _controller;
copied to clipboard
Initialize and dispose controller.
@override
void initState() {
super.initState();
_controller = JpMapController(
defaultData: ChartData(Colors.white54),
compact: false
);
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
_controller.init();
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
copied to clipboard
In build function, you can use JpMapChart widget.
JpMapChart(
notifier: _controller
)
copied to clipboard
parameters #
JpMapController.compact #
false: Okinawa will be placed in the exact location.
true: Okinawa will be moved to the upper left and other prefectures will be displayed in a larger size.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.