From 9f51d6853164930b2d567f1cc282eab1469ce846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20M=C3=BCller?= Date: Fri, 24 Jan 2025 11:02:03 +0100 Subject: [PATCH] updated build runner tasks --- lib/api/holidays/getHolidaysResponse.g.dart | 21 ++-- .../files-sharing/fileSharingApiParams.g.dart | 2 +- .../talk/chat/getChatParams.g.dart | 45 ++++---- .../talk/chat/getChatResponse.g.dart | 24 ++-- .../talk/createRoom/createRoomParams.g.dart | 2 +- .../getParticipantsResponse.g.dart | 26 ++--- .../getReactions/getReactionsResponse.g.dart | 22 ++-- .../talk/room/getRoomParams.g.dart | 2 +- .../talk/room/getRoomResponse.g.dart | 40 +++---- .../talk/sendMessage/sendMessageParams.g.dart | 19 +-- .../setReadMarker/setReadMarkerParams.g.dart | 2 +- .../queries/listFiles/cacheableFile.g.dart | 2 +- .../listFiles/listFilesResponse.g.dart | 18 +-- .../getBreakers/getBreakersResponse.g.dart | 21 ++-- .../getCustomTimetableEventResponse.g.dart | 18 +-- .../server/feedback/addFeedbackParams.g.dart | 2 +- .../update/updateUserIndexParams.g.dart | 2 +- .../authenticate/authenticateResponse.g.dart | 30 ++--- .../getHolidays/getHolidaysResponse.g.dart | 25 ++-- .../queries/getRooms/getRoomsResponse.g.dart | 20 +--- .../getSubjects/getSubjectsResponse.g.dart | 21 ++-- .../getTimetable/getTimetableParams.g.dart | 109 ++++++++---------- .../getTimetable/getTimetableResponse.g.dart | 40 +++---- .../bloc/loadable_state_state.freezed.dart | 17 ++- .../loadableState/loadable_state.freezed.dart | 44 ++++--- .../loadableState/loading_error.freezed.dart | 17 ++- .../loadable_save_context.freezed.dart | 21 +++- .../loadable_save_context.g.dart | 2 +- .../bloc/grade_averages_state.freezed.dart | 21 +++- .../bloc/grade_averages_state.g.dart | 4 +- .../holidays/bloc/holidays_state.freezed.dart | 42 +++++-- .../holidays/bloc/holidays_state.g.dart | 2 +- .../bloc/marianum_message_state.freezed.dart | 65 +++++++++-- 33 files changed, 372 insertions(+), 376 deletions(-) diff --git a/lib/api/holidays/getHolidaysResponse.g.dart b/lib/api/holidays/getHolidaysResponse.g.dart index 3f6225e..36fddb2 100644 --- a/lib/api/holidays/getHolidaysResponse.g.dart +++ b/lib/api/holidays/getHolidaysResponse.g.dart @@ -16,26 +16,19 @@ GetHolidaysResponse _$GetHolidaysResponseFromJson(Map json) => (k, e) => MapEntry(k, e as String), ); -Map _$GetHolidaysResponseToJson(GetHolidaysResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['data'] = instance.data.map((e) => e.toJson()).toList(); - return val; -} +Map _$GetHolidaysResponseToJson( + GetHolidaysResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'data': instance.data.map((e) => e.toJson()).toList(), + }; GetHolidaysResponseObject _$GetHolidaysResponseObjectFromJson( Map json) => GetHolidaysResponseObject( start: json['start'] as String, end: json['end'] as String, - year: json['year'] as int, + year: (json['year'] as num).toInt(), stateCode: json['stateCode'] as String, name: json['name'] as String, slug: json['slug'] as String, diff --git a/lib/api/marianumcloud/files-sharing/fileSharingApiParams.g.dart b/lib/api/marianumcloud/files-sharing/fileSharingApiParams.g.dart index 79abf90..6aa4059 100644 --- a/lib/api/marianumcloud/files-sharing/fileSharingApiParams.g.dart +++ b/lib/api/marianumcloud/files-sharing/fileSharingApiParams.g.dart @@ -9,7 +9,7 @@ part of 'fileSharingApiParams.dart'; FileSharingApiParams _$FileSharingApiParamsFromJson( Map json) => FileSharingApiParams( - shareType: json['shareType'] as int, + shareType: (json['shareType'] as num).toInt(), shareWith: json['shareWith'] as String, path: json['path'] as String, referenceId: json['referenceId'] as String?, diff --git a/lib/api/marianumcloud/talk/chat/getChatParams.g.dart b/lib/api/marianumcloud/talk/chat/getChatParams.g.dart index 743e219..0b90c33 100644 --- a/lib/api/marianumcloud/talk/chat/getChatParams.g.dart +++ b/lib/api/marianumcloud/talk/chat/getChatParams.g.dart @@ -10,37 +10,32 @@ GetChatParams _$GetChatParamsFromJson(Map json) => GetChatParams( lookIntoFuture: $enumDecode(_$GetChatParamsSwitchEnumMap, json['lookIntoFuture']), - limit: json['limit'] as int?, - lastKnownMessageId: json['lastKnownMessageId'] as int?, - lastCommonReadId: json['lastCommonReadId'] as int?, - timeout: json['timeout'] as int?, + limit: (json['limit'] as num?)?.toInt(), + lastKnownMessageId: (json['lastKnownMessageId'] as num?)?.toInt(), + lastCommonReadId: (json['lastCommonReadId'] as num?)?.toInt(), + timeout: (json['timeout'] as num?)?.toInt(), setReadMarker: $enumDecodeNullable( _$GetChatParamsSwitchEnumMap, json['setReadMarker']), includeLastKnown: $enumDecodeNullable( _$GetChatParamsSwitchEnumMap, json['includeLastKnown']), ); -Map _$GetChatParamsToJson(GetChatParams instance) { - final val = { - 'lookIntoFuture': _$GetChatParamsSwitchEnumMap[instance.lookIntoFuture]!, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('limit', instance.limit); - writeNotNull('lastKnownMessageId', instance.lastKnownMessageId); - writeNotNull('lastCommonReadId', instance.lastCommonReadId); - writeNotNull('timeout', instance.timeout); - writeNotNull( - 'setReadMarker', _$GetChatParamsSwitchEnumMap[instance.setReadMarker]); - writeNotNull('includeLastKnown', - _$GetChatParamsSwitchEnumMap[instance.includeLastKnown]); - return val; -} +Map _$GetChatParamsToJson(GetChatParams instance) => + { + 'lookIntoFuture': _$GetChatParamsSwitchEnumMap[instance.lookIntoFuture]!, + if (instance.limit case final value?) 'limit': value, + if (instance.lastKnownMessageId case final value?) + 'lastKnownMessageId': value, + if (instance.lastCommonReadId case final value?) + 'lastCommonReadId': value, + if (instance.timeout case final value?) 'timeout': value, + if (_$GetChatParamsSwitchEnumMap[instance.setReadMarker] + case final value?) + 'setReadMarker': value, + if (_$GetChatParamsSwitchEnumMap[instance.includeLastKnown] + case final value?) + 'includeLastKnown': value, + }; const _$GetChatParamsSwitchEnumMap = { GetChatParamsSwitch.on: 1, diff --git a/lib/api/marianumcloud/talk/chat/getChatResponse.g.dart b/lib/api/marianumcloud/talk/chat/getChatResponse.g.dart index 0b241cb..9cfcf18 100644 --- a/lib/api/marianumcloud/talk/chat/getChatResponse.g.dart +++ b/lib/api/marianumcloud/talk/chat/getChatResponse.g.dart @@ -15,30 +15,22 @@ GetChatResponse _$GetChatResponseFromJson(Map json) => (k, e) => MapEntry(k, e as String), ); -Map _$GetChatResponseToJson(GetChatResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['data'] = instance.data.map((e) => e.toJson()).toList(); - return val; -} +Map _$GetChatResponseToJson(GetChatResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'data': instance.data.map((e) => e.toJson()).toList(), + }; GetChatResponseObject _$GetChatResponseObjectFromJson( Map json) => GetChatResponseObject( - json['id'] as int, + (json['id'] as num).toInt(), json['token'] as String, $enumDecode( _$GetRoomResponseObjectMessageActorTypeEnumMap, json['actorType']), json['actorId'] as String, json['actorDisplayName'] as String, - json['timestamp'] as int, + (json['timestamp'] as num).toInt(), json['systemMessage'] as String, $enumDecode( _$GetRoomResponseObjectMessageTypeEnumMap, json['messageType']), @@ -47,7 +39,7 @@ GetChatResponseObject _$GetChatResponseObjectFromJson( json['message'] as String, _fromJson(json['messageParameters']), (json['reactions'] as Map?)?.map( - (k, e) => MapEntry(k, e as int), + (k, e) => MapEntry(k, (e as num).toInt()), ), (json['reactionsSelf'] as List?) ?.map((e) => e as String) diff --git a/lib/api/marianumcloud/talk/createRoom/createRoomParams.g.dart b/lib/api/marianumcloud/talk/createRoom/createRoomParams.g.dart index e3ad2e5..8592ebb 100644 --- a/lib/api/marianumcloud/talk/createRoom/createRoomParams.g.dart +++ b/lib/api/marianumcloud/talk/createRoom/createRoomParams.g.dart @@ -8,7 +8,7 @@ part of 'createRoomParams.dart'; CreateRoomParams _$CreateRoomParamsFromJson(Map json) => CreateRoomParams( - roomType: json['roomType'] as int, + roomType: (json['roomType'] as num).toInt(), invite: json['invite'] as String, source: json['source'] as String?, roomName: json['roomName'] as String?, diff --git a/lib/api/marianumcloud/talk/getParticipants/getParticipantsResponse.g.dart b/lib/api/marianumcloud/talk/getParticipants/getParticipantsResponse.g.dart index e1b3157..f9a2624 100644 --- a/lib/api/marianumcloud/talk/getParticipants/getParticipantsResponse.g.dart +++ b/lib/api/marianumcloud/talk/getParticipants/getParticipantsResponse.g.dart @@ -18,34 +18,26 @@ GetParticipantsResponse _$GetParticipantsResponseFromJson( ); Map _$GetParticipantsResponseToJson( - GetParticipantsResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['data'] = instance.data.map((e) => e.toJson()).toList(); - return val; -} + GetParticipantsResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'data': instance.data.map((e) => e.toJson()).toList(), + }; GetParticipantsResponseObject _$GetParticipantsResponseObjectFromJson( Map json) => GetParticipantsResponseObject( - json['attendeeId'] as int, + (json['attendeeId'] as num).toInt(), json['actorType'] as String, json['actorId'] as String, json['displayName'] as String, $enumDecode(_$GetParticipantsResponseObjectParticipantTypeEnumMap, json['participantType']), - json['lastPing'] as int, + (json['lastPing'] as num).toInt(), $enumDecode(_$GetParticipantsResponseObjectParticipantsInCallFlagsEnumMap, json['inCall']), - json['permissions'] as int, - json['attendeePermissions'] as int, + (json['permissions'] as num).toInt(), + (json['attendeePermissions'] as num).toInt(), json['sessionId'] as String?, (json['sessionIds'] as List).map((e) => e as String).toList(), json['status'] as String?, diff --git a/lib/api/marianumcloud/talk/getReactions/getReactionsResponse.g.dart b/lib/api/marianumcloud/talk/getReactions/getReactionsResponse.g.dart index c1bf0d1..329a4b4 100644 --- a/lib/api/marianumcloud/talk/getReactions/getReactionsResponse.g.dart +++ b/lib/api/marianumcloud/talk/getReactions/getReactionsResponse.g.dart @@ -22,20 +22,12 @@ GetReactionsResponse _$GetReactionsResponseFromJson( ); Map _$GetReactionsResponseToJson( - GetReactionsResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['data'] = instance.data - .map((k, e) => MapEntry(k, e.map((e) => e.toJson()).toList())); - return val; -} + GetReactionsResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'data': instance.data + .map((k, e) => MapEntry(k, e.map((e) => e.toJson()).toList())), + }; GetReactionsResponseObject _$GetReactionsResponseObjectFromJson( Map json) => @@ -44,7 +36,7 @@ GetReactionsResponseObject _$GetReactionsResponseObjectFromJson( _$GetReactionsResponseObjectActorTypeEnumMap, json['actorType']), json['actorId'] as String, json['actorDisplayName'] as String, - json['timestamp'] as int, + (json['timestamp'] as num).toInt(), ); Map _$GetReactionsResponseObjectToJson( diff --git a/lib/api/marianumcloud/talk/room/getRoomParams.g.dart b/lib/api/marianumcloud/talk/room/getRoomParams.g.dart index 616c591..2e96914 100644 --- a/lib/api/marianumcloud/talk/room/getRoomParams.g.dart +++ b/lib/api/marianumcloud/talk/room/getRoomParams.g.dart @@ -11,7 +11,7 @@ GetRoomParams _$GetRoomParamsFromJson(Map json) => noStatusUpdate: $enumDecodeNullable( _$GetRoomParamsStatusUpdateEnumMap, json['noStatusUpdate']), includeStatus: json['includeStatus'] as bool?, - modifiedSince: json['modifiedSince'] as int?, + modifiedSince: (json['modifiedSince'] as num?)?.toInt(), ); Map _$GetRoomParamsToJson(GetRoomParams instance) => diff --git a/lib/api/marianumcloud/talk/room/getRoomResponse.g.dart b/lib/api/marianumcloud/talk/room/getRoomResponse.g.dart index f4fb4f3..f937b3b 100644 --- a/lib/api/marianumcloud/talk/room/getRoomResponse.g.dart +++ b/lib/api/marianumcloud/talk/room/getRoomResponse.g.dart @@ -15,50 +15,42 @@ GetRoomResponse _$GetRoomResponseFromJson(Map json) => (k, e) => MapEntry(k, e as String), ); -Map _$GetRoomResponseToJson(GetRoomResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['data'] = instance.data.map((e) => e.toJson()).toList(); - return val; -} +Map _$GetRoomResponseToJson(GetRoomResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'data': instance.data.map((e) => e.toJson()).toList(), + }; GetRoomResponseObject _$GetRoomResponseObjectFromJson( Map json) => GetRoomResponseObject( - json['id'] as int, + (json['id'] as num).toInt(), json['token'] as String, $enumDecode(_$GetRoomResponseObjectConversationTypeEnumMap, json['type']), json['name'] as String, json['displayName'] as String, json['description'] as String, - json['participantType'] as int, - json['participantFlags'] as int, - json['readOnly'] as int, - json['listable'] as int, - json['lastPing'] as int, + (json['participantType'] as num).toInt(), + (json['participantFlags'] as num).toInt(), + (json['readOnly'] as num).toInt(), + (json['listable'] as num).toInt(), + (json['lastPing'] as num).toInt(), json['sessionId'] as String, json['hasPassword'] as bool, json['hasCall'] as bool, - json['callFlag'] as int, + (json['callFlag'] as num).toInt(), json['canStartCall'] as bool, json['canDeleteConversation'] as bool, json['canLeaveConversation'] as bool, - json['lastActivity'] as int, + (json['lastActivity'] as num).toInt(), json['isFavorite'] as bool, $enumDecode(_$GetRoomResponseObjectParticipantNotificationLevelEnumMap, json['notificationLevel']), - json['unreadMessages'] as int, + (json['unreadMessages'] as num).toInt(), json['unreadMention'] as bool, json['unreadMentionDirect'] as bool, - json['lastReadMessage'] as int, - json['lastCommonReadMessage'] as int, + (json['lastReadMessage'] as num).toInt(), + (json['lastCommonReadMessage'] as num).toInt(), GetChatResponseObject.fromJson( json['lastMessage'] as Map), json['status'] as String?, diff --git a/lib/api/marianumcloud/talk/sendMessage/sendMessageParams.g.dart b/lib/api/marianumcloud/talk/sendMessage/sendMessageParams.g.dart index 76093c2..d611904 100644 --- a/lib/api/marianumcloud/talk/sendMessage/sendMessageParams.g.dart +++ b/lib/api/marianumcloud/talk/sendMessage/sendMessageParams.g.dart @@ -12,17 +12,8 @@ SendMessageParams _$SendMessageParamsFromJson(Map json) => replyTo: json['replyTo'] as String?, ); -Map _$SendMessageParamsToJson(SendMessageParams instance) { - final val = { - 'message': instance.message, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('replyTo', instance.replyTo); - return val; -} +Map _$SendMessageParamsToJson(SendMessageParams instance) => + { + 'message': instance.message, + if (instance.replyTo case final value?) 'replyTo': value, + }; diff --git a/lib/api/marianumcloud/talk/setReadMarker/setReadMarkerParams.g.dart b/lib/api/marianumcloud/talk/setReadMarker/setReadMarkerParams.g.dart index fa5f7fe..eadde06 100644 --- a/lib/api/marianumcloud/talk/setReadMarker/setReadMarkerParams.g.dart +++ b/lib/api/marianumcloud/talk/setReadMarker/setReadMarkerParams.g.dart @@ -8,7 +8,7 @@ part of 'setReadMarkerParams.dart'; SetReadMarkerParams _$SetReadMarkerParamsFromJson(Map json) => SetReadMarkerParams( - lastReadMessage: json['lastReadMessage'] as int?, + lastReadMessage: (json['lastReadMessage'] as num?)?.toInt(), ); Map _$SetReadMarkerParamsToJson( diff --git a/lib/api/marianumcloud/webdav/queries/listFiles/cacheableFile.g.dart b/lib/api/marianumcloud/webdav/queries/listFiles/cacheableFile.g.dart index dc95eb7..c79547b 100644 --- a/lib/api/marianumcloud/webdav/queries/listFiles/cacheableFile.g.dart +++ b/lib/api/marianumcloud/webdav/queries/listFiles/cacheableFile.g.dart @@ -12,7 +12,7 @@ CacheableFile _$CacheableFileFromJson(Map json) => isDirectory: json['isDirectory'] as bool, name: json['name'] as String, mimeType: json['mimeType'] as String?, - size: json['size'] as int?, + size: (json['size'] as num?)?.toInt(), eTag: json['eTag'] as String?, createdAt: json['createdAt'] == null ? null diff --git a/lib/api/marianumcloud/webdav/queries/listFiles/listFilesResponse.g.dart b/lib/api/marianumcloud/webdav/queries/listFiles/listFilesResponse.g.dart index 2c33172..b518755 100644 --- a/lib/api/marianumcloud/webdav/queries/listFiles/listFilesResponse.g.dart +++ b/lib/api/marianumcloud/webdav/queries/listFiles/listFilesResponse.g.dart @@ -15,16 +15,8 @@ ListFilesResponse _$ListFilesResponseFromJson(Map json) => (k, e) => MapEntry(k, e as String), ); -Map _$ListFilesResponseToJson(ListFilesResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['files'] = instance.files.map((e) => e.toJson()).toList(); - return val; -} +Map _$ListFilesResponseToJson(ListFilesResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'files': instance.files.map((e) => e.toJson()).toList(), + }; diff --git a/lib/api/mhsl/breaker/getBreakers/getBreakersResponse.g.dart b/lib/api/mhsl/breaker/getBreakers/getBreakersResponse.g.dart index 38dc2d1..e0bbc62 100644 --- a/lib/api/mhsl/breaker/getBreakers/getBreakersResponse.g.dart +++ b/lib/api/mhsl/breaker/getBreakers/getBreakersResponse.g.dart @@ -17,20 +17,13 @@ GetBreakersResponse _$GetBreakersResponseFromJson(Map json) => (k, e) => MapEntry(k, e as String), ); -Map _$GetBreakersResponseToJson(GetBreakersResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['global'] = instance.global.toJson(); - val['regional'] = instance.regional.map((k, e) => MapEntry(k, e.toJson())); - return val; -} +Map _$GetBreakersResponseToJson( + GetBreakersResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'global': instance.global.toJson(), + 'regional': instance.regional.map((k, e) => MapEntry(k, e.toJson())), + }; GetBreakersReponseObject _$GetBreakersReponseObjectFromJson( Map json) => diff --git a/lib/api/mhsl/customTimetableEvent/get/getCustomTimetableEventResponse.g.dart b/lib/api/mhsl/customTimetableEvent/get/getCustomTimetableEventResponse.g.dart index 78bdb1b..b869f4f 100644 --- a/lib/api/mhsl/customTimetableEvent/get/getCustomTimetableEventResponse.g.dart +++ b/lib/api/mhsl/customTimetableEvent/get/getCustomTimetableEventResponse.g.dart @@ -17,16 +17,8 @@ GetCustomTimetableEventResponse _$GetCustomTimetableEventResponseFromJson( ); Map _$GetCustomTimetableEventResponseToJson( - GetCustomTimetableEventResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['events'] = instance.events; - return val; -} + GetCustomTimetableEventResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'events': instance.events, + }; diff --git a/lib/api/mhsl/server/feedback/addFeedbackParams.g.dart b/lib/api/mhsl/server/feedback/addFeedbackParams.g.dart index f401495..ec85d22 100644 --- a/lib/api/mhsl/server/feedback/addFeedbackParams.g.dart +++ b/lib/api/mhsl/server/feedback/addFeedbackParams.g.dart @@ -11,7 +11,7 @@ AddFeedbackParams _$AddFeedbackParamsFromJson(Map json) => user: json['user'] as String, feedback: json['feedback'] as String, screenshot: json['screenshot'] as String?, - appVersion: json['appVersion'] as int, + appVersion: (json['appVersion'] as num).toInt(), ); Map _$AddFeedbackParamsToJson(AddFeedbackParams instance) => diff --git a/lib/api/mhsl/server/userIndex/update/updateUserIndexParams.g.dart b/lib/api/mhsl/server/userIndex/update/updateUserIndexParams.g.dart index d18144a..324500b 100644 --- a/lib/api/mhsl/server/userIndex/update/updateUserIndexParams.g.dart +++ b/lib/api/mhsl/server/userIndex/update/updateUserIndexParams.g.dart @@ -12,7 +12,7 @@ UpdateUserIndexParams _$UpdateUserIndexParamsFromJson( user: json['user'] as String, username: json['username'] as String, device: json['device'] as String, - appVersion: json['appVersion'] as int, + appVersion: (json['appVersion'] as num).toInt(), deviceInfo: json['deviceInfo'] as String, ); diff --git a/lib/api/webuntis/queries/authenticate/authenticateResponse.g.dart b/lib/api/webuntis/queries/authenticate/authenticateResponse.g.dart index 4224d4e..4fb84ad 100644 --- a/lib/api/webuntis/queries/authenticate/authenticateResponse.g.dart +++ b/lib/api/webuntis/queries/authenticate/authenticateResponse.g.dart @@ -10,27 +10,19 @@ AuthenticateResponse _$AuthenticateResponseFromJson( Map json) => AuthenticateResponse( json['sessionId'] as String, - json['personType'] as int, - json['personId'] as int, - json['klasseId'] as int, + (json['personType'] as num).toInt(), + (json['personId'] as num).toInt(), + (json['klasseId'] as num).toInt(), )..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); Map _$AuthenticateResponseToJson( - AuthenticateResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['sessionId'] = instance.sessionId; - val['personType'] = instance.personType; - val['personId'] = instance.personId; - val['klasseId'] = instance.klasseId; - return val; -} + AuthenticateResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'sessionId': instance.sessionId, + 'personType': instance.personType, + 'personId': instance.personId, + 'klasseId': instance.klasseId, + }; diff --git a/lib/api/webuntis/queries/getHolidays/getHolidaysResponse.g.dart b/lib/api/webuntis/queries/getHolidays/getHolidaysResponse.g.dart index ab150d4..6f035cd 100644 --- a/lib/api/webuntis/queries/getHolidays/getHolidaysResponse.g.dart +++ b/lib/api/webuntis/queries/getHolidays/getHolidaysResponse.g.dart @@ -16,28 +16,21 @@ GetHolidaysResponse _$GetHolidaysResponseFromJson(Map json) => (k, e) => MapEntry(k, e as String), ); -Map _$GetHolidaysResponseToJson(GetHolidaysResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['result'] = instance.result.map((e) => e.toJson()).toList(); - return val; -} +Map _$GetHolidaysResponseToJson( + GetHolidaysResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'result': instance.result.map((e) => e.toJson()).toList(), + }; GetHolidaysResponseObject _$GetHolidaysResponseObjectFromJson( Map json) => GetHolidaysResponseObject( - json['id'] as int, + (json['id'] as num).toInt(), json['name'] as String, json['longName'] as String, - json['startDate'] as int, - json['endDate'] as int, + (json['startDate'] as num).toInt(), + (json['endDate'] as num).toInt(), ); Map _$GetHolidaysResponseObjectToJson( diff --git a/lib/api/webuntis/queries/getRooms/getRoomsResponse.g.dart b/lib/api/webuntis/queries/getRooms/getRoomsResponse.g.dart index 5bd3060..e3b9c60 100644 --- a/lib/api/webuntis/queries/getRooms/getRoomsResponse.g.dart +++ b/lib/api/webuntis/queries/getRooms/getRoomsResponse.g.dart @@ -16,24 +16,16 @@ GetRoomsResponse _$GetRoomsResponseFromJson(Map json) => (k, e) => MapEntry(k, e as String), ); -Map _$GetRoomsResponseToJson(GetRoomsResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['result'] = instance.result.map((e) => e.toJson()).toList(); - return val; -} +Map _$GetRoomsResponseToJson(GetRoomsResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'result': instance.result.map((e) => e.toJson()).toList(), + }; GetRoomsResponseObject _$GetRoomsResponseObjectFromJson( Map json) => GetRoomsResponseObject( - json['id'] as int, + (json['id'] as num).toInt(), json['name'] as String, json['longName'] as String, json['active'] as bool, diff --git a/lib/api/webuntis/queries/getSubjects/getSubjectsResponse.g.dart b/lib/api/webuntis/queries/getSubjects/getSubjectsResponse.g.dart index 6cfa395..b80a07a 100644 --- a/lib/api/webuntis/queries/getSubjects/getSubjectsResponse.g.dart +++ b/lib/api/webuntis/queries/getSubjects/getSubjectsResponse.g.dart @@ -16,24 +16,17 @@ GetSubjectsResponse _$GetSubjectsResponseFromJson(Map json) => (k, e) => MapEntry(k, e as String), ); -Map _$GetSubjectsResponseToJson(GetSubjectsResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['result'] = instance.result.map((e) => e.toJson()).toList(); - return val; -} +Map _$GetSubjectsResponseToJson( + GetSubjectsResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'result': instance.result.map((e) => e.toJson()).toList(), + }; GetSubjectsResponseObject _$GetSubjectsResponseObjectFromJson( Map json) => GetSubjectsResponseObject( - json['id'] as int, + (json['id'] as num).toInt(), json['name'] as String, json['longName'] as String, json['alternateName'] as String, diff --git a/lib/api/webuntis/queries/getTimetable/getTimetableParams.g.dart b/lib/api/webuntis/queries/getTimetable/getTimetableParams.g.dart index c5b6d92..21e60ab 100644 --- a/lib/api/webuntis/queries/getTimetable/getTimetableParams.g.dart +++ b/lib/api/webuntis/queries/getTimetable/getTimetableParams.g.dart @@ -22,8 +22,8 @@ GetTimetableParamsOptions _$GetTimetableParamsOptionsFromJson( GetTimetableParamsOptions( element: GetTimetableParamsOptionsElement.fromJson( json['element'] as Map), - startDate: json['startDate'] as int?, - endDate: json['endDate'] as int?, + startDate: (json['startDate'] as num?)?.toInt(), + endDate: (json['endDate'] as num?)?.toInt(), onlyBaseTimetable: json['onlyBaseTimetable'] as bool?, showBooking: json['showBooking'] as bool?, showInfo: json['showInfo'] as bool?, @@ -46,48 +46,41 @@ GetTimetableParamsOptions _$GetTimetableParamsOptionsFromJson( ); Map _$GetTimetableParamsOptionsToJson( - GetTimetableParamsOptions instance) { - final val = { - 'element': instance.element.toJson(), - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('startDate', instance.startDate); - writeNotNull('endDate', instance.endDate); - writeNotNull('onlyBaseTimetable', instance.onlyBaseTimetable); - writeNotNull('showBooking', instance.showBooking); - writeNotNull('showInfo', instance.showInfo); - writeNotNull('showSubstText', instance.showSubstText); - writeNotNull('showLsText', instance.showLsText); - writeNotNull('showLsNumber', instance.showLsNumber); - writeNotNull('showStudentgroup', instance.showStudentgroup); - writeNotNull( - 'klasseFields', - instance.klasseFields - ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) - .toList()); - writeNotNull( - 'roomFields', - instance.roomFields - ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) - .toList()); - writeNotNull( - 'subjectFields', - instance.subjectFields - ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) - .toList()); - writeNotNull( - 'teacherFields', - instance.teacherFields - ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) - .toList()); - return val; -} + GetTimetableParamsOptions instance) => + { + 'element': instance.element.toJson(), + if (instance.startDate case final value?) 'startDate': value, + if (instance.endDate case final value?) 'endDate': value, + if (instance.onlyBaseTimetable case final value?) + 'onlyBaseTimetable': value, + if (instance.showBooking case final value?) 'showBooking': value, + if (instance.showInfo case final value?) 'showInfo': value, + if (instance.showSubstText case final value?) 'showSubstText': value, + if (instance.showLsText case final value?) 'showLsText': value, + if (instance.showLsNumber case final value?) 'showLsNumber': value, + if (instance.showStudentgroup case final value?) + 'showStudentgroup': value, + if (instance.klasseFields + ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) + .toList() + case final value?) + 'klasseFields': value, + if (instance.roomFields + ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) + .toList() + case final value?) + 'roomFields': value, + if (instance.subjectFields + ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) + .toList() + case final value?) + 'subjectFields': value, + if (instance.teacherFields + ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) + .toList() + case final value?) + 'teacherFields': value, + }; const _$GetTimetableParamsOptionsFieldsEnumMap = { GetTimetableParamsOptionsFields.id: 'id', @@ -99,29 +92,21 @@ const _$GetTimetableParamsOptionsFieldsEnumMap = { GetTimetableParamsOptionsElement _$GetTimetableParamsOptionsElementFromJson( Map json) => GetTimetableParamsOptionsElement( - id: json['id'] as int, - type: json['type'] as int, + id: (json['id'] as num).toInt(), + type: (json['type'] as num).toInt(), keyType: $enumDecodeNullable( _$GetTimetableParamsOptionsElementKeyTypeEnumMap, json['keyType']), ); Map _$GetTimetableParamsOptionsElementToJson( - GetTimetableParamsOptionsElement instance) { - final val = { - 'id': instance.id, - 'type': instance.type, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('keyType', - _$GetTimetableParamsOptionsElementKeyTypeEnumMap[instance.keyType]); - return val; -} + GetTimetableParamsOptionsElement instance) => + { + 'id': instance.id, + 'type': instance.type, + if (_$GetTimetableParamsOptionsElementKeyTypeEnumMap[instance.keyType] + case final value?) + 'keyType': value, + }; const _$GetTimetableParamsOptionsElementKeyTypeEnumMap = { GetTimetableParamsOptionsElementKeyType.id: 'id', diff --git a/lib/api/webuntis/queries/getTimetable/getTimetableResponse.g.dart b/lib/api/webuntis/queries/getTimetable/getTimetableResponse.g.dart index 7e7a4e6..c7b2db1 100644 --- a/lib/api/webuntis/queries/getTimetable/getTimetableResponse.g.dart +++ b/lib/api/webuntis/queries/getTimetable/getTimetableResponse.g.dart @@ -18,33 +18,25 @@ GetTimetableResponse _$GetTimetableResponseFromJson( ); Map _$GetTimetableResponseToJson( - GetTimetableResponse instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('headers', instance.headers); - val['result'] = instance.result.map((e) => e.toJson()).toList(); - return val; -} + GetTimetableResponse instance) => + { + if (instance.headers case final value?) 'headers': value, + 'result': instance.result.map((e) => e.toJson()).toList(), + }; GetTimetableResponseObject _$GetTimetableResponseObjectFromJson( Map json) => GetTimetableResponseObject( - id: json['id'] as int, - date: json['date'] as int, - startTime: json['startTime'] as int, - endTime: json['endTime'] as int, + id: (json['id'] as num).toInt(), + date: (json['date'] as num).toInt(), + startTime: (json['startTime'] as num).toInt(), + endTime: (json['endTime'] as num).toInt(), lstype: json['lstype'] as String?, code: json['code'] as String?, info: json['info'] as String?, substText: json['substText'] as String?, lstext: json['lstext'] as String?, - lsnumber: json['lsnumber'] as int?, + lsnumber: (json['lsnumber'] as num?)?.toInt(), statflags: json['statflags'] as String?, activityType: json['activityType'] as String?, sg: json['sg'] as String?, @@ -110,7 +102,7 @@ GetTimetableResponseObjectFieldsObject _$GetTimetableResponseObjectFieldsObjectFromJson( Map json) => GetTimetableResponseObjectFieldsObject( - id: json['id'] as int?, + id: (json['id'] as num?)?.toInt(), name: json['name'] as String?, longname: json['longname'] as String?, externalkey: json['externalkey'] as String?, @@ -128,7 +120,7 @@ Map _$GetTimetableResponseObjectFieldsObjectToJson( GetTimetableResponseObjectClass _$GetTimetableResponseObjectClassFromJson( Map json) => GetTimetableResponseObjectClass( - json['id'] as int, + (json['id'] as num).toInt(), json['name'] as String, json['longname'] as String, json['externalkey'] as String?, @@ -146,10 +138,10 @@ Map _$GetTimetableResponseObjectClassToJson( GetTimetableResponseObjectTeacher _$GetTimetableResponseObjectTeacherFromJson( Map json) => GetTimetableResponseObjectTeacher( - json['id'] as int, + (json['id'] as num).toInt(), json['name'] as String, json['longname'] as String, - json['orgid'] as int?, + (json['orgid'] as num?)?.toInt(), json['orgname'] as String?, json['externalkey'] as String?, ); @@ -168,7 +160,7 @@ Map _$GetTimetableResponseObjectTeacherToJson( GetTimetableResponseObjectSubject _$GetTimetableResponseObjectSubjectFromJson( Map json) => GetTimetableResponseObjectSubject( - json['id'] as int, + (json['id'] as num).toInt(), json['name'] as String, json['longname'] as String, ); @@ -184,7 +176,7 @@ Map _$GetTimetableResponseObjectSubjectToJson( GetTimetableResponseObjectRoom _$GetTimetableResponseObjectRoomFromJson( Map json) => GetTimetableResponseObjectRoom( - json['id'] as int, + (json['id'] as num).toInt(), json['name'] as String, json['longname'] as String, ); diff --git a/lib/state/app/infrastructure/loadableState/bloc/loadable_state_state.freezed.dart b/lib/state/app/infrastructure/loadableState/bloc/loadable_state_state.freezed.dart index 66011f9..c064b92 100644 --- a/lib/state/app/infrastructure/loadableState/bloc/loadable_state_state.freezed.dart +++ b/lib/state/app/infrastructure/loadableState/bloc/loadable_state_state.freezed.dart @@ -19,7 +19,9 @@ mixin _$LoadableStateState { List? get connections => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of LoadableStateState + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $LoadableStateStateCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -43,6 +45,8 @@ class _$LoadableStateStateCopyWithImpl<$Res, $Val extends LoadableStateState> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of LoadableStateState + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -76,6 +80,8 @@ class __$$LoadableStateStateImplCopyWithImpl<$Res> $Res Function(_$LoadableStateStateImpl) _then) : super(_value, _then); + /// Create a copy of LoadableStateState + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -125,7 +131,9 @@ class _$LoadableStateStateImpl implements _LoadableStateState { int get hashCode => Object.hash( runtimeType, const DeepCollectionEquality().hash(_connections)); - @JsonKey(ignore: true) + /// Create a copy of LoadableStateState + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$LoadableStateStateImplCopyWith<_$LoadableStateStateImpl> get copyWith => @@ -140,8 +148,11 @@ abstract class _LoadableStateState implements LoadableStateState { @override List? get connections; + + /// Create a copy of LoadableStateState + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$LoadableStateStateImplCopyWith<_$LoadableStateStateImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/state/app/infrastructure/loadableState/loadable_state.freezed.dart b/lib/state/app/infrastructure/loadableState/loadable_state.freezed.dart index e66b4a8..5da3602 100644 --- a/lib/state/app/infrastructure/loadableState/loadable_state.freezed.dart +++ b/lib/state/app/infrastructure/loadableState/loadable_state.freezed.dart @@ -22,7 +22,9 @@ mixin _$LoadableState { void Function()? get reFetch => throw _privateConstructorUsedError; LoadingError? get error => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of LoadableState + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $LoadableStateCopyWith> get copyWith => throw _privateConstructorUsedError; } @@ -54,6 +56,8 @@ class _$LoadableStateCopyWithImpl? get error { @@ -128,6 +134,8 @@ class __$$LoadableStateImplCopyWithImpl $Res Function(_$LoadableStateImpl) _then) : super(_value, _then); + /// Create a copy of LoadableState + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -166,27 +174,22 @@ class __$$LoadableStateImplCopyWithImpl class _$LoadableStateImpl extends _LoadableState { const _$LoadableStateImpl( - {this.isLoading = true, - this.data = null, - this.lastFetch = null, - this.reFetch = null, - this.error = null}) + {required this.isLoading, + required this.data, + required this.lastFetch, + required this.reFetch, + required this.error}) : super._(); @override - @JsonKey() final bool isLoading; @override - @JsonKey() final TState? data; @override - @JsonKey() final int? lastFetch; @override - @JsonKey() final void Function()? reFetch; @override - @JsonKey() final LoadingError? error; @override @@ -212,7 +215,9 @@ class _$LoadableStateImpl extends _LoadableState { int get hashCode => Object.hash(runtimeType, isLoading, const DeepCollectionEquality().hash(data), lastFetch, reFetch, error); - @JsonKey(ignore: true) + /// Create a copy of LoadableState + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$LoadableStateImplCopyWith> @@ -222,11 +227,11 @@ class _$LoadableStateImpl extends _LoadableState { abstract class _LoadableState extends LoadableState { const factory _LoadableState( - {final bool isLoading, - final TState? data, - final int? lastFetch, - final void Function()? reFetch, - final LoadingError? error}) = _$LoadableStateImpl; + {required final bool isLoading, + required final TState? data, + required final int? lastFetch, + required final void Function()? reFetch, + required final LoadingError? error}) = _$LoadableStateImpl; const _LoadableState._() : super._(); @override @@ -239,8 +244,11 @@ abstract class _LoadableState extends LoadableState { void Function()? get reFetch; @override LoadingError? get error; + + /// Create a copy of LoadableState + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$LoadableStateImplCopyWith> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/state/app/infrastructure/loadableState/loading_error.freezed.dart b/lib/state/app/infrastructure/loadableState/loading_error.freezed.dart index 6515a46..7b575c9 100644 --- a/lib/state/app/infrastructure/loadableState/loading_error.freezed.dart +++ b/lib/state/app/infrastructure/loadableState/loading_error.freezed.dart @@ -19,7 +19,9 @@ mixin _$LoadingError { String get message => throw _privateConstructorUsedError; bool get allowRetry => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + /// Create a copy of LoadingError + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $LoadingErrorCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -43,6 +45,8 @@ class _$LoadingErrorCopyWithImpl<$Res, $Val extends LoadingError> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of LoadingError + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -81,6 +85,8 @@ class __$$LoadingErrorImplCopyWithImpl<$Res> _$LoadingErrorImpl _value, $Res Function(_$LoadingErrorImpl) _then) : super(_value, _then); + /// Create a copy of LoadingError + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -129,7 +135,9 @@ class _$LoadingErrorImpl implements _LoadingError { @override int get hashCode => Object.hash(runtimeType, message, allowRetry); - @JsonKey(ignore: true) + /// Create a copy of LoadingError + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$LoadingErrorImplCopyWith<_$LoadingErrorImpl> get copyWith => @@ -145,8 +153,11 @@ abstract class _LoadingError implements LoadingError { String get message; @override bool get allowRetry; + + /// Create a copy of LoadingError + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$LoadingErrorImplCopyWith<_$LoadingErrorImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/state/app/infrastructure/utilityWidgets/loadableHydratedBloc/loadable_save_context.freezed.dart b/lib/state/app/infrastructure/utilityWidgets/loadableHydratedBloc/loadable_save_context.freezed.dart index 649526e..ddf720e 100644 --- a/lib/state/app/infrastructure/utilityWidgets/loadableHydratedBloc/loadable_save_context.freezed.dart +++ b/lib/state/app/infrastructure/utilityWidgets/loadableHydratedBloc/loadable_save_context.freezed.dart @@ -22,8 +22,12 @@ LoadableSaveContext _$LoadableSaveContextFromJson(Map json) { mixin _$LoadableSaveContext { int get timestamp => throw _privateConstructorUsedError; + /// Serializes this LoadableSaveContext to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of LoadableSaveContext + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $LoadableSaveContextCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -47,6 +51,8 @@ class _$LoadableSaveContextCopyWithImpl<$Res, $Val extends LoadableSaveContext> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of LoadableSaveContext + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -80,6 +86,8 @@ class __$$LoadableSaveContextImplCopyWithImpl<$Res> $Res Function(_$LoadableSaveContextImpl) _then) : super(_value, _then); + /// Create a copy of LoadableSaveContext + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -119,11 +127,13 @@ class _$LoadableSaveContextImpl extends _LoadableSaveContext { other.timestamp == timestamp)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, timestamp); - @JsonKey(ignore: true) + /// Create a copy of LoadableSaveContext + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$LoadableSaveContextImplCopyWith<_$LoadableSaveContextImpl> get copyWith => @@ -148,8 +158,11 @@ abstract class _LoadableSaveContext extends LoadableSaveContext { @override int get timestamp; + + /// Create a copy of LoadableSaveContext + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$LoadableSaveContextImplCopyWith<_$LoadableSaveContextImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/state/app/infrastructure/utilityWidgets/loadableHydratedBloc/loadable_save_context.g.dart b/lib/state/app/infrastructure/utilityWidgets/loadableHydratedBloc/loadable_save_context.g.dart index c536225..d987faf 100644 --- a/lib/state/app/infrastructure/utilityWidgets/loadableHydratedBloc/loadable_save_context.g.dart +++ b/lib/state/app/infrastructure/utilityWidgets/loadableHydratedBloc/loadable_save_context.g.dart @@ -9,7 +9,7 @@ part of 'loadable_save_context.dart'; _$LoadableSaveContextImpl _$$LoadableSaveContextImplFromJson( Map json) => _$LoadableSaveContextImpl( - timestamp: json['timestamp'] as int, + timestamp: (json['timestamp'] as num).toInt(), ); Map _$$LoadableSaveContextImplToJson( diff --git a/lib/state/app/modules/gradeAverages/bloc/grade_averages_state.freezed.dart b/lib/state/app/modules/gradeAverages/bloc/grade_averages_state.freezed.dart index c636f4d..5636ee0 100644 --- a/lib/state/app/modules/gradeAverages/bloc/grade_averages_state.freezed.dart +++ b/lib/state/app/modules/gradeAverages/bloc/grade_averages_state.freezed.dart @@ -24,8 +24,12 @@ mixin _$GradeAveragesState { throw _privateConstructorUsedError; List get grades => throw _privateConstructorUsedError; + /// Serializes this GradeAveragesState to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of GradeAveragesState + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $GradeAveragesStateCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -49,6 +53,8 @@ class _$GradeAveragesStateCopyWithImpl<$Res, $Val extends GradeAveragesState> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of GradeAveragesState + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -87,6 +93,8 @@ class __$$GradeAveragesStateImplCopyWithImpl<$Res> $Res Function(_$GradeAveragesStateImpl) _then) : super(_value, _then); + /// Create a copy of GradeAveragesState + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -141,12 +149,14 @@ class _$GradeAveragesStateImpl implements _GradeAveragesState { const DeepCollectionEquality().equals(other._grades, _grades)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( runtimeType, gradingSystem, const DeepCollectionEquality().hash(_grades)); - @JsonKey(ignore: true) + /// Create a copy of GradeAveragesState + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$GradeAveragesStateImplCopyWith<_$GradeAveragesStateImpl> get copyWith => @@ -173,8 +183,11 @@ abstract class _GradeAveragesState implements GradeAveragesState { GradeAveragesGradingSystem get gradingSystem; @override List get grades; + + /// Create a copy of GradeAveragesState + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$GradeAveragesStateImplCopyWith<_$GradeAveragesStateImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/state/app/modules/gradeAverages/bloc/grade_averages_state.g.dart b/lib/state/app/modules/gradeAverages/bloc/grade_averages_state.g.dart index af7af59..26dc9f2 100644 --- a/lib/state/app/modules/gradeAverages/bloc/grade_averages_state.g.dart +++ b/lib/state/app/modules/gradeAverages/bloc/grade_averages_state.g.dart @@ -11,7 +11,9 @@ _$GradeAveragesStateImpl _$$GradeAveragesStateImplFromJson( _$GradeAveragesStateImpl( gradingSystem: $enumDecode( _$GradeAveragesGradingSystemEnumMap, json['gradingSystem']), - grades: (json['grades'] as List).map((e) => e as int).toList(), + grades: (json['grades'] as List) + .map((e) => (e as num).toInt()) + .toList(), ); Map _$$GradeAveragesStateImplToJson( diff --git a/lib/state/app/modules/holidays/bloc/holidays_state.freezed.dart b/lib/state/app/modules/holidays/bloc/holidays_state.freezed.dart index 6659f45..111d23c 100644 --- a/lib/state/app/modules/holidays/bloc/holidays_state.freezed.dart +++ b/lib/state/app/modules/holidays/bloc/holidays_state.freezed.dart @@ -24,8 +24,12 @@ mixin _$HolidaysState { bool get showDisclaimer => throw _privateConstructorUsedError; List get holidays => throw _privateConstructorUsedError; + /// Serializes this HolidaysState to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of HolidaysState + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $HolidaysStateCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -50,6 +54,8 @@ class _$HolidaysStateCopyWithImpl<$Res, $Val extends HolidaysState> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of HolidaysState + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -94,6 +100,8 @@ class __$$HolidaysStateImplCopyWithImpl<$Res> _$HolidaysStateImpl _value, $Res Function(_$HolidaysStateImpl) _then) : super(_value, _then); + /// Create a copy of HolidaysState + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -171,12 +179,14 @@ class _$HolidaysStateImpl const DeepCollectionEquality().equals(other._holidays, _holidays)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, showPastHolidays, showDisclaimer, const DeepCollectionEquality().hash(_holidays)); - @JsonKey(ignore: true) + /// Create a copy of HolidaysState + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$HolidaysStateImplCopyWith<_$HolidaysStateImpl> get copyWith => @@ -205,8 +215,11 @@ abstract class _HolidaysState implements HolidaysState { bool get showDisclaimer; @override List get holidays; + + /// Create a copy of HolidaysState + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$HolidaysStateImplCopyWith<_$HolidaysStateImpl> get copyWith => throw _privateConstructorUsedError; } @@ -224,8 +237,12 @@ mixin _$Holiday { String get name => throw _privateConstructorUsedError; String get slug => throw _privateConstructorUsedError; + /// Serializes this Holiday to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of Holiday + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $HolidayCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -253,6 +270,8 @@ class _$HolidayCopyWithImpl<$Res, $Val extends Holiday> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of Holiday + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -316,6 +335,8 @@ class __$$HolidayImplCopyWithImpl<$Res> _$HolidayImpl _value, $Res Function(_$HolidayImpl) _then) : super(_value, _then); + /// Create a copy of Holiday + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -414,12 +435,14 @@ class _$HolidayImpl with DiagnosticableTreeMixin implements _Holiday { (identical(other.slug, slug) || other.slug == slug)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, start, end, year, stateCode, name, slug); - @JsonKey(ignore: true) + /// Create a copy of Holiday + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$HolidayImplCopyWith<_$HolidayImpl> get copyWith => @@ -456,8 +479,11 @@ abstract class _Holiday implements Holiday { String get name; @override String get slug; + + /// Create a copy of Holiday + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$HolidayImplCopyWith<_$HolidayImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/state/app/modules/holidays/bloc/holidays_state.g.dart b/lib/state/app/modules/holidays/bloc/holidays_state.g.dart index 1d0f3f0..5549e8f 100644 --- a/lib/state/app/modules/holidays/bloc/holidays_state.g.dart +++ b/lib/state/app/modules/holidays/bloc/holidays_state.g.dart @@ -26,7 +26,7 @@ _$HolidayImpl _$$HolidayImplFromJson(Map json) => _$HolidayImpl( start: json['start'] as String, end: json['end'] as String, - year: json['year'] as int, + year: (json['year'] as num).toInt(), stateCode: json['stateCode'] as String, name: json['name'] as String, slug: json['slug'] as String, diff --git a/lib/state/app/modules/marianumMessage/bloc/marianum_message_state.freezed.dart b/lib/state/app/modules/marianumMessage/bloc/marianum_message_state.freezed.dart index 35105e1..b678f47 100644 --- a/lib/state/app/modules/marianumMessage/bloc/marianum_message_state.freezed.dart +++ b/lib/state/app/modules/marianumMessage/bloc/marianum_message_state.freezed.dart @@ -22,8 +22,12 @@ MarianumMessageState _$MarianumMessageStateFromJson(Map json) { mixin _$MarianumMessageState { MarianumMessageList get messageList => throw _privateConstructorUsedError; + /// Serializes this MarianumMessageState to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of MarianumMessageState + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $MarianumMessageStateCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -50,6 +54,8 @@ class _$MarianumMessageStateCopyWithImpl<$Res, // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of MarianumMessageState + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -63,6 +69,8 @@ class _$MarianumMessageStateCopyWithImpl<$Res, ) as $Val); } + /// Create a copy of MarianumMessageState + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $MarianumMessageListCopyWith<$Res> get messageList { @@ -94,6 +102,8 @@ class __$$MarianumMessageStateImplCopyWithImpl<$Res> $Res Function(_$MarianumMessageStateImpl) _then) : super(_value, _then); + /// Create a copy of MarianumMessageState + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -133,11 +143,13 @@ class _$MarianumMessageStateImpl implements _MarianumMessageState { other.messageList == messageList)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, messageList); - @JsonKey(ignore: true) + /// Create a copy of MarianumMessageState + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$MarianumMessageStateImplCopyWith<_$MarianumMessageStateImpl> @@ -163,8 +175,11 @@ abstract class _MarianumMessageState implements MarianumMessageState { @override MarianumMessageList get messageList; + + /// Create a copy of MarianumMessageState + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$MarianumMessageStateImplCopyWith<_$MarianumMessageStateImpl> get copyWith => throw _privateConstructorUsedError; } @@ -178,8 +193,12 @@ mixin _$MarianumMessageList { String get base => throw _privateConstructorUsedError; List get messages => throw _privateConstructorUsedError; + /// Serializes this MarianumMessageList to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of MarianumMessageList + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $MarianumMessageListCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -203,6 +222,8 @@ class _$MarianumMessageListCopyWithImpl<$Res, $Val extends MarianumMessageList> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of MarianumMessageList + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -241,6 +262,8 @@ class __$$MarianumMessageListImplCopyWithImpl<$Res> $Res Function(_$MarianumMessageListImpl) _then) : super(_value, _then); + /// Create a copy of MarianumMessageList + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -294,12 +317,14 @@ class _$MarianumMessageListImpl implements _MarianumMessageList { const DeepCollectionEquality().equals(other._messages, _messages)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( runtimeType, base, const DeepCollectionEquality().hash(_messages)); - @JsonKey(ignore: true) + /// Create a copy of MarianumMessageList + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$MarianumMessageListImplCopyWith<_$MarianumMessageListImpl> get copyWith => @@ -327,8 +352,11 @@ abstract class _MarianumMessageList implements MarianumMessageList { String get base; @override List get messages; + + /// Create a copy of MarianumMessageList + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$MarianumMessageListImplCopyWith<_$MarianumMessageListImpl> get copyWith => throw _privateConstructorUsedError; } @@ -343,8 +371,12 @@ mixin _$MarianumMessage { String get date => throw _privateConstructorUsedError; String get url => throw _privateConstructorUsedError; + /// Serializes this MarianumMessage to a JSON map. Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) + + /// Create a copy of MarianumMessage + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) $MarianumMessageCopyWith get copyWith => throw _privateConstructorUsedError; } @@ -368,6 +400,8 @@ class _$MarianumMessageCopyWithImpl<$Res, $Val extends MarianumMessage> // ignore: unused_field final $Res Function($Val) _then; + /// Create a copy of MarianumMessage + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -411,6 +445,8 @@ class __$$MarianumMessageImplCopyWithImpl<$Res> _$MarianumMessageImpl _value, $Res Function(_$MarianumMessageImpl) _then) : super(_value, _then); + /// Create a copy of MarianumMessage + /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ @@ -466,11 +502,13 @@ class _$MarianumMessageImpl implements _MarianumMessage { (identical(other.url, url) || other.url == url)); } - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, name, date, url); - @JsonKey(ignore: true) + /// Create a copy of MarianumMessage + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$MarianumMessageImplCopyWith<_$MarianumMessageImpl> get copyWith => @@ -500,8 +538,11 @@ abstract class _MarianumMessage implements MarianumMessage { String get date; @override String get url; + + /// Create a copy of MarianumMessage + /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(ignore: true) + @JsonKey(includeFromJson: false, includeToJson: false) _$$MarianumMessageImplCopyWith<_$MarianumMessageImpl> get copyWith => throw _privateConstructorUsedError; }