cpd_2022_zi/lib/widgets/view_form/relapse_view.dart

18 lines
551 B
Dart
Raw Normal View History

2023-03-03 12:50:50 +01:00
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
2023-03-05 18:17:08 +01:00
import 'package:smoke_cess_app/providers/tasks_provider.dart';
2023-03-03 12:50:50 +01:00
class RelapseView extends StatelessWidget {
const RelapseView({super.key});
@override
Widget build(BuildContext context) {
var tasksModel = context.watch<TasksProvider>();
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: tasksModel.relapseHistory.map((relapse) {
return Text('${relapse.date}: ${relapse.category}');
}).toList());
}
}