import 'package:ernaehrung/pages/nav_pages/subpages/progress_page/sub_components/list_view/progress_food_list.dart';
import 'package:flutter/material.dart';
import 'package:hive/hive.dart';
import '../../../../../../services/statistics.dart';
import '../../../../../shared_components/title.dart';

class ProgressAllMealsComponent extends StatelessWidget {
  const ProgressAllMealsComponent({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.fromLTRB(0, 16, 0, 0),
      padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
      decoration: const BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.all(Radius.circular(8))),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          const TitleComponent("Alle Mahlzeiten"),
          ProgressFoodListComponent(
            box: Hive.box(DataService.instance.progressBoxName),
          )
        ],
      ),
    );
  }
}
