fmassive/lib/plan_list.dart

26 lines
597 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
2023-11-28 14:53:37 +13:00
import 'package:fmassive/constants.dart';
import 'package:fmassive/database.dart';
2023-11-30 13:02:20 +13:00
import 'package:fmassive/plan_tile.dart';
class PlanList extends StatelessWidget {
const PlanList({
super.key,
required this.plans,
});
final List<Plan> plans;
@override
Widget build(BuildContext context) {
2023-11-28 14:53:37 +13:00
final weekday = weekdayNames[DateTime.now().weekday - 1];
return ListView.builder(
itemCount: plans.length,
itemBuilder: (context, index) {
2023-11-30 13:02:20 +13:00
return PlanTile(plan: plans[index], weekday: weekday);
},
);
}
}