diff --git a/app/lib/pages/widgets/cloropleth_map.dart b/app/lib/pages/widgets/cloropleth_map.dart index 632a504b862781e697b7e34bb79a4ef6daccdf57..0fed74d1653a50b4fe69f2d3ae4a62d224021d49 100644 --- a/app/lib/pages/widgets/cloropleth_map.dart +++ b/app/lib/pages/widgets/cloropleth_map.dart @@ -35,6 +35,13 @@ class _ChoroplethMapState extends State<ChoroplethMap> { late MapShapeSource mapShapeSource; late final MapZoomPanBehavior _zoomPanBehavior = MapZoomPanBehavior(); List<IceThicknessModel> iceThicknessList = <IceThicknessModel>[]; + List<Color> testColors = [ // NB test color + const Color(0xff8a003b), + const Color(0xff8a4300), + const Color(0xff8a7a00), + const Color(0xff538a00), + const Color(0xff007b8a), + ]; @override void initState() { @@ -42,11 +49,8 @@ class _ChoroplethMapState extends State<ChoroplethMap> { final Random random = Random(); for (int i = 0; i <= 120; i++) { - int red = random.nextInt(256); - int green = random.nextInt(256); - int blue = random.nextInt(256); - - Color randomColor = Color.fromRGBO(red, green, blue, 1); + int ran = random.nextInt(4); // NB test color + Color randomColor = testColors[ran]; int randomNumber = random.nextInt(21); // 0 -> 20, NB: temp test data iceThicknessList.add(IceThicknessModel(i.toString(), randomNumber, randomColor)); @@ -68,8 +72,8 @@ class _ChoroplethMapState extends State<ChoroplethMap> { shapeColorValueMapper: (int index) => iceThicknessList[index].color, ), //color: Colors.blue.shade400, // Map color - //zoomPanBehavior: _zoomPanBehavior, - //strokeColor: Colors.black, + zoomPanBehavior: _zoomPanBehavior, + strokeColor: Colors.black, // Shape selection selectedIndex: selectedIndex, onSelectionChanged: (int index) {