From d7d1fccb42424c11e6a716558ac63fd633c9f3a4 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Thu, 18 Aug 2022 10:31:13 +0200 Subject: responsive --- lib/services/local_shift_provider_service.dart | 1 + lib/services/mock_shift_provider_service.dart | 35 +++++++++++++++++--------- 2 files changed, 24 insertions(+), 12 deletions(-) (limited to 'lib/services') diff --git a/lib/services/local_shift_provider_service.dart b/lib/services/local_shift_provider_service.dart index 6839dff..917e382 100644 --- a/lib/services/local_shift_provider_service.dart +++ b/lib/services/local_shift_provider_service.dart @@ -33,6 +33,7 @@ class LocalShiftProviderService extends IProgramProviderService { try { final file = await _localFile; String content = jsonEncode(shifts); + print('writing content: ' + content); await file.writeAsString(content); } catch (e, stacktrace) { print(stacktrace); diff --git a/lib/services/mock_shift_provider_service.dart b/lib/services/mock_shift_provider_service.dart index c7bc865..e6c88e0 100644 --- a/lib/services/mock_shift_provider_service.dart +++ b/lib/services/mock_shift_provider_service.dart @@ -9,35 +9,46 @@ class MockShiftProviderService extends IProgramProviderService { MockShiftProviderService() { List shifts = []; - shifts.add(Shift( - end: DateTime(2022, 8, 8, 20, 30), - start: DateTime(2022, 8, 8, 16, 30), - type: ShiftType.Avondrit)); + shifts.add( + Shift( + end: DateTime(2022, 8, 8, 20, 30), + start: DateTime(2022, 8, 8, 16, 30), + type: ShiftType.Avondrit, + payRate: 13.75), + ); shifts.add(Shift( end: DateTime(2022, 8, 6, 20, 30), start: DateTime(2022, 8, 6, 16, 30), - type: ShiftType.Avondrit)); + type: ShiftType.Avondrit, + payRate: 13.75)); shifts.add(Shift( end: DateTime(2022, 8, 5, 20, 30), start: DateTime(2022, 8, 5, 16, 30), - type: ShiftType.Avondrit)); + type: ShiftType.Avondrit, + payRate: 13.75)); - shifts.add( - Shift(start: DateTime(2022, 8, 4, 16, 30), type: ShiftType.Avondrit)); + shifts.add(Shift( + start: DateTime(2022, 8, 4, 16, 30), + type: ShiftType.Avondrit, + payRate: 13.75)); shifts.add(Shift( end: DateTime(2022, 8, 1, 17, 30), start: DateTime(2022, 8, 1, 9, 30), - type: ShiftType.Dagrit)); + type: ShiftType.Dagrit, + payRate: 13.75)); - shifts.add( - Shift(start: DateTime(2022, 8, 22, 9, 30), type: ShiftType.Dagrit)); + shifts.add(Shift( + start: DateTime(2022, 8, 22, 9, 30), + type: ShiftType.Dagrit, + payRate: 13.75)); shifts.add(Shift( start: DateTime.now().subtract(Duration(hours: 2)), - type: ShiftType.Dagrit)); + type: ShiftType.Dagrit, + payRate: 13.75)); savedShifts = shifts; } -- cgit v1.2.3-70-g09d2