Flutter-Ernaehrungsapp/lib/android/components/meal_page_food_component.dart

30 lines
1007 B
Dart
Raw Normal View History

2023-05-29 12:08:46 +02:00
import 'package:ernaehrung/android/components/food_list_component.dart';
2023-06-01 12:14:23 +02:00
import 'package:ernaehrung/android/config/statistics.dart';
2023-05-29 12:08:46 +02:00
import 'package:flutter/material.dart';
import 'package:hive/hive.dart';
2023-05-29 12:08:46 +02:00
import 'meal_page_text/title_component.dart';
class MealPageStatisticsFoodComponent extends StatelessWidget {
const MealPageStatisticsFoodComponent({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
2023-06-02 01:42:56 +02:00
margin: const EdgeInsets.fromLTRB(0, 16, 0, 0),
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
2023-05-29 12:08:46 +02:00
decoration: const BoxDecoration(
2023-06-02 01:42:56 +02:00
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8))),
2023-05-29 12:08:46 +02:00
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const TitleComponent("Nahrung"),
2023-06-02 01:42:56 +02:00
FoodComponent(
box: Hive.box(StatisticsService.instance.todayStatisticsBoxName),
)
2023-05-29 12:08:46 +02:00
],
),
);
}
}