Fixed? a key bug related to pulling the right day
This commit is contained in:
@@ -21,7 +21,7 @@ class _DayViewState extends State<DayView> {
|
||||
late CategoriesAPI categories;
|
||||
|
||||
late List<Document> entries = [];
|
||||
late Document? dayEntry;
|
||||
late Document? dayEntry = null;
|
||||
late List<num> hours = [];
|
||||
late num? mood = 0;
|
||||
late String comments = "";
|
||||
@@ -61,7 +61,9 @@ class _DayViewState extends State<DayView> {
|
||||
format: "LLL d", dateISO: dayEntry?.data['date'].toString());
|
||||
print("Got entry for $date");
|
||||
} catch (e) {
|
||||
database.getOne(date: formattedDate).then((value) => dayEntry = value);
|
||||
database.getOne(date: formattedDate).then((value) {
|
||||
dayEntry = value;
|
||||
});
|
||||
}
|
||||
|
||||
setState(() {
|
||||
|
||||
Reference in New Issue
Block a user