64 lines
4.6 KiB
Dart
64 lines
4.6 KiB
Dart
|
|
||
|
import 'package:ernaehrung/android/components/meal_page_text/days_component.dart';
|
||
|
import 'package:ernaehrung/android/config/statistics.dart';
|
||
|
import 'package:hive/hive.dart';
|
||
|
import '../models/food.dart';
|
||
|
|
||
|
// TODO REMOVE IN PROD
|
||
|
|
||
|
mockDataForWholeWeek(){
|
||
|
StatisticsService statisticsService = StatisticsService.instance;
|
||
|
Box box = Hive.box('STATISTICS_MAIN');
|
||
|
int timestamp = statisticsService.getTimestampFromNow();
|
||
|
List<int> currentWeek = statisticsService.getTimestampsByTimestampAndTimespan(TimeSpan.week, timestamp);
|
||
|
for(int i = 0;i < currentWeek.length;i++){
|
||
|
print(mockFood(i));
|
||
|
box.put(currentWeek[i], mockFood(i));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
mockFood(int i) {
|
||
|
List<Map<String,List<dynamic>>> foods = [
|
||
|
{
|
||
|
'FRÜHSTÜCK':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'MITTAGESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'ABENDESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
},
|
||
|
{
|
||
|
'FRÜHSTÜCK':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'MITTAGESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'ABENDESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
},
|
||
|
{
|
||
|
'FRÜHSTÜCK':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'MITTAGESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'ABENDESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
},
|
||
|
{
|
||
|
'FRÜHSTÜCK':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'MITTAGESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'ABENDESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
},
|
||
|
{
|
||
|
'FRÜHSTÜCK':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'MITTAGESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'ABENDESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
},
|
||
|
{
|
||
|
'FRÜHSTÜCK':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'MITTAGESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'ABENDESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
},
|
||
|
{
|
||
|
'FRÜHSTÜCK':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'MITTAGESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
'ABENDESSEN':[ Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),Food(167543,"Snacks Granola Bars Hard Almond","Snacks",495,25.5,7.7,62,0,4.8,),],
|
||
|
},
|
||
|
];
|
||
|
return foods[i];
|
||
|
}
|
||
|
|
||
|
|
||
|
|