|
|
|
|
@ -2,6 +2,8 @@ import 'dart:async';
|
|
|
|
|
import 'dart:developer';
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/app_state.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/dependencies.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
|
|
|
|
@ -21,11 +23,16 @@ class ToDoPage extends StatefulWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _ToDoPageState extends State<ToDoPage> {
|
|
|
|
|
|
|
|
|
|
late AppState appState;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
final TodoSectionViewModel todoSectionViewModel = context.read<TodoSectionViewModel>();
|
|
|
|
|
scheduleMicrotask(() async {
|
|
|
|
|
await todoSectionViewModel.initializeTodoSectionViewModel();
|
|
|
|
|
if (appState.isAuthenticated) {
|
|
|
|
|
await todoSectionViewModel.initializeTodoSectionViewModel();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
@ -51,6 +58,7 @@ class _ToDoPageState extends State<ToDoPage> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
appState = getIt.get<AppState>();
|
|
|
|
|
return CollapsingListView(
|
|
|
|
|
title: "ToDo List".needTranslation,
|
|
|
|
|
isLeading: false,
|
|
|
|
|
|