Map card WIP

This commit is contained in:
estevez-dev
2020-07-20 13:53:18 +03:00
parent bf7983d72e
commit d2d037e468
7 changed files with 118 additions and 17 deletions

View File

@ -0,0 +1,28 @@
part of '../main.dart';
class RandomColorGenerator {
static const colorsList = [
Colors.green,
Colors.purple,
Colors.indigo,
Colors.red,
Colors.orange,
Colors.cyan
];
int _index = 0;
Color getCurrent() {
return colorsList[_index];
}
Color getNext() {
if (_index < colorsList.length - 1) {
_index += 1;
} else {
_index = 1;
}
return getCurrent();
}
}