You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
400 B
22 lines
400 B
import 'dart:math';
|
|
|
|
final Map<int, String> daysOfWeek = {
|
|
1: 'Mon',
|
|
2: 'Tue',
|
|
3: 'Wed',
|
|
4: 'Thu',
|
|
5: 'Fri',
|
|
6: 'Sat',
|
|
7: 'Sun',
|
|
};
|
|
|
|
int randBetween(int min, int max) {
|
|
return Random().nextInt(max - min) + min;
|
|
}
|
|
|
|
String formatNumber(int number) {
|
|
return number.toString().replaceAllMapped(
|
|
RegExp(r'(\d{1,3})(?=(\d{3})+(?!\d))'),
|
|
(Match m) => '${m[1]},',
|
|
);
|
|
} |