Skip to content

organic-nailer/map_chart_jp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

map_chart_jp

pub package

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;

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();
  }

In build function, you can use JpMapChart widget.

JpMapChart(
  notifier: _controller
)

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published