File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 16
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
17
*/
18
18
19
+ import 'package:clock/clock.dart' ;
19
20
import 'package:flutter/material.dart' ;
20
21
import 'package:table_calendar/table_calendar.dart' ;
21
22
import 'package:wger/helpers/consts.dart' ;
@@ -98,7 +99,7 @@ class WorkoutLogCalendar extends StatefulWidget {
98
99
}
99
100
100
101
class _WorkoutLogCalendarState extends State <WorkoutLogCalendar > {
101
- DateTime _focusedDay = DateTime .now ();
102
+ DateTime _focusedDay = clock .now ();
102
103
DateTime ? _selectedDay;
103
104
late final ValueNotifier <List <WorkoutLogEvent >> _selectedEvents;
104
105
late Map <String , List <WorkoutLogEvent >> _events;
@@ -152,8 +153,8 @@ class _WorkoutLogCalendarState extends State<WorkoutLogCalendar> {
152
153
children: [
153
154
TableCalendar (
154
155
locale: Localizations .localeOf (context).languageCode,
155
- firstDay: DateTime .now ().subtract (const Duration (days: 1000 )),
156
- lastDay: DateTime .now (),
156
+ firstDay: clock .now ().subtract (const Duration (days: 1000 )),
157
+ lastDay: clock .now (),
157
158
focusedDay: _focusedDay,
158
159
selectedDayPredicate: (day) => isSameDay (_selectedDay, day),
159
160
calendarFormat: CalendarFormat .month,
You can’t perform that action at this time.
0 commit comments