18 lines
531 B
Dart
18 lines
531 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import '../providers/tasks_provider.dart';
|
|
|
|
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());
|
|
}
|
|
}
|