Skip to content
Snippets Groups Projects
Commit 5311a658 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

update: test colors

parent f94c0b61
No related branches found
No related tags found
1 merge request!7Clhp map
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment