diff --git a/lib/api/holidays/getHolidaysResponse.g.dart b/lib/api/holidays/getHolidaysResponse.g.dart index 36fddb2..4642931 100644 --- a/lib/api/holidays/getHolidaysResponse.g.dart +++ b/lib/api/holidays/getHolidaysResponse.g.dart @@ -8,39 +8,42 @@ part of 'getHolidaysResponse.dart'; GetHolidaysResponse _$GetHolidaysResponseFromJson(Map json) => GetHolidaysResponse( - (json['data'] as List) - .map((e) => - GetHolidaysResponseObject.fromJson(e as Map)) - .toList(), - )..headers = (json['headers'] as Map?)?.map( + (json['data'] as List) + .map( + (e) => + GetHolidaysResponseObject.fromJson(e as Map), + ) + .toList(), + ) + ..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); Map _$GetHolidaysResponseToJson( - GetHolidaysResponse instance) => - { - if (instance.headers case final value?) 'headers': value, - 'data': instance.data.map((e) => e.toJson()).toList(), - }; + GetHolidaysResponse instance, +) => { + 'headers': ?instance.headers, + '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 num).toInt(), - stateCode: json['stateCode'] as String, - name: json['name'] as String, - slug: json['slug'] as String, - ); + Map json, +) => GetHolidaysResponseObject( + start: json['start'] as String, + end: json['end'] as String, + year: (json['year'] as num).toInt(), + stateCode: json['stateCode'] as String, + name: json['name'] as String, + slug: json['slug'] as String, +); Map _$GetHolidaysResponseObjectToJson( - GetHolidaysResponseObject instance) => - { - 'start': instance.start, - 'end': instance.end, - 'year': instance.year, - 'stateCode': instance.stateCode, - 'name': instance.name, - 'slug': instance.slug, - }; + GetHolidaysResponseObject instance, +) => { + 'start': instance.start, + 'end': instance.end, + 'year': instance.year, + 'stateCode': instance.stateCode, + 'name': instance.name, + 'slug': instance.slug, +}; diff --git a/lib/api/marianumcloud/autocomplete/autocompleteResponse.g.dart b/lib/api/marianumcloud/autocomplete/autocompleteResponse.g.dart index 094f0b7..41ecf2b 100644 --- a/lib/api/marianumcloud/autocomplete/autocompleteResponse.g.dart +++ b/lib/api/marianumcloud/autocomplete/autocompleteResponse.g.dart @@ -7,40 +7,39 @@ part of 'autocompleteResponse.dart'; // ************************************************************************** AutocompleteResponse _$AutocompleteResponseFromJson( - Map json) => - AutocompleteResponse( - (json['data'] as List) - .map((e) => - AutocompleteResponseObject.fromJson(e as Map)) - .toList(), - ); + Map json, +) => AutocompleteResponse( + (json['data'] as List) + .map( + (e) => AutocompleteResponseObject.fromJson(e as Map), + ) + .toList(), +); Map _$AutocompleteResponseToJson( - AutocompleteResponse instance) => - { - 'data': instance.data.map((e) => e.toJson()).toList(), - }; + AutocompleteResponse instance, +) => {'data': instance.data.map((e) => e.toJson()).toList()}; AutocompleteResponseObject _$AutocompleteResponseObjectFromJson( - Map json) => - AutocompleteResponseObject( - json['id'] as String, - json['label'] as String, - json['icon'] as String?, - json['source'] as String?, - json['status'] as String?, - json['subline'] as String?, - json['shareWithDisplayNameUniqe'] as String?, - ); + Map json, +) => AutocompleteResponseObject( + json['id'] as String, + json['label'] as String, + json['icon'] as String?, + json['source'] as String?, + json['status'] as String?, + json['subline'] as String?, + json['shareWithDisplayNameUniqe'] as String?, +); Map _$AutocompleteResponseObjectToJson( - AutocompleteResponseObject instance) => - { - 'id': instance.id, - 'label': instance.label, - 'icon': instance.icon, - 'source': instance.source, - 'status': instance.status, - 'subline': instance.subline, - 'shareWithDisplayNameUniqe': instance.shareWithDisplayNameUniqe, - }; + AutocompleteResponseObject instance, +) => { + 'id': instance.id, + 'label': instance.label, + 'icon': instance.icon, + 'source': instance.source, + 'status': instance.status, + 'subline': instance.subline, + 'shareWithDisplayNameUniqe': instance.shareWithDisplayNameUniqe, +}; diff --git a/lib/api/marianumcloud/files-sharing/fileSharingApiParams.g.dart b/lib/api/marianumcloud/files-sharing/fileSharingApiParams.g.dart index 6aa4059..9fc1e8b 100644 --- a/lib/api/marianumcloud/files-sharing/fileSharingApiParams.g.dart +++ b/lib/api/marianumcloud/files-sharing/fileSharingApiParams.g.dart @@ -7,21 +7,21 @@ part of 'fileSharingApiParams.dart'; // ************************************************************************** FileSharingApiParams _$FileSharingApiParamsFromJson( - Map json) => - FileSharingApiParams( - shareType: (json['shareType'] as num).toInt(), - shareWith: json['shareWith'] as String, - path: json['path'] as String, - referenceId: json['referenceId'] as String?, - talkMetaData: json['talkMetaData'] as String?, - ); + Map json, +) => FileSharingApiParams( + shareType: (json['shareType'] as num).toInt(), + shareWith: json['shareWith'] as String, + path: json['path'] as String, + referenceId: json['referenceId'] as String?, + talkMetaData: json['talkMetaData'] as String?, +); Map _$FileSharingApiParamsToJson( - FileSharingApiParams instance) => - { - 'shareType': instance.shareType, - 'shareWith': instance.shareWith, - 'path': instance.path, - 'referenceId': instance.referenceId, - 'talkMetaData': instance.talkMetaData, - }; + FileSharingApiParams instance, +) => { + 'shareType': instance.shareType, + 'shareWith': instance.shareWith, + 'path': instance.path, + 'referenceId': instance.referenceId, + 'talkMetaData': instance.talkMetaData, +}; diff --git a/lib/api/marianumcloud/talk/chat/getChatParams.g.dart b/lib/api/marianumcloud/talk/chat/getChatParams.g.dart index 0b90c33..a2c9707 100644 --- a/lib/api/marianumcloud/talk/chat/getChatParams.g.dart +++ b/lib/api/marianumcloud/talk/chat/getChatParams.g.dart @@ -8,34 +8,35 @@ part of 'getChatParams.dart'; GetChatParams _$GetChatParamsFromJson(Map json) => GetChatParams( - lookIntoFuture: - $enumDecode(_$GetChatParamsSwitchEnumMap, json['lookIntoFuture']), + lookIntoFuture: $enumDecode( + _$GetChatParamsSwitchEnumMap, + json['lookIntoFuture'], + ), 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']), + _$GetChatParamsSwitchEnumMap, + json['setReadMarker'], + ), includeLastKnown: $enumDecodeNullable( - _$GetChatParamsSwitchEnumMap, json['includeLastKnown']), + _$GetChatParamsSwitchEnumMap, + json['includeLastKnown'], + ), ); -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, - }; +Map _$GetChatParamsToJson( + GetChatParams instance, +) => { + 'lookIntoFuture': _$GetChatParamsSwitchEnumMap[instance.lookIntoFuture]!, + 'limit': ?instance.limit, + 'lastKnownMessageId': ?instance.lastKnownMessageId, + 'lastCommonReadId': ?instance.lastCommonReadId, + 'timeout': ?instance.timeout, + 'setReadMarker': ?_$GetChatParamsSwitchEnumMap[instance.setReadMarker], + 'includeLastKnown': ?_$GetChatParamsSwitchEnumMap[instance.includeLastKnown], +}; 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 1580752..90ac77c 100644 --- a/lib/api/marianumcloud/talk/chat/getChatResponse.g.dart +++ b/lib/api/marianumcloud/talk/chat/getChatResponse.g.dart @@ -8,70 +8,72 @@ part of 'getChatResponse.dart'; GetChatResponse _$GetChatResponseFromJson(Map json) => GetChatResponse( - (json['data'] as List) - .map((e) => GetChatResponseObject.fromJson(e as Map)) - .toSet(), - )..headers = (json['headers'] as Map?)?.map( + (json['data'] as List) + .map( + (e) => GetChatResponseObject.fromJson(e as Map), + ) + .toSet(), + ) + ..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); Map _$GetChatResponseToJson(GetChatResponse instance) => { - if (instance.headers case final value?) 'headers': value, + 'headers': ?instance.headers, 'data': instance.data.map((e) => e.toJson()).toList(), }; GetChatResponseObject _$GetChatResponseObjectFromJson( - Map json) => - GetChatResponseObject( - (json['id'] as num).toInt(), - json['token'] as String, - $enumDecode( - _$GetRoomResponseObjectMessageActorTypeEnumMap, json['actorType']), - json['actorId'] as String, - json['actorDisplayName'] as String, - (json['timestamp'] as num).toInt(), - json['systemMessage'] as String, - $enumDecode( - _$GetRoomResponseObjectMessageTypeEnumMap, json['messageType']), - json['isReplyable'] as bool, - json['referenceId'] as String, - json['message'] as String, - _fromJson(json['messageParameters']), - (json['reactions'] as Map?)?.map( - (k, e) => MapEntry(k, (e as num).toInt()), - ), - (json['reactionsSelf'] as List?) - ?.map((e) => e as String) - .toList(), - json['parent'] == null - ? null - : GetChatResponseObject.fromJson( - json['parent'] as Map), - ); + Map json, +) => GetChatResponseObject( + (json['id'] as num).toInt(), + json['token'] as String, + $enumDecode( + _$GetRoomResponseObjectMessageActorTypeEnumMap, + json['actorType'], + ), + json['actorId'] as String, + json['actorDisplayName'] as String, + (json['timestamp'] as num).toInt(), + json['systemMessage'] as String, + $enumDecode(_$GetRoomResponseObjectMessageTypeEnumMap, json['messageType']), + json['isReplyable'] as bool, + json['referenceId'] as String, + json['message'] as String, + _fromJson(json['messageParameters']), + (json['reactions'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num).toInt()), + ), + (json['reactionsSelf'] as List?)?.map((e) => e as String).toList(), + json['parent'] == null + ? null + : GetChatResponseObject.fromJson(json['parent'] as Map), +); Map _$GetChatResponseObjectToJson( - GetChatResponseObject instance) => - { - 'id': instance.id, - 'token': instance.token, - 'actorType': - _$GetRoomResponseObjectMessageActorTypeEnumMap[instance.actorType]!, - 'actorId': instance.actorId, - 'actorDisplayName': instance.actorDisplayName, - 'timestamp': instance.timestamp, - 'systemMessage': instance.systemMessage, - 'messageType': - _$GetRoomResponseObjectMessageTypeEnumMap[instance.messageType]!, - 'isReplyable': instance.isReplyable, - 'referenceId': instance.referenceId, - 'message': instance.message, - 'reactions': instance.reactions, - 'reactionsSelf': instance.reactionsSelf, - 'messageParameters': - instance.messageParameters?.map((k, e) => MapEntry(k, e.toJson())), - 'parent': instance.parent?.toJson(), - }; + GetChatResponseObject instance, +) => { + 'id': instance.id, + 'token': instance.token, + 'actorType': + _$GetRoomResponseObjectMessageActorTypeEnumMap[instance.actorType]!, + 'actorId': instance.actorId, + 'actorDisplayName': instance.actorDisplayName, + 'timestamp': instance.timestamp, + 'systemMessage': instance.systemMessage, + 'messageType': + _$GetRoomResponseObjectMessageTypeEnumMap[instance.messageType]!, + 'isReplyable': instance.isReplyable, + 'referenceId': instance.referenceId, + 'message': instance.message, + 'reactions': instance.reactions, + 'reactionsSelf': instance.reactionsSelf, + 'messageParameters': instance.messageParameters?.map( + (k, e) => MapEntry(k, e.toJson()), + ), + 'parent': instance.parent?.toJson(), +}; const _$GetRoomResponseObjectMessageActorTypeEnumMap = { GetRoomResponseObjectMessageActorType.deletedUsers: 'deleted_users', diff --git a/lib/api/marianumcloud/talk/deleteReactMessage/deleteReactMessageParams.g.dart b/lib/api/marianumcloud/talk/deleteReactMessage/deleteReactMessageParams.g.dart index f87c080..7dc6c79 100644 --- a/lib/api/marianumcloud/talk/deleteReactMessage/deleteReactMessageParams.g.dart +++ b/lib/api/marianumcloud/talk/deleteReactMessage/deleteReactMessageParams.g.dart @@ -7,13 +7,9 @@ part of 'deleteReactMessageParams.dart'; // ************************************************************************** DeleteReactMessageParams _$DeleteReactMessageParamsFromJson( - Map json) => - DeleteReactMessageParams( - json['reaction'] as String, - ); + Map json, +) => DeleteReactMessageParams(json['reaction'] as String); Map _$DeleteReactMessageParamsToJson( - DeleteReactMessageParams instance) => - { - 'reaction': instance.reaction, - }; + DeleteReactMessageParams instance, +) => {'reaction': instance.reaction}; diff --git a/lib/api/marianumcloud/talk/getParticipants/getParticipantsResponse.g.dart b/lib/api/marianumcloud/talk/getParticipants/getParticipantsResponse.g.dart index f9a2624..424b161 100644 --- a/lib/api/marianumcloud/talk/getParticipants/getParticipantsResponse.g.dart +++ b/lib/api/marianumcloud/talk/getParticipants/getParticipantsResponse.g.dart @@ -7,66 +7,77 @@ part of 'getParticipantsResponse.dart'; // ************************************************************************** GetParticipantsResponse _$GetParticipantsResponseFromJson( - Map json) => + Map json, +) => GetParticipantsResponse( - (json['data'] as List) - .map((e) => - GetParticipantsResponseObject.fromJson(e as Map)) - .toSet(), - )..headers = (json['headers'] as Map?)?.map( + (json['data'] as List) + .map( + (e) => GetParticipantsResponseObject.fromJson( + e as Map, + ), + ) + .toSet(), + ) + ..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); Map _$GetParticipantsResponseToJson( - GetParticipantsResponse instance) => - { - if (instance.headers case final value?) 'headers': value, - 'data': instance.data.map((e) => e.toJson()).toList(), - }; + GetParticipantsResponse instance, +) => { + 'headers': ?instance.headers, + 'data': instance.data.map((e) => e.toJson()).toList(), +}; GetParticipantsResponseObject _$GetParticipantsResponseObjectFromJson( - Map json) => - GetParticipantsResponseObject( - (json['attendeeId'] as num).toInt(), - json['actorType'] as String, - json['actorId'] as String, - json['displayName'] as String, - $enumDecode(_$GetParticipantsResponseObjectParticipantTypeEnumMap, - json['participantType']), - (json['lastPing'] as num).toInt(), - $enumDecode(_$GetParticipantsResponseObjectParticipantsInCallFlagsEnumMap, - json['inCall']), - (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?, - json['statusIcon'] as String?, - json['statusMessage'] as String?, - json['roomToken'] as String?, - ); + Map json, +) => GetParticipantsResponseObject( + (json['attendeeId'] as num).toInt(), + json['actorType'] as String, + json['actorId'] as String, + json['displayName'] as String, + $enumDecode( + _$GetParticipantsResponseObjectParticipantTypeEnumMap, + json['participantType'], + ), + (json['lastPing'] as num).toInt(), + $enumDecode( + _$GetParticipantsResponseObjectParticipantsInCallFlagsEnumMap, + json['inCall'], + ), + (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?, + json['statusIcon'] as String?, + json['statusMessage'] as String?, + json['roomToken'] as String?, +); Map _$GetParticipantsResponseObjectToJson( - GetParticipantsResponseObject instance) => - { - 'attendeeId': instance.attendeeId, - 'actorType': instance.actorType, - 'actorId': instance.actorId, - 'displayName': instance.displayName, - 'participantType': _$GetParticipantsResponseObjectParticipantTypeEnumMap[ - instance.participantType]!, - 'lastPing': instance.lastPing, - 'inCall': _$GetParticipantsResponseObjectParticipantsInCallFlagsEnumMap[ - instance.inCall]!, - 'permissions': instance.permissions, - 'attendeePermissions': instance.attendeePermissions, - 'sessionId': instance.sessionId, - 'sessionIds': instance.sessionIds, - 'status': instance.status, - 'statusIcon': instance.statusIcon, - 'statusMessage': instance.statusMessage, - 'roomToken': instance.roomToken, - }; + GetParticipantsResponseObject instance, +) => { + 'attendeeId': instance.attendeeId, + 'actorType': instance.actorType, + 'actorId': instance.actorId, + 'displayName': instance.displayName, + 'participantType': + _$GetParticipantsResponseObjectParticipantTypeEnumMap[instance + .participantType]!, + 'lastPing': instance.lastPing, + 'inCall': + _$GetParticipantsResponseObjectParticipantsInCallFlagsEnumMap[instance + .inCall]!, + 'permissions': instance.permissions, + 'attendeePermissions': instance.attendeePermissions, + 'sessionId': instance.sessionId, + 'sessionIds': instance.sessionIds, + 'status': instance.status, + 'statusIcon': instance.statusIcon, + 'statusMessage': instance.statusMessage, + 'roomToken': instance.roomToken, +}; const _$GetParticipantsResponseObjectParticipantTypeEnumMap = { GetParticipantsResponseObjectParticipantType.owner: 1, diff --git a/lib/api/marianumcloud/talk/getReactions/getReactionsResponse.g.dart b/lib/api/marianumcloud/talk/getReactions/getReactionsResponse.g.dart index 329a4b4..2fa0d24 100644 --- a/lib/api/marianumcloud/talk/getReactions/getReactionsResponse.g.dart +++ b/lib/api/marianumcloud/talk/getReactions/getReactionsResponse.g.dart @@ -7,47 +7,53 @@ part of 'getReactionsResponse.dart'; // ************************************************************************** GetReactionsResponse _$GetReactionsResponseFromJson( - Map json) => + Map json, +) => GetReactionsResponse( - (json['data'] as Map).map( - (k, e) => MapEntry( + (json['data'] as Map).map( + (k, e) => MapEntry( k, (e as List) - .map((e) => GetReactionsResponseObject.fromJson( - e as Map)) - .toList()), - ), - )..headers = (json['headers'] as Map?)?.map( + .map( + (e) => GetReactionsResponseObject.fromJson( + e as Map, + ), + ) + .toList(), + ), + ), + ) + ..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); Map _$GetReactionsResponseToJson( - GetReactionsResponse instance) => - { - if (instance.headers case final value?) 'headers': value, - 'data': instance.data - .map((k, e) => MapEntry(k, e.map((e) => e.toJson()).toList())), - }; + GetReactionsResponse instance, +) => { + 'headers': ?instance.headers, + 'data': instance.data.map( + (k, e) => MapEntry(k, e.map((e) => e.toJson()).toList()), + ), +}; GetReactionsResponseObject _$GetReactionsResponseObjectFromJson( - Map json) => - GetReactionsResponseObject( - $enumDecode( - _$GetReactionsResponseObjectActorTypeEnumMap, json['actorType']), - json['actorId'] as String, - json['actorDisplayName'] as String, - (json['timestamp'] as num).toInt(), - ); + Map json, +) => GetReactionsResponseObject( + $enumDecode(_$GetReactionsResponseObjectActorTypeEnumMap, json['actorType']), + json['actorId'] as String, + json['actorDisplayName'] as String, + (json['timestamp'] as num).toInt(), +); Map _$GetReactionsResponseObjectToJson( - GetReactionsResponseObject instance) => - { - 'actorType': - _$GetReactionsResponseObjectActorTypeEnumMap[instance.actorType]!, - 'actorId': instance.actorId, - 'actorDisplayName': instance.actorDisplayName, - 'timestamp': instance.timestamp, - }; + GetReactionsResponseObject instance, +) => { + 'actorType': + _$GetReactionsResponseObjectActorTypeEnumMap[instance.actorType]!, + 'actorId': instance.actorId, + 'actorDisplayName': instance.actorDisplayName, + 'timestamp': instance.timestamp, +}; const _$GetReactionsResponseObjectActorTypeEnumMap = { GetReactionsResponseObjectActorType.guests: 'guests', diff --git a/lib/api/marianumcloud/talk/reactMessage/reactMessageParams.g.dart b/lib/api/marianumcloud/talk/reactMessage/reactMessageParams.g.dart index dd900b7..328c53a 100644 --- a/lib/api/marianumcloud/talk/reactMessage/reactMessageParams.g.dart +++ b/lib/api/marianumcloud/talk/reactMessage/reactMessageParams.g.dart @@ -7,11 +7,7 @@ part of 'reactMessageParams.dart'; // ************************************************************************** ReactMessageParams _$ReactMessageParamsFromJson(Map json) => - ReactMessageParams( - json['reaction'] as String, - ); + ReactMessageParams(json['reaction'] as String); Map _$ReactMessageParamsToJson(ReactMessageParams instance) => - { - 'reaction': instance.reaction, - }; + {'reaction': instance.reaction}; diff --git a/lib/api/marianumcloud/talk/room/getRoomParams.g.dart b/lib/api/marianumcloud/talk/room/getRoomParams.g.dart index 2e96914..0e20511 100644 --- a/lib/api/marianumcloud/talk/room/getRoomParams.g.dart +++ b/lib/api/marianumcloud/talk/room/getRoomParams.g.dart @@ -9,18 +9,20 @@ part of 'getRoomParams.dart'; GetRoomParams _$GetRoomParamsFromJson(Map json) => GetRoomParams( noStatusUpdate: $enumDecodeNullable( - _$GetRoomParamsStatusUpdateEnumMap, json['noStatusUpdate']), + _$GetRoomParamsStatusUpdateEnumMap, + json['noStatusUpdate'], + ), includeStatus: json['includeStatus'] as bool?, modifiedSince: (json['modifiedSince'] as num?)?.toInt(), ); -Map _$GetRoomParamsToJson(GetRoomParams instance) => - { - 'noStatusUpdate': - _$GetRoomParamsStatusUpdateEnumMap[instance.noStatusUpdate], - 'includeStatus': GetRoomParams._format(instance.includeStatus), - 'modifiedSince': instance.modifiedSince, - }; +Map _$GetRoomParamsToJson( + GetRoomParams instance, +) => { + 'noStatusUpdate': _$GetRoomParamsStatusUpdateEnumMap[instance.noStatusUpdate], + 'includeStatus': GetRoomParams._format(instance.includeStatus), + 'modifiedSince': instance.modifiedSince, +}; const _$GetRoomParamsStatusUpdateEnumMap = { GetRoomParamsStatusUpdate.defaults: 0, diff --git a/lib/api/marianumcloud/talk/room/getRoomResponse.g.dart b/lib/api/marianumcloud/talk/room/getRoomResponse.g.dart index 738fc95..92491fb 100644 --- a/lib/api/marianumcloud/talk/room/getRoomResponse.g.dart +++ b/lib/api/marianumcloud/talk/room/getRoomResponse.g.dart @@ -8,93 +8,97 @@ part of 'getRoomResponse.dart'; GetRoomResponse _$GetRoomResponseFromJson(Map json) => GetRoomResponse( - (json['data'] as List) - .map((e) => GetRoomResponseObject.fromJson(e as Map)) - .toSet(), - )..headers = (json['headers'] as Map?)?.map( + (json['data'] as List) + .map( + (e) => GetRoomResponseObject.fromJson(e as Map), + ) + .toSet(), + ) + ..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); Map _$GetRoomResponseToJson(GetRoomResponse instance) => { - if (instance.headers case final value?) 'headers': value, + 'headers': ?instance.headers, 'data': instance.data.map((e) => e.toJson()).toList(), }; GetRoomResponseObject _$GetRoomResponseObjectFromJson( - Map json) => - GetRoomResponseObject( - (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 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 num).toInt(), - json['canStartCall'] as bool, - json['canDeleteConversation'] as bool, - json['canLeaveConversation'] as bool, - (json['lastActivity'] as num).toInt(), - json['isFavorite'] as bool, - $enumDecode(_$GetRoomResponseObjectParticipantNotificationLevelEnumMap, - json['notificationLevel']), - (json['unreadMessages'] as num).toInt(), - json['unreadMention'] as bool, - json['unreadMentionDirect'] as bool, - (json['lastReadMessage'] as num).toInt(), - (json['lastCommonReadMessage'] as num).toInt(), - GetChatResponseObject.fromJson( - json['lastMessage'] as Map), - json['status'] as String?, - json['statusIcon'] as String?, - json['statusMessage'] as String?, - )..sort = json['sort'] as String?; + Map json, +) => GetRoomResponseObject( + (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 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 num).toInt(), + json['canStartCall'] as bool, + json['canDeleteConversation'] as bool, + json['canLeaveConversation'] as bool, + (json['lastActivity'] as num).toInt(), + json['isFavorite'] as bool, + $enumDecode( + _$GetRoomResponseObjectParticipantNotificationLevelEnumMap, + json['notificationLevel'], + ), + (json['unreadMessages'] as num).toInt(), + json['unreadMention'] as bool, + json['unreadMentionDirect'] as bool, + (json['lastReadMessage'] as num).toInt(), + (json['lastCommonReadMessage'] as num).toInt(), + GetChatResponseObject.fromJson(json['lastMessage'] as Map), + json['status'] as String?, + json['statusIcon'] as String?, + json['statusMessage'] as String?, +)..sort = json['sort'] as String?; Map _$GetRoomResponseObjectToJson( - GetRoomResponseObject instance) => - { - 'id': instance.id, - 'token': instance.token, - 'type': _$GetRoomResponseObjectConversationTypeEnumMap[instance.type]!, - 'name': instance.name, - 'displayName': instance.displayName, - 'description': instance.description, - 'participantType': instance.participantType, - 'participantFlags': instance.participantFlags, - 'readOnly': instance.readOnly, - 'listable': instance.listable, - 'lastPing': instance.lastPing, - 'sessionId': instance.sessionId, - 'hasPassword': instance.hasPassword, - 'hasCall': instance.hasCall, - 'callFlag': instance.callFlag, - 'canStartCall': instance.canStartCall, - 'canDeleteConversation': instance.canDeleteConversation, - 'canLeaveConversation': instance.canLeaveConversation, - 'lastActivity': instance.lastActivity, - 'isFavorite': instance.isFavorite, - 'notificationLevel': - _$GetRoomResponseObjectParticipantNotificationLevelEnumMap[ - instance.notificationLevel]!, - 'unreadMessages': instance.unreadMessages, - 'unreadMention': instance.unreadMention, - 'unreadMentionDirect': instance.unreadMentionDirect, - 'lastReadMessage': instance.lastReadMessage, - 'lastCommonReadMessage': instance.lastCommonReadMessage, - 'lastMessage': instance.lastMessage.toJson(), - 'status': instance.status, - 'statusIcon': instance.statusIcon, - 'statusMessage': instance.statusMessage, - 'sort': instance.sort, - }; + GetRoomResponseObject instance, +) => { + 'id': instance.id, + 'token': instance.token, + 'type': _$GetRoomResponseObjectConversationTypeEnumMap[instance.type]!, + 'name': instance.name, + 'displayName': instance.displayName, + 'description': instance.description, + 'participantType': instance.participantType, + 'participantFlags': instance.participantFlags, + 'readOnly': instance.readOnly, + 'listable': instance.listable, + 'lastPing': instance.lastPing, + 'sessionId': instance.sessionId, + 'hasPassword': instance.hasPassword, + 'hasCall': instance.hasCall, + 'callFlag': instance.callFlag, + 'canStartCall': instance.canStartCall, + 'canDeleteConversation': instance.canDeleteConversation, + 'canLeaveConversation': instance.canLeaveConversation, + 'lastActivity': instance.lastActivity, + 'isFavorite': instance.isFavorite, + 'notificationLevel': + _$GetRoomResponseObjectParticipantNotificationLevelEnumMap[instance + .notificationLevel]!, + 'unreadMessages': instance.unreadMessages, + 'unreadMention': instance.unreadMention, + 'unreadMentionDirect': instance.unreadMentionDirect, + 'lastReadMessage': instance.lastReadMessage, + 'lastCommonReadMessage': instance.lastCommonReadMessage, + 'lastMessage': instance.lastMessage.toJson(), + 'status': instance.status, + 'statusIcon': instance.statusIcon, + 'statusMessage': instance.statusMessage, + 'sort': instance.sort, +}; const _$GetRoomResponseObjectConversationTypeEnumMap = { GetRoomResponseObjectConversationType.oneToOne: 1, diff --git a/lib/api/marianumcloud/talk/sendMessage/sendMessageParams.g.dart b/lib/api/marianumcloud/talk/sendMessage/sendMessageParams.g.dart index d611904..602decc 100644 --- a/lib/api/marianumcloud/talk/sendMessage/sendMessageParams.g.dart +++ b/lib/api/marianumcloud/talk/sendMessage/sendMessageParams.g.dart @@ -15,5 +15,5 @@ SendMessageParams _$SendMessageParamsFromJson(Map json) => Map _$SendMessageParamsToJson(SendMessageParams instance) => { 'message': instance.message, - if (instance.replyTo case final value?) 'replyTo': value, + 'replyTo': ?instance.replyTo, }; diff --git a/lib/api/marianumcloud/talk/setReadMarker/setReadMarkerParams.g.dart b/lib/api/marianumcloud/talk/setReadMarker/setReadMarkerParams.g.dart index eadde06..5c3c941 100644 --- a/lib/api/marianumcloud/talk/setReadMarker/setReadMarkerParams.g.dart +++ b/lib/api/marianumcloud/talk/setReadMarker/setReadMarkerParams.g.dart @@ -12,7 +12,5 @@ SetReadMarkerParams _$SetReadMarkerParamsFromJson(Map json) => ); Map _$SetReadMarkerParamsToJson( - SetReadMarkerParams instance) => - { - 'lastReadMessage': instance.lastReadMessage, - }; + SetReadMarkerParams instance, +) => {'lastReadMessage': instance.lastReadMessage}; diff --git a/lib/api/marianumcloud/webdav/queries/downloadFile/downloadFileResponse.g.dart b/lib/api/marianumcloud/webdav/queries/downloadFile/downloadFileResponse.g.dart index 156b892..745d832 100644 --- a/lib/api/marianumcloud/webdav/queries/downloadFile/downloadFileResponse.g.dart +++ b/lib/api/marianumcloud/webdav/queries/downloadFile/downloadFileResponse.g.dart @@ -7,13 +7,9 @@ part of 'downloadFileResponse.dart'; // ************************************************************************** DownloadFileResponse _$DownloadFileResponseFromJson( - Map json) => - DownloadFileResponse( - json['path'] as String, - ); + Map json, +) => DownloadFileResponse(json['path'] as String); Map _$DownloadFileResponseToJson( - DownloadFileResponse instance) => - { - 'path': instance.path, - }; + DownloadFileResponse instance, +) => {'path': instance.path}; diff --git a/lib/api/marianumcloud/webdav/queries/listFiles/listFilesParams.g.dart b/lib/api/marianumcloud/webdav/queries/listFiles/listFilesParams.g.dart index e72b05c..6a72efd 100644 --- a/lib/api/marianumcloud/webdav/queries/listFiles/listFilesParams.g.dart +++ b/lib/api/marianumcloud/webdav/queries/listFiles/listFilesParams.g.dart @@ -7,11 +7,7 @@ part of 'listFilesParams.dart'; // ************************************************************************** ListFilesParams _$ListFilesParamsFromJson(Map json) => - ListFilesParams( - json['path'] as String, - ); + ListFilesParams(json['path'] as String); Map _$ListFilesParamsToJson(ListFilesParams instance) => - { - 'path': instance.path, - }; + {'path': instance.path}; diff --git a/lib/api/marianumcloud/webdav/queries/listFiles/listFilesResponse.g.dart b/lib/api/marianumcloud/webdav/queries/listFiles/listFilesResponse.g.dart index b518755..77522c2 100644 --- a/lib/api/marianumcloud/webdav/queries/listFiles/listFilesResponse.g.dart +++ b/lib/api/marianumcloud/webdav/queries/listFiles/listFilesResponse.g.dart @@ -8,15 +8,16 @@ part of 'listFilesResponse.dart'; ListFilesResponse _$ListFilesResponseFromJson(Map json) => ListFilesResponse( - (json['files'] as List) - .map((e) => CacheableFile.fromJson(e as Map)) - .toSet(), - )..headers = (json['headers'] as Map?)?.map( + (json['files'] as List) + .map((e) => CacheableFile.fromJson(e as Map)) + .toSet(), + ) + ..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); Map _$ListFilesResponseToJson(ListFilesResponse instance) => { - if (instance.headers case final value?) 'headers': value, + 'headers': ?instance.headers, '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 e0bbc62..5a2418c 100644 --- a/lib/api/mhsl/breaker/getBreakers/getBreakersResponse.g.dart +++ b/lib/api/mhsl/breaker/getBreakers/getBreakersResponse.g.dart @@ -8,38 +8,43 @@ part of 'getBreakersResponse.dart'; GetBreakersResponse _$GetBreakersResponseFromJson(Map json) => GetBreakersResponse( - GetBreakersReponseObject.fromJson(json['global'] as Map), - (json['regional'] as Map).map( - (k, e) => MapEntry( - k, GetBreakersReponseObject.fromJson(e as Map)), - ), - )..headers = (json['headers'] as Map?)?.map( + GetBreakersReponseObject.fromJson( + json['global'] as Map, + ), + (json['regional'] as Map).map( + (k, e) => MapEntry( + k, + GetBreakersReponseObject.fromJson(e as Map), + ), + ), + ) + ..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); 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())), - }; + GetBreakersResponse instance, +) => { + 'headers': ?instance.headers, + 'global': instance.global.toJson(), + 'regional': instance.regional.map((k, e) => MapEntry(k, e.toJson())), +}; GetBreakersReponseObject _$GetBreakersReponseObjectFromJson( - Map json) => - GetBreakersReponseObject( - (json['areas'] as List) - .map((e) => $enumDecode(_$BreakerAreaEnumMap, e)) - .toList(), - json['message'] as String, - ); + Map json, +) => GetBreakersReponseObject( + (json['areas'] as List) + .map((e) => $enumDecode(_$BreakerAreaEnumMap, e)) + .toList(), + json['message'] as String, +); Map _$GetBreakersReponseObjectToJson( - GetBreakersReponseObject instance) => - { - 'areas': instance.areas.map((e) => _$BreakerAreaEnumMap[e]!).toList(), - 'message': instance.message, - }; + GetBreakersReponseObject instance, +) => { + 'areas': instance.areas.map((e) => _$BreakerAreaEnumMap[e]!).toList(), + 'message': instance.message, +}; const _$BreakerAreaEnumMap = { BreakerArea.global: 'GLOBAL', diff --git a/lib/api/mhsl/customTimetableEvent/add/addCustomTimetableEventParams.g.dart b/lib/api/mhsl/customTimetableEvent/add/addCustomTimetableEventParams.g.dart index 1b89749..e8d2b80 100644 --- a/lib/api/mhsl/customTimetableEvent/add/addCustomTimetableEventParams.g.dart +++ b/lib/api/mhsl/customTimetableEvent/add/addCustomTimetableEventParams.g.dart @@ -7,15 +7,12 @@ part of 'addCustomTimetableEventParams.dart'; // ************************************************************************** AddCustomTimetableEventParams _$AddCustomTimetableEventParamsFromJson( - Map json) => - AddCustomTimetableEventParams( - json['user'] as String, - CustomTimetableEvent.fromJson(json['event'] as Map), - ); + Map json, +) => AddCustomTimetableEventParams( + json['user'] as String, + CustomTimetableEvent.fromJson(json['event'] as Map), +); Map _$AddCustomTimetableEventParamsToJson( - AddCustomTimetableEventParams instance) => - { - 'user': instance.user, - 'event': instance.event.toJson(), - }; + AddCustomTimetableEventParams instance, +) => {'user': instance.user, 'event': instance.event.toJson()}; diff --git a/lib/api/mhsl/customTimetableEvent/customTimetableEvent.g.dart b/lib/api/mhsl/customTimetableEvent/customTimetableEvent.g.dart index 433f7e6..e15d6d8 100644 --- a/lib/api/mhsl/customTimetableEvent/customTimetableEvent.g.dart +++ b/lib/api/mhsl/customTimetableEvent/customTimetableEvent.g.dart @@ -7,29 +7,29 @@ part of 'customTimetableEvent.dart'; // ************************************************************************** CustomTimetableEvent _$CustomTimetableEventFromJson( - Map json) => - CustomTimetableEvent( - id: json['id'] as String, - title: json['title'] as String, - description: json['description'] as String, - startDate: MhslApi.dateTimeFromJson(json['startDate'] as String), - endDate: MhslApi.dateTimeFromJson(json['endDate'] as String), - color: json['color'] as String?, - rrule: json['rrule'] as String, - createdAt: MhslApi.dateTimeFromJson(json['createdAt'] as String), - updatedAt: MhslApi.dateTimeFromJson(json['updatedAt'] as String), - ); + Map json, +) => CustomTimetableEvent( + id: json['id'] as String, + title: json['title'] as String, + description: json['description'] as String, + startDate: MhslApi.dateTimeFromJson(json['startDate'] as String), + endDate: MhslApi.dateTimeFromJson(json['endDate'] as String), + color: json['color'] as String?, + rrule: json['rrule'] as String, + createdAt: MhslApi.dateTimeFromJson(json['createdAt'] as String), + updatedAt: MhslApi.dateTimeFromJson(json['updatedAt'] as String), +); Map _$CustomTimetableEventToJson( - CustomTimetableEvent instance) => - { - 'id': instance.id, - 'title': instance.title, - 'description': instance.description, - 'startDate': MhslApi.dateTimeToJson(instance.startDate), - 'endDate': MhslApi.dateTimeToJson(instance.endDate), - 'color': instance.color, - 'rrule': instance.rrule, - 'createdAt': MhslApi.dateTimeToJson(instance.createdAt), - 'updatedAt': MhslApi.dateTimeToJson(instance.updatedAt), - }; + CustomTimetableEvent instance, +) => { + 'id': instance.id, + 'title': instance.title, + 'description': instance.description, + 'startDate': MhslApi.dateTimeToJson(instance.startDate), + 'endDate': MhslApi.dateTimeToJson(instance.endDate), + 'color': instance.color, + 'rrule': instance.rrule, + 'createdAt': MhslApi.dateTimeToJson(instance.createdAt), + 'updatedAt': MhslApi.dateTimeToJson(instance.updatedAt), +}; diff --git a/lib/api/mhsl/customTimetableEvent/get/getCustomTimetableEventParams.g.dart b/lib/api/mhsl/customTimetableEvent/get/getCustomTimetableEventParams.g.dart index 0909cf3..6fc4044 100644 --- a/lib/api/mhsl/customTimetableEvent/get/getCustomTimetableEventParams.g.dart +++ b/lib/api/mhsl/customTimetableEvent/get/getCustomTimetableEventParams.g.dart @@ -7,13 +7,9 @@ part of 'getCustomTimetableEventParams.dart'; // ************************************************************************** GetCustomTimetableEventParams _$GetCustomTimetableEventParamsFromJson( - Map json) => - GetCustomTimetableEventParams( - json['user'] as String, - ); + Map json, +) => GetCustomTimetableEventParams(json['user'] as String); Map _$GetCustomTimetableEventParamsToJson( - GetCustomTimetableEventParams instance) => - { - 'user': instance.user, - }; + GetCustomTimetableEventParams instance, +) => {'user': instance.user}; diff --git a/lib/api/mhsl/customTimetableEvent/get/getCustomTimetableEventResponse.g.dart b/lib/api/mhsl/customTimetableEvent/get/getCustomTimetableEventResponse.g.dart index b869f4f..3e16db0 100644 --- a/lib/api/mhsl/customTimetableEvent/get/getCustomTimetableEventResponse.g.dart +++ b/lib/api/mhsl/customTimetableEvent/get/getCustomTimetableEventResponse.g.dart @@ -7,18 +7,19 @@ part of 'getCustomTimetableEventResponse.dart'; // ************************************************************************** GetCustomTimetableEventResponse _$GetCustomTimetableEventResponseFromJson( - Map json) => + Map json, +) => GetCustomTimetableEventResponse( - (json['events'] as List) - .map((e) => CustomTimetableEvent.fromJson(e as Map)) - .toList(), - )..headers = (json['headers'] as Map?)?.map( + (json['events'] as List) + .map( + (e) => CustomTimetableEvent.fromJson(e as Map), + ) + .toList(), + ) + ..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); Map _$GetCustomTimetableEventResponseToJson( - GetCustomTimetableEventResponse instance) => - { - if (instance.headers case final value?) 'headers': value, - 'events': instance.events, - }; + GetCustomTimetableEventResponse instance, +) => {'headers': ?instance.headers, 'events': instance.events}; diff --git a/lib/api/mhsl/customTimetableEvent/remove/removeCustomTimetableEventParams.g.dart b/lib/api/mhsl/customTimetableEvent/remove/removeCustomTimetableEventParams.g.dart index 5300301..aa30f6f 100644 --- a/lib/api/mhsl/customTimetableEvent/remove/removeCustomTimetableEventParams.g.dart +++ b/lib/api/mhsl/customTimetableEvent/remove/removeCustomTimetableEventParams.g.dart @@ -7,13 +7,9 @@ part of 'removeCustomTimetableEventParams.dart'; // ************************************************************************** RemoveCustomTimetableEventParams _$RemoveCustomTimetableEventParamsFromJson( - Map json) => - RemoveCustomTimetableEventParams( - json['id'] as String, - ); + Map json, +) => RemoveCustomTimetableEventParams(json['id'] as String); Map _$RemoveCustomTimetableEventParamsToJson( - RemoveCustomTimetableEventParams instance) => - { - 'id': instance.id, - }; + RemoveCustomTimetableEventParams instance, +) => {'id': instance.id}; diff --git a/lib/api/mhsl/customTimetableEvent/update/updateCustomTimetableEventParams.g.dart b/lib/api/mhsl/customTimetableEvent/update/updateCustomTimetableEventParams.g.dart index 14c654c..11ec8e9 100644 --- a/lib/api/mhsl/customTimetableEvent/update/updateCustomTimetableEventParams.g.dart +++ b/lib/api/mhsl/customTimetableEvent/update/updateCustomTimetableEventParams.g.dart @@ -7,15 +7,12 @@ part of 'updateCustomTimetableEventParams.dart'; // ************************************************************************** UpdateCustomTimetableEventParams _$UpdateCustomTimetableEventParamsFromJson( - Map json) => - UpdateCustomTimetableEventParams( - json['id'] as String, - CustomTimetableEvent.fromJson(json['event'] as Map), - ); + Map json, +) => UpdateCustomTimetableEventParams( + json['id'] as String, + CustomTimetableEvent.fromJson(json['event'] as Map), +); Map _$UpdateCustomTimetableEventParamsToJson( - UpdateCustomTimetableEventParams instance) => - { - 'id': instance.id, - 'event': instance.event.toJson(), - }; + UpdateCustomTimetableEventParams instance, +) => {'id': instance.id, 'event': instance.event.toJson()}; diff --git a/lib/api/mhsl/notify/register/notifyRegisterParams.g.dart b/lib/api/mhsl/notify/register/notifyRegisterParams.g.dart index 0b26d8d..d862558 100644 --- a/lib/api/mhsl/notify/register/notifyRegisterParams.g.dart +++ b/lib/api/mhsl/notify/register/notifyRegisterParams.g.dart @@ -7,17 +7,17 @@ part of 'notifyRegisterParams.dart'; // ************************************************************************** NotifyRegisterParams _$NotifyRegisterParamsFromJson( - Map json) => - NotifyRegisterParams( - username: json['username'] as String, - password: json['password'] as String, - fcmToken: json['fcmToken'] as String, - ); + Map json, +) => NotifyRegisterParams( + username: json['username'] as String, + password: json['password'] as String, + fcmToken: json['fcmToken'] as String, +); Map _$NotifyRegisterParamsToJson( - NotifyRegisterParams instance) => - { - 'username': instance.username, - 'password': instance.password, - 'fcmToken': instance.fcmToken, - }; + NotifyRegisterParams instance, +) => { + 'username': instance.username, + 'password': instance.password, + 'fcmToken': instance.fcmToken, +}; diff --git a/lib/api/mhsl/server/userIndex/update/updateUserIndexParams.g.dart b/lib/api/mhsl/server/userIndex/update/updateUserIndexParams.g.dart index 324500b..285302a 100644 --- a/lib/api/mhsl/server/userIndex/update/updateUserIndexParams.g.dart +++ b/lib/api/mhsl/server/userIndex/update/updateUserIndexParams.g.dart @@ -7,21 +7,21 @@ part of 'updateUserIndexParams.dart'; // ************************************************************************** UpdateUserIndexParams _$UpdateUserIndexParamsFromJson( - Map json) => - UpdateUserIndexParams( - user: json['user'] as String, - username: json['username'] as String, - device: json['device'] as String, - appVersion: (json['appVersion'] as num).toInt(), - deviceInfo: json['deviceInfo'] as String, - ); + Map json, +) => UpdateUserIndexParams( + user: json['user'] as String, + username: json['username'] as String, + device: json['device'] as String, + appVersion: (json['appVersion'] as num).toInt(), + deviceInfo: json['deviceInfo'] as String, +); Map _$UpdateUserIndexParamsToJson( - UpdateUserIndexParams instance) => - { - 'user': instance.user, - 'username': instance.username, - 'device': instance.device, - 'appVersion': instance.appVersion, - 'deviceInfo': instance.deviceInfo, - }; + UpdateUserIndexParams instance, +) => { + 'user': instance.user, + 'username': instance.username, + 'device': instance.device, + 'appVersion': instance.appVersion, + 'deviceInfo': instance.deviceInfo, +}; diff --git a/lib/api/webuntis/queries/authenticate/authenticateParams.g.dart b/lib/api/webuntis/queries/authenticate/authenticateParams.g.dart index 49db5df..ba8b65e 100644 --- a/lib/api/webuntis/queries/authenticate/authenticateParams.g.dart +++ b/lib/api/webuntis/queries/authenticate/authenticateParams.g.dart @@ -13,7 +13,4 @@ AuthenticateParams _$AuthenticateParamsFromJson(Map json) => ); Map _$AuthenticateParamsToJson(AuthenticateParams instance) => - { - 'user': instance.user, - 'password': instance.password, - }; + {'user': instance.user, 'password': instance.password}; diff --git a/lib/api/webuntis/queries/authenticate/authenticateResponse.g.dart b/lib/api/webuntis/queries/authenticate/authenticateResponse.g.dart index 4fb84ad..c3ca62a 100644 --- a/lib/api/webuntis/queries/authenticate/authenticateResponse.g.dart +++ b/lib/api/webuntis/queries/authenticate/authenticateResponse.g.dart @@ -7,22 +7,24 @@ part of 'authenticateResponse.dart'; // ************************************************************************** AuthenticateResponse _$AuthenticateResponseFromJson( - Map json) => + Map json, +) => AuthenticateResponse( - json['sessionId'] as String, - (json['personType'] as num).toInt(), - (json['personId'] as num).toInt(), - (json['klasseId'] as num).toInt(), - )..headers = (json['headers'] as Map?)?.map( + json['sessionId'] as String, + (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) => - { - if (instance.headers case final value?) 'headers': value, - 'sessionId': instance.sessionId, - 'personType': instance.personType, - 'personId': instance.personId, - 'klasseId': instance.klasseId, - }; + AuthenticateResponse instance, +) => { + 'headers': ?instance.headers, + '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 6f035cd..323b3fb 100644 --- a/lib/api/webuntis/queries/getHolidays/getHolidaysResponse.g.dart +++ b/lib/api/webuntis/queries/getHolidays/getHolidaysResponse.g.dart @@ -8,37 +8,40 @@ part of 'getHolidaysResponse.dart'; GetHolidaysResponse _$GetHolidaysResponseFromJson(Map json) => GetHolidaysResponse( - (json['result'] as List) - .map((e) => - GetHolidaysResponseObject.fromJson(e as Map)) - .toSet(), - )..headers = (json['headers'] as Map?)?.map( + (json['result'] as List) + .map( + (e) => + GetHolidaysResponseObject.fromJson(e as Map), + ) + .toSet(), + ) + ..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); Map _$GetHolidaysResponseToJson( - GetHolidaysResponse instance) => - { - if (instance.headers case final value?) 'headers': value, - 'result': instance.result.map((e) => e.toJson()).toList(), - }; + GetHolidaysResponse instance, +) => { + 'headers': ?instance.headers, + 'result': instance.result.map((e) => e.toJson()).toList(), +}; GetHolidaysResponseObject _$GetHolidaysResponseObjectFromJson( - Map json) => - GetHolidaysResponseObject( - (json['id'] as num).toInt(), - json['name'] as String, - json['longName'] as String, - (json['startDate'] as num).toInt(), - (json['endDate'] as num).toInt(), - ); + Map json, +) => GetHolidaysResponseObject( + (json['id'] as num).toInt(), + json['name'] as String, + json['longName'] as String, + (json['startDate'] as num).toInt(), + (json['endDate'] as num).toInt(), +); Map _$GetHolidaysResponseObjectToJson( - GetHolidaysResponseObject instance) => - { - 'id': instance.id, - 'name': instance.name, - 'longName': instance.longName, - 'startDate': instance.startDate, - 'endDate': instance.endDate, - }; + GetHolidaysResponseObject instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'longName': instance.longName, + 'startDate': instance.startDate, + 'endDate': instance.endDate, +}; diff --git a/lib/api/webuntis/queries/getRooms/getRoomsResponse.g.dart b/lib/api/webuntis/queries/getRooms/getRoomsResponse.g.dart index e3b9c60..a88ade3 100644 --- a/lib/api/webuntis/queries/getRooms/getRoomsResponse.g.dart +++ b/lib/api/webuntis/queries/getRooms/getRoomsResponse.g.dart @@ -8,36 +8,38 @@ part of 'getRoomsResponse.dart'; GetRoomsResponse _$GetRoomsResponseFromJson(Map json) => GetRoomsResponse( - (json['result'] as List) - .map( - (e) => GetRoomsResponseObject.fromJson(e as Map)) - .toSet(), - )..headers = (json['headers'] as Map?)?.map( + (json['result'] as List) + .map( + (e) => GetRoomsResponseObject.fromJson(e as Map), + ) + .toSet(), + ) + ..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); Map _$GetRoomsResponseToJson(GetRoomsResponse instance) => { - if (instance.headers case final value?) 'headers': value, + 'headers': ?instance.headers, 'result': instance.result.map((e) => e.toJson()).toList(), }; GetRoomsResponseObject _$GetRoomsResponseObjectFromJson( - Map json) => - GetRoomsResponseObject( - (json['id'] as num).toInt(), - json['name'] as String, - json['longName'] as String, - json['active'] as bool, - json['building'] as String, - ); + Map json, +) => GetRoomsResponseObject( + (json['id'] as num).toInt(), + json['name'] as String, + json['longName'] as String, + json['active'] as bool, + json['building'] as String, +); Map _$GetRoomsResponseObjectToJson( - GetRoomsResponseObject instance) => - { - 'id': instance.id, - 'name': instance.name, - 'longName': instance.longName, - 'active': instance.active, - 'building': instance.building, - }; + GetRoomsResponseObject instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'longName': instance.longName, + 'active': instance.active, + 'building': instance.building, +}; diff --git a/lib/api/webuntis/queries/getSubjects/getSubjectsResponse.g.dart b/lib/api/webuntis/queries/getSubjects/getSubjectsResponse.g.dart index b80a07a..35bbb8b 100644 --- a/lib/api/webuntis/queries/getSubjects/getSubjectsResponse.g.dart +++ b/lib/api/webuntis/queries/getSubjects/getSubjectsResponse.g.dart @@ -8,37 +8,40 @@ part of 'getSubjectsResponse.dart'; GetSubjectsResponse _$GetSubjectsResponseFromJson(Map json) => GetSubjectsResponse( - (json['result'] as List) - .map((e) => - GetSubjectsResponseObject.fromJson(e as Map)) - .toSet(), - )..headers = (json['headers'] as Map?)?.map( + (json['result'] as List) + .map( + (e) => + GetSubjectsResponseObject.fromJson(e as Map), + ) + .toSet(), + ) + ..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); Map _$GetSubjectsResponseToJson( - GetSubjectsResponse instance) => - { - if (instance.headers case final value?) 'headers': value, - 'result': instance.result.map((e) => e.toJson()).toList(), - }; + GetSubjectsResponse instance, +) => { + 'headers': ?instance.headers, + 'result': instance.result.map((e) => e.toJson()).toList(), +}; GetSubjectsResponseObject _$GetSubjectsResponseObjectFromJson( - Map json) => - GetSubjectsResponseObject( - (json['id'] as num).toInt(), - json['name'] as String, - json['longName'] as String, - json['alternateName'] as String, - json['active'] as bool, - ); + Map json, +) => GetSubjectsResponseObject( + (json['id'] as num).toInt(), + json['name'] as String, + json['longName'] as String, + json['alternateName'] as String, + json['active'] as bool, +); Map _$GetSubjectsResponseObjectToJson( - GetSubjectsResponseObject instance) => - { - 'id': instance.id, - 'name': instance.name, - 'longName': instance.longName, - 'alternateName': instance.alternateName, - 'active': instance.active, - }; + GetSubjectsResponseObject instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'longName': instance.longName, + 'alternateName': instance.alternateName, + 'active': instance.active, +}; diff --git a/lib/api/webuntis/queries/getTimetable/getTimetableParams.g.dart b/lib/api/webuntis/queries/getTimetable/getTimetableParams.g.dart index 21e60ab..92e2a1d 100644 --- a/lib/api/webuntis/queries/getTimetable/getTimetableParams.g.dart +++ b/lib/api/webuntis/queries/getTimetable/getTimetableParams.g.dart @@ -9,78 +9,68 @@ part of 'getTimetableParams.dart'; GetTimetableParams _$GetTimetableParamsFromJson(Map json) => GetTimetableParams( options: GetTimetableParamsOptions.fromJson( - json['options'] as Map), + json['options'] as Map, + ), ); Map _$GetTimetableParamsToJson(GetTimetableParams instance) => - { - 'options': instance.options.toJson(), - }; + {'options': instance.options.toJson()}; GetTimetableParamsOptions _$GetTimetableParamsOptionsFromJson( - Map json) => - GetTimetableParamsOptions( - element: GetTimetableParamsOptionsElement.fromJson( - json['element'] as Map), - 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?, - showSubstText: json['showSubstText'] as bool?, - showLsText: json['showLsText'] as bool?, - showLsNumber: json['showLsNumber'] as bool?, - showStudentgroup: json['showStudentgroup'] as bool?, - klasseFields: (json['klasseFields'] as List?) - ?.map((e) => $enumDecode(_$GetTimetableParamsOptionsFieldsEnumMap, e)) - .toList(), - roomFields: (json['roomFields'] as List?) - ?.map((e) => $enumDecode(_$GetTimetableParamsOptionsFieldsEnumMap, e)) - .toList(), - subjectFields: (json['subjectFields'] as List?) - ?.map((e) => $enumDecode(_$GetTimetableParamsOptionsFieldsEnumMap, e)) - .toList(), - teacherFields: (json['teacherFields'] as List?) - ?.map((e) => $enumDecode(_$GetTimetableParamsOptionsFieldsEnumMap, e)) - .toList(), - ); + Map json, +) => GetTimetableParamsOptions( + element: GetTimetableParamsOptionsElement.fromJson( + json['element'] as Map, + ), + 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?, + showSubstText: json['showSubstText'] as bool?, + showLsText: json['showLsText'] as bool?, + showLsNumber: json['showLsNumber'] as bool?, + showStudentgroup: json['showStudentgroup'] as bool?, + klasseFields: (json['klasseFields'] as List?) + ?.map((e) => $enumDecode(_$GetTimetableParamsOptionsFieldsEnumMap, e)) + .toList(), + roomFields: (json['roomFields'] as List?) + ?.map((e) => $enumDecode(_$GetTimetableParamsOptionsFieldsEnumMap, e)) + .toList(), + subjectFields: (json['subjectFields'] as List?) + ?.map((e) => $enumDecode(_$GetTimetableParamsOptionsFieldsEnumMap, e)) + .toList(), + teacherFields: (json['teacherFields'] as List?) + ?.map((e) => $enumDecode(_$GetTimetableParamsOptionsFieldsEnumMap, e)) + .toList(), +); Map _$GetTimetableParamsOptionsToJson( - 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, - }; + GetTimetableParamsOptions instance, +) => { + 'element': instance.element.toJson(), + 'startDate': ?instance.startDate, + 'endDate': ?instance.endDate, + 'onlyBaseTimetable': ?instance.onlyBaseTimetable, + 'showBooking': ?instance.showBooking, + 'showInfo': ?instance.showInfo, + 'showSubstText': ?instance.showSubstText, + 'showLsText': ?instance.showLsText, + 'showLsNumber': ?instance.showLsNumber, + 'showStudentgroup': ?instance.showStudentgroup, + 'klasseFields': ?instance.klasseFields + ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) + .toList(), + 'roomFields': ?instance.roomFields + ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) + .toList(), + 'subjectFields': ?instance.subjectFields + ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) + .toList(), + 'teacherFields': ?instance.teacherFields + ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) + .toList(), +}; const _$GetTimetableParamsOptionsFieldsEnumMap = { GetTimetableParamsOptionsFields.id: 'id', @@ -90,23 +80,24 @@ const _$GetTimetableParamsOptionsFieldsEnumMap = { }; GetTimetableParamsOptionsElement _$GetTimetableParamsOptionsElementFromJson( - Map json) => - GetTimetableParamsOptionsElement( - id: (json['id'] as num).toInt(), - type: (json['type'] as num).toInt(), - keyType: $enumDecodeNullable( - _$GetTimetableParamsOptionsElementKeyTypeEnumMap, json['keyType']), - ); + Map json, +) => GetTimetableParamsOptionsElement( + id: (json['id'] as num).toInt(), + type: (json['type'] as num).toInt(), + keyType: $enumDecodeNullable( + _$GetTimetableParamsOptionsElementKeyTypeEnumMap, + json['keyType'], + ), +); Map _$GetTimetableParamsOptionsElementToJson( - GetTimetableParamsOptionsElement instance) => - { - 'id': instance.id, - 'type': instance.type, - if (_$GetTimetableParamsOptionsElementKeyTypeEnumMap[instance.keyType] - case final value?) - 'keyType': value, - }; + GetTimetableParamsOptionsElement instance, +) => { + 'id': instance.id, + 'type': instance.type, + 'keyType': + ?_$GetTimetableParamsOptionsElementKeyTypeEnumMap[instance.keyType], +}; 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 c7b2db1..effce44 100644 --- a/lib/api/webuntis/queries/getTimetable/getTimetableResponse.g.dart +++ b/lib/api/webuntis/queries/getTimetable/getTimetableResponse.g.dart @@ -7,184 +7,199 @@ part of 'getTimetableResponse.dart'; // ************************************************************************** GetTimetableResponse _$GetTimetableResponseFromJson( - Map json) => + Map json, +) => GetTimetableResponse( - (json['result'] as List) - .map((e) => - GetTimetableResponseObject.fromJson(e as Map)) - .toSet(), - )..headers = (json['headers'] as Map?)?.map( + (json['result'] as List) + .map( + (e) => GetTimetableResponseObject.fromJson( + e as Map, + ), + ) + .toSet(), + ) + ..headers = (json['headers'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ); Map _$GetTimetableResponseToJson( - GetTimetableResponse instance) => - { - if (instance.headers case final value?) 'headers': value, - 'result': instance.result.map((e) => e.toJson()).toList(), - }; + GetTimetableResponse instance, +) => { + 'headers': ?instance.headers, + 'result': instance.result.map((e) => e.toJson()).toList(), +}; GetTimetableResponseObject _$GetTimetableResponseObjectFromJson( - Map json) => - GetTimetableResponseObject( - 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 num?)?.toInt(), - statflags: json['statflags'] as String?, - activityType: json['activityType'] as String?, - sg: json['sg'] as String?, - bkRemark: json['bkRemark'] as String?, - kl: (json['kl'] as List) - .map((e) => GetTimetableResponseObjectClass.fromJson( - e as Map)) - .toList(), - te: (json['te'] as List) - .map((e) => GetTimetableResponseObjectTeacher.fromJson( - e as Map)) - .toList(), - su: (json['su'] as List) - .map((e) => GetTimetableResponseObjectSubject.fromJson( - e as Map)) - .toList(), - ro: (json['ro'] as List) - .map((e) => GetTimetableResponseObjectRoom.fromJson( - e as Map)) - .toList(), - )..bkText = json['bkText'] as String?; + Map json, +) => GetTimetableResponseObject( + 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 num?)?.toInt(), + statflags: json['statflags'] as String?, + activityType: json['activityType'] as String?, + sg: json['sg'] as String?, + bkRemark: json['bkRemark'] as String?, + kl: (json['kl'] as List) + .map( + (e) => + GetTimetableResponseObjectClass.fromJson(e as Map), + ) + .toList(), + te: (json['te'] as List) + .map( + (e) => GetTimetableResponseObjectTeacher.fromJson( + e as Map, + ), + ) + .toList(), + su: (json['su'] as List) + .map( + (e) => GetTimetableResponseObjectSubject.fromJson( + e as Map, + ), + ) + .toList(), + ro: (json['ro'] as List) + .map( + (e) => + GetTimetableResponseObjectRoom.fromJson(e as Map), + ) + .toList(), +)..bkText = json['bkText'] as String?; Map _$GetTimetableResponseObjectToJson( - GetTimetableResponseObject instance) => - { - 'id': instance.id, - 'date': instance.date, - 'startTime': instance.startTime, - 'endTime': instance.endTime, - 'lstype': instance.lstype, - 'code': instance.code, - 'info': instance.info, - 'substText': instance.substText, - 'lstext': instance.lstext, - 'lsnumber': instance.lsnumber, - 'statflags': instance.statflags, - 'activityType': instance.activityType, - 'sg': instance.sg, - 'bkRemark': instance.bkRemark, - 'bkText': instance.bkText, - 'kl': instance.kl.map((e) => e.toJson()).toList(), - 'te': instance.te.map((e) => e.toJson()).toList(), - 'su': instance.su.map((e) => e.toJson()).toList(), - 'ro': instance.ro.map((e) => e.toJson()).toList(), - }; + GetTimetableResponseObject instance, +) => { + 'id': instance.id, + 'date': instance.date, + 'startTime': instance.startTime, + 'endTime': instance.endTime, + 'lstype': instance.lstype, + 'code': instance.code, + 'info': instance.info, + 'substText': instance.substText, + 'lstext': instance.lstext, + 'lsnumber': instance.lsnumber, + 'statflags': instance.statflags, + 'activityType': instance.activityType, + 'sg': instance.sg, + 'bkRemark': instance.bkRemark, + 'bkText': instance.bkText, + 'kl': instance.kl.map((e) => e.toJson()).toList(), + 'te': instance.te.map((e) => e.toJson()).toList(), + 'su': instance.su.map((e) => e.toJson()).toList(), + 'ro': instance.ro.map((e) => e.toJson()).toList(), +}; GetTimetableResponseObjectFields _$GetTimetableResponseObjectFieldsFromJson( - Map json) => - GetTimetableResponseObjectFields( - (json['te'] as List?) - ?.map((e) => GetTimetableResponseObjectFieldsObject.fromJson( - e as Map)) - .toList(), - ); + Map json, +) => GetTimetableResponseObjectFields( + (json['te'] as List?) + ?.map( + (e) => GetTimetableResponseObjectFieldsObject.fromJson( + e as Map, + ), + ) + .toList(), +); Map _$GetTimetableResponseObjectFieldsToJson( - GetTimetableResponseObjectFields instance) => - { - 'te': instance.te?.map((e) => e.toJson()).toList(), - }; + GetTimetableResponseObjectFields instance, +) => {'te': instance.te?.map((e) => e.toJson()).toList()}; GetTimetableResponseObjectFieldsObject - _$GetTimetableResponseObjectFieldsObjectFromJson( - Map json) => - GetTimetableResponseObjectFieldsObject( - id: (json['id'] as num?)?.toInt(), - name: json['name'] as String?, - longname: json['longname'] as String?, - externalkey: json['externalkey'] as String?, - ); +_$GetTimetableResponseObjectFieldsObjectFromJson(Map json) => + GetTimetableResponseObjectFieldsObject( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + longname: json['longname'] as String?, + externalkey: json['externalkey'] as String?, + ); Map _$GetTimetableResponseObjectFieldsObjectToJson( - GetTimetableResponseObjectFieldsObject instance) => - { - 'id': instance.id, - 'name': instance.name, - 'longname': instance.longname, - 'externalkey': instance.externalkey, - }; + GetTimetableResponseObjectFieldsObject instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'longname': instance.longname, + 'externalkey': instance.externalkey, +}; GetTimetableResponseObjectClass _$GetTimetableResponseObjectClassFromJson( - Map json) => - GetTimetableResponseObjectClass( - (json['id'] as num).toInt(), - json['name'] as String, - json['longname'] as String, - json['externalkey'] as String?, - ); + Map json, +) => GetTimetableResponseObjectClass( + (json['id'] as num).toInt(), + json['name'] as String, + json['longname'] as String, + json['externalkey'] as String?, +); Map _$GetTimetableResponseObjectClassToJson( - GetTimetableResponseObjectClass instance) => - { - 'id': instance.id, - 'name': instance.name, - 'longname': instance.longname, - 'externalkey': instance.externalkey, - }; + GetTimetableResponseObjectClass instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'longname': instance.longname, + 'externalkey': instance.externalkey, +}; GetTimetableResponseObjectTeacher _$GetTimetableResponseObjectTeacherFromJson( - Map json) => - GetTimetableResponseObjectTeacher( - (json['id'] as num).toInt(), - json['name'] as String, - json['longname'] as String, - (json['orgid'] as num?)?.toInt(), - json['orgname'] as String?, - json['externalkey'] as String?, - ); + Map json, +) => GetTimetableResponseObjectTeacher( + (json['id'] as num).toInt(), + json['name'] as String, + json['longname'] as String, + (json['orgid'] as num?)?.toInt(), + json['orgname'] as String?, + json['externalkey'] as String?, +); Map _$GetTimetableResponseObjectTeacherToJson( - GetTimetableResponseObjectTeacher instance) => - { - 'id': instance.id, - 'name': instance.name, - 'longname': instance.longname, - 'orgid': instance.orgid, - 'orgname': instance.orgname, - 'externalkey': instance.externalkey, - }; + GetTimetableResponseObjectTeacher instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'longname': instance.longname, + 'orgid': instance.orgid, + 'orgname': instance.orgname, + 'externalkey': instance.externalkey, +}; GetTimetableResponseObjectSubject _$GetTimetableResponseObjectSubjectFromJson( - Map json) => - GetTimetableResponseObjectSubject( - (json['id'] as num).toInt(), - json['name'] as String, - json['longname'] as String, - ); + Map json, +) => GetTimetableResponseObjectSubject( + (json['id'] as num).toInt(), + json['name'] as String, + json['longname'] as String, +); Map _$GetTimetableResponseObjectSubjectToJson( - GetTimetableResponseObjectSubject instance) => - { - 'id': instance.id, - 'name': instance.name, - 'longname': instance.longname, - }; + GetTimetableResponseObjectSubject instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'longname': instance.longname, +}; GetTimetableResponseObjectRoom _$GetTimetableResponseObjectRoomFromJson( - Map json) => - GetTimetableResponseObjectRoom( - (json['id'] as num).toInt(), - json['name'] as String, - json['longname'] as String, - ); + Map json, +) => GetTimetableResponseObjectRoom( + (json['id'] as num).toInt(), + json['name'] as String, + json['longname'] as String, +); Map _$GetTimetableResponseObjectRoomToJson( - GetTimetableResponseObjectRoom instance) => - { - 'id': instance.id, - 'name': instance.name, - 'longname': instance.longname, - }; + GetTimetableResponseObjectRoom instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'longname': instance.longname, +}; diff --git a/lib/state/app/infrastructure/loadableState/bloc/loadable_state_state.dart b/lib/state/app/infrastructure/loadableState/bloc/loadable_state_state.dart index 712c9fd..82cce66 100644 --- a/lib/state/app/infrastructure/loadableState/bloc/loadable_state_state.dart +++ b/lib/state/app/infrastructure/loadableState/bloc/loadable_state_state.dart @@ -4,7 +4,7 @@ import 'package:freezed_annotation/freezed_annotation.dart'; part 'loadable_state_state.freezed.dart'; @freezed -class LoadableStateState with _$LoadableStateState { +abstract class LoadableStateState with _$LoadableStateState { const factory LoadableStateState({ required List? connections, }) = _LoadableStateState; 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 c064b92..8c0d18c 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 @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,150 +9,271 @@ part of 'loadable_state_state.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - /// @nodoc mixin _$LoadableStateState { - List? get connections => - throw _privateConstructorUsedError; - /// 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; + List? get connections; +/// Create a copy of LoadableStateState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LoadableStateStateCopyWith get copyWith => _$LoadableStateStateCopyWithImpl(this as LoadableStateState, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LoadableStateState&&const DeepCollectionEquality().equals(other.connections, connections)); +} + + +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(connections)); + +@override +String toString() { + return 'LoadableStateState(connections: $connections)'; +} + + } /// @nodoc -abstract class $LoadableStateStateCopyWith<$Res> { - factory $LoadableStateStateCopyWith( - LoadableStateState value, $Res Function(LoadableStateState) then) = - _$LoadableStateStateCopyWithImpl<$Res, LoadableStateState>; - @useResult - $Res call({List? connections}); -} +abstract mixin class $LoadableStateStateCopyWith<$Res> { + factory $LoadableStateStateCopyWith(LoadableStateState value, $Res Function(LoadableStateState) _then) = _$LoadableStateStateCopyWithImpl; +@useResult +$Res call({ + List? connections +}); + + + +} /// @nodoc -class _$LoadableStateStateCopyWithImpl<$Res, $Val extends LoadableStateState> +class _$LoadableStateStateCopyWithImpl<$Res> implements $LoadableStateStateCopyWith<$Res> { - _$LoadableStateStateCopyWithImpl(this._value, this._then); + _$LoadableStateStateCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final LoadableStateState _self; + final $Res Function(LoadableStateState) _then; - /// Create a copy of LoadableStateState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? connections = freezed, - }) { - return _then(_value.copyWith( - connections: freezed == connections - ? _value.connections - : connections // ignore: cast_nullable_to_non_nullable - as List?, - ) as $Val); - } +/// Create a copy of LoadableStateState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? connections = freezed,}) { + return _then(_self.copyWith( +connections: freezed == connections ? _self.connections : connections // ignore: cast_nullable_to_non_nullable +as List?, + )); } -/// @nodoc -abstract class _$$LoadableStateStateImplCopyWith<$Res> - implements $LoadableStateStateCopyWith<$Res> { - factory _$$LoadableStateStateImplCopyWith(_$LoadableStateStateImpl value, - $Res Function(_$LoadableStateStateImpl) then) = - __$$LoadableStateStateImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({List? connections}); } -/// @nodoc -class __$$LoadableStateStateImplCopyWithImpl<$Res> - extends _$LoadableStateStateCopyWithImpl<$Res, _$LoadableStateStateImpl> - implements _$$LoadableStateStateImplCopyWith<$Res> { - __$$LoadableStateStateImplCopyWithImpl(_$LoadableStateStateImpl _value, - $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({ - Object? connections = freezed, - }) { - return _then(_$LoadableStateStateImpl( - connections: freezed == connections - ? _value._connections - : connections // ignore: cast_nullable_to_non_nullable - as List?, - )); - } +/// Adds pattern-matching-related methods to [LoadableStateState]. +extension LoadableStateStatePatterns on LoadableStateState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LoadableStateState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LoadableStateState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LoadableStateState value) $default,){ +final _that = this; +switch (_that) { +case _LoadableStateState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LoadableStateState value)? $default,){ +final _that = this; +switch (_that) { +case _LoadableStateState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List? connections)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LoadableStateState() when $default != null: +return $default(_that.connections);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List? connections) $default,) {final _that = this; +switch (_that) { +case _LoadableStateState(): +return $default(_that.connections);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List? connections)? $default,) {final _that = this; +switch (_that) { +case _LoadableStateState() when $default != null: +return $default(_that.connections);case _: + return null; + +} +} + } /// @nodoc -class _$LoadableStateStateImpl implements _LoadableStateState { - const _$LoadableStateStateImpl( - {required final List? connections}) - : _connections = connections; - final List? _connections; - @override - List? get connections { - final value = _connections; - if (value == null) return null; - if (_connections is EqualUnmodifiableListView) return _connections; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } +class _LoadableStateState implements LoadableStateState { + const _LoadableStateState({required final List? connections}): _connections = connections; + - @override - String toString() { - return 'LoadableStateState(connections: $connections)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LoadableStateStateImpl && - const DeepCollectionEquality() - .equals(other._connections, _connections)); - } - - @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_connections)); - - /// 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 => - __$$LoadableStateStateImplCopyWithImpl<_$LoadableStateStateImpl>( - this, _$identity); + final List? _connections; +@override List? get connections { + final value = _connections; + if (value == null) return null; + if (_connections is EqualUnmodifiableListView) return _connections; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); } -abstract class _LoadableStateState implements LoadableStateState { - const factory _LoadableStateState( - {required final List? connections}) = - _$LoadableStateStateImpl; - @override - List? get connections; +/// Create a copy of LoadableStateState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LoadableStateStateCopyWith<_LoadableStateState> get copyWith => __$LoadableStateStateCopyWithImpl<_LoadableStateState>(this, _$identity); - /// Create a copy of LoadableStateState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$LoadableStateStateImplCopyWith<_$LoadableStateStateImpl> get copyWith => - throw _privateConstructorUsedError; + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoadableStateState&&const DeepCollectionEquality().equals(other._connections, _connections)); } + + +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_connections)); + +@override +String toString() { + return 'LoadableStateState(connections: $connections)'; +} + + +} + +/// @nodoc +abstract mixin class _$LoadableStateStateCopyWith<$Res> implements $LoadableStateStateCopyWith<$Res> { + factory _$LoadableStateStateCopyWith(_LoadableStateState value, $Res Function(_LoadableStateState) _then) = __$LoadableStateStateCopyWithImpl; +@override @useResult +$Res call({ + List? connections +}); + + + + +} +/// @nodoc +class __$LoadableStateStateCopyWithImpl<$Res> + implements _$LoadableStateStateCopyWith<$Res> { + __$LoadableStateStateCopyWithImpl(this._self, this._then); + + final _LoadableStateState _self; + final $Res Function(_LoadableStateState) _then; + +/// Create a copy of LoadableStateState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? connections = freezed,}) { + return _then(_LoadableStateState( +connections: freezed == connections ? _self._connections : connections // ignore: cast_nullable_to_non_nullable +as List?, + )); +} + + +} + +// dart format on diff --git a/lib/state/app/infrastructure/loadableState/loadable_state.dart b/lib/state/app/infrastructure/loadableState/loadable_state.dart index b163e41..5b5d0c9 100644 --- a/lib/state/app/infrastructure/loadableState/loadable_state.dart +++ b/lib/state/app/infrastructure/loadableState/loadable_state.dart @@ -5,7 +5,7 @@ import 'loading_error.dart'; part 'loadable_state.freezed.dart'; @freezed -class LoadableState with _$LoadableState { +abstract class LoadableState with _$LoadableState { const LoadableState._(); const factory LoadableState({ @@ -14,7 +14,7 @@ class LoadableState with _$LoadableState { required int? lastFetch, required void Function()? reFetch, required LoadingError? error, - }) = _LoadableState; + }) = _LoadableState; bool _hasError() => error != null; bool _hasData() => data != null; diff --git a/lib/state/app/infrastructure/loadableState/loadable_state.freezed.dart b/lib/state/app/infrastructure/loadableState/loadable_state.freezed.dart index 5da3602..0041ee9 100644 --- a/lib/state/app/infrastructure/loadableState/loadable_state.freezed.dart +++ b/lib/state/app/infrastructure/loadableState/loadable_state.freezed.dart @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,246 +9,299 @@ part of 'loadable_state.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - /// @nodoc mixin _$LoadableState { - bool get isLoading => throw _privateConstructorUsedError; - TState? get data => throw _privateConstructorUsedError; - int? get lastFetch => throw _privateConstructorUsedError; - void Function()? get reFetch => throw _privateConstructorUsedError; - LoadingError? get error => throw _privateConstructorUsedError; - /// 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; + bool get isLoading; TState? get data; int? get lastFetch; void Function()? get reFetch; LoadingError? get error; +/// Create a copy of LoadableState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LoadableStateCopyWith> get copyWith => _$LoadableStateCopyWithImpl>(this as LoadableState, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LoadableState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.lastFetch, lastFetch) || other.lastFetch == lastFetch)&&(identical(other.reFetch, reFetch) || other.reFetch == reFetch)&&(identical(other.error, error) || other.error == error)); +} + + +@override +int get hashCode => Object.hash(runtimeType,isLoading,const DeepCollectionEquality().hash(data),lastFetch,reFetch,error); + +@override +String toString() { + return 'LoadableState<$TState>(isLoading: $isLoading, data: $data, lastFetch: $lastFetch, reFetch: $reFetch, error: $error)'; +} + + } /// @nodoc -abstract class $LoadableStateCopyWith { - factory $LoadableStateCopyWith(LoadableState value, - $Res Function(LoadableState) then) = - _$LoadableStateCopyWithImpl>; - @useResult - $Res call( - {bool isLoading, - TState? data, - int? lastFetch, - void Function()? reFetch, - LoadingError? error}); +abstract mixin class $LoadableStateCopyWith { + factory $LoadableStateCopyWith(LoadableState value, $Res Function(LoadableState) _then) = _$LoadableStateCopyWithImpl; +@useResult +$Res call({ + bool isLoading, TState? data, int? lastFetch, void Function()? reFetch, LoadingError? error +}); + + +$LoadingErrorCopyWith<$Res>? get error; - $LoadingErrorCopyWith<$Res>? get error; } - /// @nodoc -class _$LoadableStateCopyWithImpl> +class _$LoadableStateCopyWithImpl implements $LoadableStateCopyWith { - _$LoadableStateCopyWithImpl(this._value, this._then); + _$LoadableStateCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final LoadableState _self; + final $Res Function(LoadableState) _then; - /// Create a copy of LoadableState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? isLoading = null, - Object? data = freezed, - Object? lastFetch = freezed, - Object? reFetch = freezed, - Object? error = freezed, - }) { - return _then(_value.copyWith( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - data: freezed == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as TState?, - lastFetch: freezed == lastFetch - ? _value.lastFetch - : lastFetch // ignore: cast_nullable_to_non_nullable - as int?, - reFetch: freezed == reFetch - ? _value.reFetch - : reFetch // ignore: cast_nullable_to_non_nullable - as void Function()?, - error: freezed == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as LoadingError?, - ) as $Val); +/// Create a copy of LoadableState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? data = freezed,Object? lastFetch = freezed,Object? reFetch = freezed,Object? error = freezed,}) { + return _then(_self.copyWith( +isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable +as bool,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as TState?,lastFetch: freezed == lastFetch ? _self.lastFetch : lastFetch // ignore: cast_nullable_to_non_nullable +as int?,reFetch: freezed == reFetch ? _self.reFetch : reFetch // ignore: cast_nullable_to_non_nullable +as void Function()?,error: freezed == error ? _self.error : error // ignore: cast_nullable_to_non_nullable +as LoadingError?, + )); +} +/// Create a copy of LoadableState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LoadingErrorCopyWith<$Res>? get error { + if (_self.error == null) { + return null; } - /// Create a copy of LoadableState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $LoadingErrorCopyWith<$Res>? get error { - if (_value.error == null) { - return null; - } - - return $LoadingErrorCopyWith<$Res>(_value.error!, (value) { - return _then(_value.copyWith(error: value) as $Val); - }); - } + return $LoadingErrorCopyWith<$Res>(_self.error!, (value) { + return _then(_self.copyWith(error: value)); + }); +} } -/// @nodoc -abstract class _$$LoadableStateImplCopyWith - implements $LoadableStateCopyWith { - factory _$$LoadableStateImplCopyWith(_$LoadableStateImpl value, - $Res Function(_$LoadableStateImpl) then) = - __$$LoadableStateImplCopyWithImpl; - @override - @useResult - $Res call( - {bool isLoading, - TState? data, - int? lastFetch, - void Function()? reFetch, - LoadingError? error}); - @override - $LoadingErrorCopyWith<$Res>? get error; +/// Adds pattern-matching-related methods to [LoadableState]. +extension LoadableStatePatterns on LoadableState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LoadableState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LoadableState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LoadableState value) $default,){ +final _that = this; +switch (_that) { +case _LoadableState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LoadableState value)? $default,){ +final _that = this; +switch (_that) { +case _LoadableState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool isLoading, TState? data, int? lastFetch, void Function()? reFetch, LoadingError? error)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LoadableState() when $default != null: +return $default(_that.isLoading,_that.data,_that.lastFetch,_that.reFetch,_that.error);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool isLoading, TState? data, int? lastFetch, void Function()? reFetch, LoadingError? error) $default,) {final _that = this; +switch (_that) { +case _LoadableState(): +return $default(_that.isLoading,_that.data,_that.lastFetch,_that.reFetch,_that.error);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool isLoading, TState? data, int? lastFetch, void Function()? reFetch, LoadingError? error)? $default,) {final _that = this; +switch (_that) { +case _LoadableState() when $default != null: +return $default(_that.isLoading,_that.data,_that.lastFetch,_that.reFetch,_that.error);case _: + return null; + +} } -/// @nodoc -class __$$LoadableStateImplCopyWithImpl - extends _$LoadableStateCopyWithImpl> - implements _$$LoadableStateImplCopyWith { - __$$LoadableStateImplCopyWithImpl(_$LoadableStateImpl _value, - $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({ - Object? isLoading = null, - Object? data = freezed, - Object? lastFetch = freezed, - Object? reFetch = freezed, - Object? error = freezed, - }) { - return _then(_$LoadableStateImpl( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - data: freezed == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as TState?, - lastFetch: freezed == lastFetch - ? _value.lastFetch - : lastFetch // ignore: cast_nullable_to_non_nullable - as int?, - reFetch: freezed == reFetch - ? _value.reFetch - : reFetch // ignore: cast_nullable_to_non_nullable - as void Function()?, - error: freezed == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as LoadingError?, - )); - } } /// @nodoc -class _$LoadableStateImpl extends _LoadableState { - const _$LoadableStateImpl( - {required this.isLoading, - required this.data, - required this.lastFetch, - required this.reFetch, - required this.error}) - : super._(); - @override - final bool isLoading; - @override - final TState? data; - @override - final int? lastFetch; - @override - final void Function()? reFetch; - @override - final LoadingError? error; +class _LoadableState extends LoadableState { + const _LoadableState({required this.isLoading, required this.data, required this.lastFetch, required this.reFetch, required this.error}): super._(); + - @override - String toString() { - return 'LoadableState<$TState>(isLoading: $isLoading, data: $data, lastFetch: $lastFetch, reFetch: $reFetch, error: $error)'; - } +@override final bool isLoading; +@override final TState? data; +@override final int? lastFetch; +@override final void Function()? reFetch; +@override final LoadingError? error; - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LoadableStateImpl && - (identical(other.isLoading, isLoading) || - other.isLoading == isLoading) && - const DeepCollectionEquality().equals(other.data, data) && - (identical(other.lastFetch, lastFetch) || - other.lastFetch == lastFetch) && - (identical(other.reFetch, reFetch) || other.reFetch == reFetch) && - (identical(other.error, error) || other.error == error)); - } +/// Create a copy of LoadableState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LoadableStateCopyWith> get copyWith => __$LoadableStateCopyWithImpl>(this, _$identity); - @override - int get hashCode => Object.hash(runtimeType, isLoading, - const DeepCollectionEquality().hash(data), lastFetch, reFetch, error); - /// 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> - get copyWith => __$$LoadableStateImplCopyWithImpl>(this, _$identity); + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoadableState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.lastFetch, lastFetch) || other.lastFetch == lastFetch)&&(identical(other.reFetch, reFetch) || other.reFetch == reFetch)&&(identical(other.error, error) || other.error == error)); } -abstract class _LoadableState extends LoadableState { - const factory _LoadableState( - {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 - bool get isLoading; - @override - TState? get data; - @override - int? get lastFetch; - @override - void Function()? get reFetch; - @override - LoadingError? get error; +@override +int get hashCode => Object.hash(runtimeType,isLoading,const DeepCollectionEquality().hash(data),lastFetch,reFetch,error); - /// Create a copy of LoadableState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$LoadableStateImplCopyWith> - get copyWith => throw _privateConstructorUsedError; +@override +String toString() { + return 'LoadableState<$TState>(isLoading: $isLoading, data: $data, lastFetch: $lastFetch, reFetch: $reFetch, error: $error)'; } + + +} + +/// @nodoc +abstract mixin class _$LoadableStateCopyWith implements $LoadableStateCopyWith { + factory _$LoadableStateCopyWith(_LoadableState value, $Res Function(_LoadableState) _then) = __$LoadableStateCopyWithImpl; +@override @useResult +$Res call({ + bool isLoading, TState? data, int? lastFetch, void Function()? reFetch, LoadingError? error +}); + + +@override $LoadingErrorCopyWith<$Res>? get error; + +} +/// @nodoc +class __$LoadableStateCopyWithImpl + implements _$LoadableStateCopyWith { + __$LoadableStateCopyWithImpl(this._self, this._then); + + final _LoadableState _self; + final $Res Function(_LoadableState) _then; + +/// Create a copy of LoadableState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? data = freezed,Object? lastFetch = freezed,Object? reFetch = freezed,Object? error = freezed,}) { + return _then(_LoadableState( +isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable +as bool,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as TState?,lastFetch: freezed == lastFetch ? _self.lastFetch : lastFetch // ignore: cast_nullable_to_non_nullable +as int?,reFetch: freezed == reFetch ? _self.reFetch : reFetch // ignore: cast_nullable_to_non_nullable +as void Function()?,error: freezed == error ? _self.error : error // ignore: cast_nullable_to_non_nullable +as LoadingError?, + )); +} + +/// Create a copy of LoadableState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LoadingErrorCopyWith<$Res>? get error { + if (_self.error == null) { + return null; + } + + return $LoadingErrorCopyWith<$Res>(_self.error!, (value) { + return _then(_self.copyWith(error: value)); + }); +} +} + +// dart format on diff --git a/lib/state/app/infrastructure/loadableState/loading_error.dart b/lib/state/app/infrastructure/loadableState/loading_error.dart index b68ac7d..9f82716 100644 --- a/lib/state/app/infrastructure/loadableState/loading_error.dart +++ b/lib/state/app/infrastructure/loadableState/loading_error.dart @@ -3,7 +3,7 @@ import 'package:freezed_annotation/freezed_annotation.dart'; part 'loading_error.freezed.dart'; @freezed -class LoadingError with _$LoadingError { +abstract class LoadingError with _$LoadingError { const factory LoadingError({ required String message, @Default(false) bool allowRetry, diff --git a/lib/state/app/infrastructure/loadableState/loading_error.freezed.dart b/lib/state/app/infrastructure/loadableState/loading_error.freezed.dart index 7b575c9..c4c3924 100644 --- a/lib/state/app/infrastructure/loadableState/loading_error.freezed.dart +++ b/lib/state/app/infrastructure/loadableState/loading_error.freezed.dart @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,155 +9,266 @@ part of 'loading_error.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - /// @nodoc mixin _$LoadingError { - String get message => throw _privateConstructorUsedError; - bool get allowRetry => throw _privateConstructorUsedError; - /// 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; + String get message; bool get allowRetry; +/// Create a copy of LoadingError +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LoadingErrorCopyWith get copyWith => _$LoadingErrorCopyWithImpl(this as LoadingError, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LoadingError&&(identical(other.message, message) || other.message == message)&&(identical(other.allowRetry, allowRetry) || other.allowRetry == allowRetry)); +} + + +@override +int get hashCode => Object.hash(runtimeType,message,allowRetry); + +@override +String toString() { + return 'LoadingError(message: $message, allowRetry: $allowRetry)'; +} + + } /// @nodoc -abstract class $LoadingErrorCopyWith<$Res> { - factory $LoadingErrorCopyWith( - LoadingError value, $Res Function(LoadingError) then) = - _$LoadingErrorCopyWithImpl<$Res, LoadingError>; - @useResult - $Res call({String message, bool allowRetry}); -} +abstract mixin class $LoadingErrorCopyWith<$Res> { + factory $LoadingErrorCopyWith(LoadingError value, $Res Function(LoadingError) _then) = _$LoadingErrorCopyWithImpl; +@useResult +$Res call({ + String message, bool allowRetry +}); + + + +} /// @nodoc -class _$LoadingErrorCopyWithImpl<$Res, $Val extends LoadingError> +class _$LoadingErrorCopyWithImpl<$Res> implements $LoadingErrorCopyWith<$Res> { - _$LoadingErrorCopyWithImpl(this._value, this._then); + _$LoadingErrorCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final LoadingError _self; + final $Res Function(LoadingError) _then; - /// Create a copy of LoadingError - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? message = null, - Object? allowRetry = null, - }) { - return _then(_value.copyWith( - message: null == message - ? _value.message - : message // ignore: cast_nullable_to_non_nullable - as String, - allowRetry: null == allowRetry - ? _value.allowRetry - : allowRetry // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); - } +/// Create a copy of LoadingError +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? message = null,Object? allowRetry = null,}) { + return _then(_self.copyWith( +message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable +as String,allowRetry: null == allowRetry ? _self.allowRetry : allowRetry // ignore: cast_nullable_to_non_nullable +as bool, + )); } -/// @nodoc -abstract class _$$LoadingErrorImplCopyWith<$Res> - implements $LoadingErrorCopyWith<$Res> { - factory _$$LoadingErrorImplCopyWith( - _$LoadingErrorImpl value, $Res Function(_$LoadingErrorImpl) then) = - __$$LoadingErrorImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({String message, bool allowRetry}); } -/// @nodoc -class __$$LoadingErrorImplCopyWithImpl<$Res> - extends _$LoadingErrorCopyWithImpl<$Res, _$LoadingErrorImpl> - implements _$$LoadingErrorImplCopyWith<$Res> { - __$$LoadingErrorImplCopyWithImpl( - _$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({ - Object? message = null, - Object? allowRetry = null, - }) { - return _then(_$LoadingErrorImpl( - message: null == message - ? _value.message - : message // ignore: cast_nullable_to_non_nullable - as String, - allowRetry: null == allowRetry - ? _value.allowRetry - : allowRetry // ignore: cast_nullable_to_non_nullable - as bool, - )); - } +/// Adds pattern-matching-related methods to [LoadingError]. +extension LoadingErrorPatterns on LoadingError { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LoadingError value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LoadingError() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LoadingError value) $default,){ +final _that = this; +switch (_that) { +case _LoadingError(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LoadingError value)? $default,){ +final _that = this; +switch (_that) { +case _LoadingError() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String message, bool allowRetry)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LoadingError() when $default != null: +return $default(_that.message,_that.allowRetry);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String message, bool allowRetry) $default,) {final _that = this; +switch (_that) { +case _LoadingError(): +return $default(_that.message,_that.allowRetry);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String message, bool allowRetry)? $default,) {final _that = this; +switch (_that) { +case _LoadingError() when $default != null: +return $default(_that.message,_that.allowRetry);case _: + return null; + +} +} + } /// @nodoc -class _$LoadingErrorImpl implements _LoadingError { - const _$LoadingErrorImpl({required this.message, this.allowRetry = false}); - @override - final String message; - @override - @JsonKey() - final bool allowRetry; +class _LoadingError implements LoadingError { + const _LoadingError({required this.message, this.allowRetry = false}); + - @override - String toString() { - return 'LoadingError(message: $message, allowRetry: $allowRetry)'; - } +@override final String message; +@override@JsonKey() final bool allowRetry; - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LoadingErrorImpl && - (identical(other.message, message) || other.message == message) && - (identical(other.allowRetry, allowRetry) || - other.allowRetry == allowRetry)); - } +/// Create a copy of LoadingError +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LoadingErrorCopyWith<_LoadingError> get copyWith => __$LoadingErrorCopyWithImpl<_LoadingError>(this, _$identity); - @override - int get hashCode => Object.hash(runtimeType, message, allowRetry); - /// 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 => - __$$LoadingErrorImplCopyWithImpl<_$LoadingErrorImpl>(this, _$identity); + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoadingError&&(identical(other.message, message) || other.message == message)&&(identical(other.allowRetry, allowRetry) || other.allowRetry == allowRetry)); } -abstract class _LoadingError implements LoadingError { - const factory _LoadingError( - {required final String message, - final bool allowRetry}) = _$LoadingErrorImpl; - @override - String get message; - @override - bool get allowRetry; +@override +int get hashCode => Object.hash(runtimeType,message,allowRetry); - /// Create a copy of LoadingError - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$LoadingErrorImplCopyWith<_$LoadingErrorImpl> get copyWith => - throw _privateConstructorUsedError; +@override +String toString() { + return 'LoadingError(message: $message, allowRetry: $allowRetry)'; } + + +} + +/// @nodoc +abstract mixin class _$LoadingErrorCopyWith<$Res> implements $LoadingErrorCopyWith<$Res> { + factory _$LoadingErrorCopyWith(_LoadingError value, $Res Function(_LoadingError) _then) = __$LoadingErrorCopyWithImpl; +@override @useResult +$Res call({ + String message, bool allowRetry +}); + + + + +} +/// @nodoc +class __$LoadingErrorCopyWithImpl<$Res> + implements _$LoadingErrorCopyWith<$Res> { + __$LoadingErrorCopyWithImpl(this._self, this._then); + + final _LoadingError _self; + final $Res Function(_LoadingError) _then; + +/// Create a copy of LoadingError +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? message = null,Object? allowRetry = null,}) { + return _then(_LoadingError( +message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable +as String,allowRetry: null == allowRetry ? _self.allowRetry : allowRetry // ignore: cast_nullable_to_non_nullable +as bool, + )); +} + + +} + +// dart format on diff --git a/lib/state/app/infrastructure/loadableState/view/loadable_state_consumer.dart b/lib/state/app/infrastructure/loadableState/view/loadable_state_consumer.dart index b0cdc65..e1613ba 100644 --- a/lib/state/app/infrastructure/loadableState/view/loadable_state_consumer.dart +++ b/lib/state/app/infrastructure/loadableState/view/loadable_state_consumer.dart @@ -26,7 +26,7 @@ class LoadableStateConsumer().state; if(!loadableState.isLoading && onLoad != null) { - WidgetsBinding.instance.addPostFrameCallback((timeStamp) => onLoad!(loadableState.data)); + WidgetsBinding.instance.addPostFrameCallback((timeStamp) => onLoad!(loadableState.data!)); } var childWidget = ConditionalWrapper( @@ -48,7 +48,7 @@ class LoadableStateConsumer? toJson(LoadableState state) { Map? data; try { - data = state.data == null ? null : toStorage(state.data); + data = state.data == null ? null : toStorage(state.data!); } catch(e) { log('Failed to save state ${TState.toString()}: ${e.toString()}'); } diff --git a/lib/state/app/infrastructure/utilityWidgets/loadableHydratedBloc/loadable_save_context.dart b/lib/state/app/infrastructure/utilityWidgets/loadableHydratedBloc/loadable_save_context.dart index 0dea5cd..095f2b6 100644 --- a/lib/state/app/infrastructure/utilityWidgets/loadableHydratedBloc/loadable_save_context.dart +++ b/lib/state/app/infrastructure/utilityWidgets/loadableHydratedBloc/loadable_save_context.dart @@ -4,7 +4,7 @@ part 'loadable_save_context.freezed.dart'; part 'loadable_save_context.g.dart'; @freezed -class LoadableSaveContext with _$LoadableSaveContext { +abstract class LoadableSaveContext with _$LoadableSaveContext { const LoadableSaveContext._(); const factory LoadableSaveContext({ required int timestamp, 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 ddf720e..67df2c3 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 @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,160 +9,269 @@ part of 'loadable_save_context.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -LoadableSaveContext _$LoadableSaveContextFromJson(Map json) { - return _LoadableSaveContext.fromJson(json); -} - /// @nodoc mixin _$LoadableSaveContext { - int get timestamp => throw _privateConstructorUsedError; + + int get timestamp; +/// Create a copy of LoadableSaveContext +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LoadableSaveContextCopyWith get copyWith => _$LoadableSaveContextCopyWithImpl(this as LoadableSaveContext, _$identity); /// Serializes this LoadableSaveContext to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LoadableSaveContext&&(identical(other.timestamp, timestamp) || other.timestamp == timestamp)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,timestamp); + +@override +String toString() { + return 'LoadableSaveContext(timestamp: $timestamp)'; +} + - /// 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; } /// @nodoc -abstract class $LoadableSaveContextCopyWith<$Res> { - factory $LoadableSaveContextCopyWith( - LoadableSaveContext value, $Res Function(LoadableSaveContext) then) = - _$LoadableSaveContextCopyWithImpl<$Res, LoadableSaveContext>; - @useResult - $Res call({int timestamp}); -} +abstract mixin class $LoadableSaveContextCopyWith<$Res> { + factory $LoadableSaveContextCopyWith(LoadableSaveContext value, $Res Function(LoadableSaveContext) _then) = _$LoadableSaveContextCopyWithImpl; +@useResult +$Res call({ + int timestamp +}); + + + +} /// @nodoc -class _$LoadableSaveContextCopyWithImpl<$Res, $Val extends LoadableSaveContext> +class _$LoadableSaveContextCopyWithImpl<$Res> implements $LoadableSaveContextCopyWith<$Res> { - _$LoadableSaveContextCopyWithImpl(this._value, this._then); + _$LoadableSaveContextCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final LoadableSaveContext _self; + final $Res Function(LoadableSaveContext) _then; - /// Create a copy of LoadableSaveContext - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? timestamp = null, - }) { - return _then(_value.copyWith( - timestamp: null == timestamp - ? _value.timestamp - : timestamp // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); - } +/// Create a copy of LoadableSaveContext +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? timestamp = null,}) { + return _then(_self.copyWith( +timestamp: null == timestamp ? _self.timestamp : timestamp // ignore: cast_nullable_to_non_nullable +as int, + )); } -/// @nodoc -abstract class _$$LoadableSaveContextImplCopyWith<$Res> - implements $LoadableSaveContextCopyWith<$Res> { - factory _$$LoadableSaveContextImplCopyWith(_$LoadableSaveContextImpl value, - $Res Function(_$LoadableSaveContextImpl) then) = - __$$LoadableSaveContextImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({int timestamp}); } -/// @nodoc -class __$$LoadableSaveContextImplCopyWithImpl<$Res> - extends _$LoadableSaveContextCopyWithImpl<$Res, _$LoadableSaveContextImpl> - implements _$$LoadableSaveContextImplCopyWith<$Res> { - __$$LoadableSaveContextImplCopyWithImpl(_$LoadableSaveContextImpl _value, - $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({ - Object? timestamp = null, - }) { - return _then(_$LoadableSaveContextImpl( - timestamp: null == timestamp - ? _value.timestamp - : timestamp // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Adds pattern-matching-related methods to [LoadableSaveContext]. +extension LoadableSaveContextPatterns on LoadableSaveContext { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LoadableSaveContext value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LoadableSaveContext() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LoadableSaveContext value) $default,){ +final _that = this; +switch (_that) { +case _LoadableSaveContext(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LoadableSaveContext value)? $default,){ +final _that = this; +switch (_that) { +case _LoadableSaveContext() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int timestamp)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LoadableSaveContext() when $default != null: +return $default(_that.timestamp);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int timestamp) $default,) {final _that = this; +switch (_that) { +case _LoadableSaveContext(): +return $default(_that.timestamp);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int timestamp)? $default,) {final _that = this; +switch (_that) { +case _LoadableSaveContext() when $default != null: +return $default(_that.timestamp);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _$LoadableSaveContextImpl extends _LoadableSaveContext { - const _$LoadableSaveContextImpl({required this.timestamp}) : super._(); - factory _$LoadableSaveContextImpl.fromJson(Map json) => - _$$LoadableSaveContextImplFromJson(json); +class _LoadableSaveContext extends LoadableSaveContext { + const _LoadableSaveContext({required this.timestamp}): super._(); + factory _LoadableSaveContext.fromJson(Map json) => _$LoadableSaveContextFromJson(json); - @override - final int timestamp; +@override final int timestamp; - @override - String toString() { - return 'LoadableSaveContext(timestamp: $timestamp)'; - } +/// Create a copy of LoadableSaveContext +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LoadableSaveContextCopyWith<_LoadableSaveContext> get copyWith => __$LoadableSaveContextCopyWithImpl<_LoadableSaveContext>(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LoadableSaveContextImpl && - (identical(other.timestamp, timestamp) || - other.timestamp == timestamp)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, timestamp); - - /// 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 => - __$$LoadableSaveContextImplCopyWithImpl<_$LoadableSaveContextImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$LoadableSaveContextImplToJson( - this, - ); - } +@override +Map toJson() { + return _$LoadableSaveContextToJson(this, ); } -abstract class _LoadableSaveContext extends LoadableSaveContext { - const factory _LoadableSaveContext({required final int timestamp}) = - _$LoadableSaveContextImpl; - const _LoadableSaveContext._() : super._(); - - factory _LoadableSaveContext.fromJson(Map json) = - _$LoadableSaveContextImpl.fromJson; - - @override - int get timestamp; - - /// Create a copy of LoadableSaveContext - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$LoadableSaveContextImplCopyWith<_$LoadableSaveContextImpl> get copyWith => - throw _privateConstructorUsedError; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoadableSaveContext&&(identical(other.timestamp, timestamp) || other.timestamp == timestamp)); } + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,timestamp); + +@override +String toString() { + return 'LoadableSaveContext(timestamp: $timestamp)'; +} + + +} + +/// @nodoc +abstract mixin class _$LoadableSaveContextCopyWith<$Res> implements $LoadableSaveContextCopyWith<$Res> { + factory _$LoadableSaveContextCopyWith(_LoadableSaveContext value, $Res Function(_LoadableSaveContext) _then) = __$LoadableSaveContextCopyWithImpl; +@override @useResult +$Res call({ + int timestamp +}); + + + + +} +/// @nodoc +class __$LoadableSaveContextCopyWithImpl<$Res> + implements _$LoadableSaveContextCopyWith<$Res> { + __$LoadableSaveContextCopyWithImpl(this._self, this._then); + + final _LoadableSaveContext _self; + final $Res Function(_LoadableSaveContext) _then; + +/// Create a copy of LoadableSaveContext +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? timestamp = null,}) { + return _then(_LoadableSaveContext( +timestamp: null == timestamp ? _self.timestamp : timestamp // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + +} + +// dart format on 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 d987faf..99c92e8 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 @@ -6,14 +6,9 @@ part of 'loadable_save_context.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LoadableSaveContextImpl _$$LoadableSaveContextImplFromJson( - Map json) => - _$LoadableSaveContextImpl( - timestamp: (json['timestamp'] as num).toInt(), - ); +_LoadableSaveContext _$LoadableSaveContextFromJson(Map json) => + _LoadableSaveContext(timestamp: (json['timestamp'] as num).toInt()); -Map _$$LoadableSaveContextImplToJson( - _$LoadableSaveContextImpl instance) => - { - 'timestamp': instance.timestamp, - }; +Map _$LoadableSaveContextToJson( + _LoadableSaveContext instance, +) => {'timestamp': instance.timestamp}; diff --git a/lib/state/app/modules/gradeAverages/bloc/grade_averages_state.dart b/lib/state/app/modules/gradeAverages/bloc/grade_averages_state.dart index 0462541..44e7f8f 100644 --- a/lib/state/app/modules/gradeAverages/bloc/grade_averages_state.dart +++ b/lib/state/app/modules/gradeAverages/bloc/grade_averages_state.dart @@ -4,7 +4,7 @@ part 'grade_averages_state.freezed.dart'; part 'grade_averages_state.g.dart'; @freezed -class GradeAveragesState with _$GradeAveragesState { +abstract class GradeAveragesState with _$GradeAveragesState { const factory GradeAveragesState({ required GradeAveragesGradingSystem gradingSystem, required List grades, 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 5636ee0..2ffbb9a 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 @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,185 +9,278 @@ part of 'grade_averages_state.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -GradeAveragesState _$GradeAveragesStateFromJson(Map json) { - return _GradeAveragesState.fromJson(json); -} - /// @nodoc mixin _$GradeAveragesState { - GradeAveragesGradingSystem get gradingSystem => - throw _privateConstructorUsedError; - List get grades => throw _privateConstructorUsedError; + + GradeAveragesGradingSystem get gradingSystem; List get grades; +/// Create a copy of GradeAveragesState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$GradeAveragesStateCopyWith get copyWith => _$GradeAveragesStateCopyWithImpl(this as GradeAveragesState, _$identity); /// Serializes this GradeAveragesState to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is GradeAveragesState&&(identical(other.gradingSystem, gradingSystem) || other.gradingSystem == gradingSystem)&&const DeepCollectionEquality().equals(other.grades, grades)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,gradingSystem,const DeepCollectionEquality().hash(grades)); + +@override +String toString() { + return 'GradeAveragesState(gradingSystem: $gradingSystem, grades: $grades)'; +} + - /// 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; } /// @nodoc -abstract class $GradeAveragesStateCopyWith<$Res> { - factory $GradeAveragesStateCopyWith( - GradeAveragesState value, $Res Function(GradeAveragesState) then) = - _$GradeAveragesStateCopyWithImpl<$Res, GradeAveragesState>; - @useResult - $Res call({GradeAveragesGradingSystem gradingSystem, List grades}); -} +abstract mixin class $GradeAveragesStateCopyWith<$Res> { + factory $GradeAveragesStateCopyWith(GradeAveragesState value, $Res Function(GradeAveragesState) _then) = _$GradeAveragesStateCopyWithImpl; +@useResult +$Res call({ + GradeAveragesGradingSystem gradingSystem, List grades +}); + + + +} /// @nodoc -class _$GradeAveragesStateCopyWithImpl<$Res, $Val extends GradeAveragesState> +class _$GradeAveragesStateCopyWithImpl<$Res> implements $GradeAveragesStateCopyWith<$Res> { - _$GradeAveragesStateCopyWithImpl(this._value, this._then); + _$GradeAveragesStateCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final GradeAveragesState _self; + final $Res Function(GradeAveragesState) _then; - /// Create a copy of GradeAveragesState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? gradingSystem = null, - Object? grades = null, - }) { - return _then(_value.copyWith( - gradingSystem: null == gradingSystem - ? _value.gradingSystem - : gradingSystem // ignore: cast_nullable_to_non_nullable - as GradeAveragesGradingSystem, - grades: null == grades - ? _value.grades - : grades // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); - } +/// Create a copy of GradeAveragesState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? gradingSystem = null,Object? grades = null,}) { + return _then(_self.copyWith( +gradingSystem: null == gradingSystem ? _self.gradingSystem : gradingSystem // ignore: cast_nullable_to_non_nullable +as GradeAveragesGradingSystem,grades: null == grades ? _self.grades : grades // ignore: cast_nullable_to_non_nullable +as List, + )); } -/// @nodoc -abstract class _$$GradeAveragesStateImplCopyWith<$Res> - implements $GradeAveragesStateCopyWith<$Res> { - factory _$$GradeAveragesStateImplCopyWith(_$GradeAveragesStateImpl value, - $Res Function(_$GradeAveragesStateImpl) then) = - __$$GradeAveragesStateImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({GradeAveragesGradingSystem gradingSystem, List grades}); } -/// @nodoc -class __$$GradeAveragesStateImplCopyWithImpl<$Res> - extends _$GradeAveragesStateCopyWithImpl<$Res, _$GradeAveragesStateImpl> - implements _$$GradeAveragesStateImplCopyWith<$Res> { - __$$GradeAveragesStateImplCopyWithImpl(_$GradeAveragesStateImpl _value, - $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({ - Object? gradingSystem = null, - Object? grades = null, - }) { - return _then(_$GradeAveragesStateImpl( - gradingSystem: null == gradingSystem - ? _value.gradingSystem - : gradingSystem // ignore: cast_nullable_to_non_nullable - as GradeAveragesGradingSystem, - grades: null == grades - ? _value._grades - : grades // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Adds pattern-matching-related methods to [GradeAveragesState]. +extension GradeAveragesStatePatterns on GradeAveragesState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _GradeAveragesState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _GradeAveragesState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _GradeAveragesState value) $default,){ +final _that = this; +switch (_that) { +case _GradeAveragesState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _GradeAveragesState value)? $default,){ +final _that = this; +switch (_that) { +case _GradeAveragesState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( GradeAveragesGradingSystem gradingSystem, List grades)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _GradeAveragesState() when $default != null: +return $default(_that.gradingSystem,_that.grades);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( GradeAveragesGradingSystem gradingSystem, List grades) $default,) {final _that = this; +switch (_that) { +case _GradeAveragesState(): +return $default(_that.gradingSystem,_that.grades);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( GradeAveragesGradingSystem gradingSystem, List grades)? $default,) {final _that = this; +switch (_that) { +case _GradeAveragesState() when $default != null: +return $default(_that.gradingSystem,_that.grades);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _$GradeAveragesStateImpl implements _GradeAveragesState { - const _$GradeAveragesStateImpl( - {required this.gradingSystem, required final List grades}) - : _grades = grades; - factory _$GradeAveragesStateImpl.fromJson(Map json) => - _$$GradeAveragesStateImplFromJson(json); +class _GradeAveragesState implements GradeAveragesState { + const _GradeAveragesState({required this.gradingSystem, required final List grades}): _grades = grades; + factory _GradeAveragesState.fromJson(Map json) => _$GradeAveragesStateFromJson(json); - @override - final GradeAveragesGradingSystem gradingSystem; - final List _grades; - @override - List get grades { - if (_grades is EqualUnmodifiableListView) return _grades; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_grades); - } - - @override - String toString() { - return 'GradeAveragesState(gradingSystem: $gradingSystem, grades: $grades)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GradeAveragesStateImpl && - (identical(other.gradingSystem, gradingSystem) || - other.gradingSystem == gradingSystem) && - const DeepCollectionEquality().equals(other._grades, _grades)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, gradingSystem, const DeepCollectionEquality().hash(_grades)); - - /// 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 => - __$$GradeAveragesStateImplCopyWithImpl<_$GradeAveragesStateImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$GradeAveragesStateImplToJson( - this, - ); - } +@override final GradeAveragesGradingSystem gradingSystem; + final List _grades; +@override List get grades { + if (_grades is EqualUnmodifiableListView) return _grades; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_grades); } -abstract class _GradeAveragesState implements GradeAveragesState { - const factory _GradeAveragesState( - {required final GradeAveragesGradingSystem gradingSystem, - required final List grades}) = _$GradeAveragesStateImpl; - factory _GradeAveragesState.fromJson(Map json) = - _$GradeAveragesStateImpl.fromJson; +/// Create a copy of GradeAveragesState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$GradeAveragesStateCopyWith<_GradeAveragesState> get copyWith => __$GradeAveragesStateCopyWithImpl<_GradeAveragesState>(this, _$identity); - @override - 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(includeFromJson: false, includeToJson: false) - _$$GradeAveragesStateImplCopyWith<_$GradeAveragesStateImpl> get copyWith => - throw _privateConstructorUsedError; +@override +Map toJson() { + return _$GradeAveragesStateToJson(this, ); } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _GradeAveragesState&&(identical(other.gradingSystem, gradingSystem) || other.gradingSystem == gradingSystem)&&const DeepCollectionEquality().equals(other._grades, _grades)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,gradingSystem,const DeepCollectionEquality().hash(_grades)); + +@override +String toString() { + return 'GradeAveragesState(gradingSystem: $gradingSystem, grades: $grades)'; +} + + +} + +/// @nodoc +abstract mixin class _$GradeAveragesStateCopyWith<$Res> implements $GradeAveragesStateCopyWith<$Res> { + factory _$GradeAveragesStateCopyWith(_GradeAveragesState value, $Res Function(_GradeAveragesState) _then) = __$GradeAveragesStateCopyWithImpl; +@override @useResult +$Res call({ + GradeAveragesGradingSystem gradingSystem, List grades +}); + + + + +} +/// @nodoc +class __$GradeAveragesStateCopyWithImpl<$Res> + implements _$GradeAveragesStateCopyWith<$Res> { + __$GradeAveragesStateCopyWithImpl(this._self, this._then); + + final _GradeAveragesState _self; + final $Res Function(_GradeAveragesState) _then; + +/// Create a copy of GradeAveragesState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? gradingSystem = null,Object? grades = null,}) { + return _then(_GradeAveragesState( +gradingSystem: null == gradingSystem ? _self.gradingSystem : gradingSystem // ignore: cast_nullable_to_non_nullable +as GradeAveragesGradingSystem,grades: null == grades ? _self._grades : grades // ignore: cast_nullable_to_non_nullable +as List, + )); +} + + +} + +// dart format on 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 26dc9f2..9373ca9 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 @@ -6,23 +6,23 @@ part of 'grade_averages_state.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GradeAveragesStateImpl _$$GradeAveragesStateImplFromJson( - Map json) => - _$GradeAveragesStateImpl( +_GradeAveragesState _$GradeAveragesStateFromJson(Map json) => + _GradeAveragesState( gradingSystem: $enumDecode( - _$GradeAveragesGradingSystemEnumMap, json['gradingSystem']), + _$GradeAveragesGradingSystemEnumMap, + json['gradingSystem'], + ), grades: (json['grades'] as List) .map((e) => (e as num).toInt()) .toList(), ); -Map _$$GradeAveragesStateImplToJson( - _$GradeAveragesStateImpl instance) => - { - 'gradingSystem': - _$GradeAveragesGradingSystemEnumMap[instance.gradingSystem]!, - 'grades': instance.grades, - }; +Map _$GradeAveragesStateToJson( + _GradeAveragesState instance, +) => { + 'gradingSystem': _$GradeAveragesGradingSystemEnumMap[instance.gradingSystem]!, + 'grades': instance.grades, +}; const _$GradeAveragesGradingSystemEnumMap = { GradeAveragesGradingSystem.highSchool: 'highSchool', diff --git a/lib/state/app/modules/holidays/bloc/holidays_state.dart b/lib/state/app/modules/holidays/bloc/holidays_state.dart index 05c0cd2..1a7eef0 100644 --- a/lib/state/app/modules/holidays/bloc/holidays_state.dart +++ b/lib/state/app/modules/holidays/bloc/holidays_state.dart @@ -5,7 +5,7 @@ part 'holidays_state.freezed.dart'; part 'holidays_state.g.dart'; @freezed -class HolidaysState with _$HolidaysState { +abstract class HolidaysState with _$HolidaysState { const factory HolidaysState({ required bool showPastHolidays, required bool showDisclaimer, @@ -16,7 +16,7 @@ class HolidaysState with _$HolidaysState { } @freezed -class Holiday with _$Holiday { +abstract class Holiday with _$Holiday { const factory Holiday({ required String start, required String end, 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 111d23c..f8c2f15 100644 --- a/lib/state/app/modules/holidays/bloc/holidays_state.freezed.dart +++ b/lib/state/app/modules/holidays/bloc/holidays_state.freezed.dart @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,481 +9,583 @@ part of 'holidays_state.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -HolidaysState _$HolidaysStateFromJson(Map json) { - return _HolidaysState.fromJson(json); -} - /// @nodoc -mixin _$HolidaysState { - bool get showPastHolidays => throw _privateConstructorUsedError; - bool get showDisclaimer => throw _privateConstructorUsedError; - List get holidays => throw _privateConstructorUsedError; +mixin _$HolidaysState implements DiagnosticableTreeMixin { + + bool get showPastHolidays; bool get showDisclaimer; List get holidays; +/// Create a copy of HolidaysState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$HolidaysStateCopyWith get copyWith => _$HolidaysStateCopyWithImpl(this as HolidaysState, _$identity); /// Serializes this HolidaysState to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'HolidaysState')) + ..add(DiagnosticsProperty('showPastHolidays', showPastHolidays))..add(DiagnosticsProperty('showDisclaimer', showDisclaimer))..add(DiagnosticsProperty('holidays', holidays)); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is HolidaysState&&(identical(other.showPastHolidays, showPastHolidays) || other.showPastHolidays == showPastHolidays)&&(identical(other.showDisclaimer, showDisclaimer) || other.showDisclaimer == showDisclaimer)&&const DeepCollectionEquality().equals(other.holidays, holidays)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,showPastHolidays,showDisclaimer,const DeepCollectionEquality().hash(holidays)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'HolidaysState(showPastHolidays: $showPastHolidays, showDisclaimer: $showDisclaimer, holidays: $holidays)'; +} + - /// 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; } /// @nodoc -abstract class $HolidaysStateCopyWith<$Res> { - factory $HolidaysStateCopyWith( - HolidaysState value, $Res Function(HolidaysState) then) = - _$HolidaysStateCopyWithImpl<$Res, HolidaysState>; - @useResult - $Res call( - {bool showPastHolidays, bool showDisclaimer, List holidays}); -} +abstract mixin class $HolidaysStateCopyWith<$Res> { + factory $HolidaysStateCopyWith(HolidaysState value, $Res Function(HolidaysState) _then) = _$HolidaysStateCopyWithImpl; +@useResult +$Res call({ + bool showPastHolidays, bool showDisclaimer, List holidays +}); + + + +} /// @nodoc -class _$HolidaysStateCopyWithImpl<$Res, $Val extends HolidaysState> +class _$HolidaysStateCopyWithImpl<$Res> implements $HolidaysStateCopyWith<$Res> { - _$HolidaysStateCopyWithImpl(this._value, this._then); + _$HolidaysStateCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final HolidaysState _self; + final $Res Function(HolidaysState) _then; - /// Create a copy of HolidaysState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? showPastHolidays = null, - Object? showDisclaimer = null, - Object? holidays = null, - }) { - return _then(_value.copyWith( - showPastHolidays: null == showPastHolidays - ? _value.showPastHolidays - : showPastHolidays // ignore: cast_nullable_to_non_nullable - as bool, - showDisclaimer: null == showDisclaimer - ? _value.showDisclaimer - : showDisclaimer // ignore: cast_nullable_to_non_nullable - as bool, - holidays: null == holidays - ? _value.holidays - : holidays // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); - } +/// Create a copy of HolidaysState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? showPastHolidays = null,Object? showDisclaimer = null,Object? holidays = null,}) { + return _then(_self.copyWith( +showPastHolidays: null == showPastHolidays ? _self.showPastHolidays : showPastHolidays // ignore: cast_nullable_to_non_nullable +as bool,showDisclaimer: null == showDisclaimer ? _self.showDisclaimer : showDisclaimer // ignore: cast_nullable_to_non_nullable +as bool,holidays: null == holidays ? _self.holidays : holidays // ignore: cast_nullable_to_non_nullable +as List, + )); } -/// @nodoc -abstract class _$$HolidaysStateImplCopyWith<$Res> - implements $HolidaysStateCopyWith<$Res> { - factory _$$HolidaysStateImplCopyWith( - _$HolidaysStateImpl value, $Res Function(_$HolidaysStateImpl) then) = - __$$HolidaysStateImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {bool showPastHolidays, bool showDisclaimer, List holidays}); } -/// @nodoc -class __$$HolidaysStateImplCopyWithImpl<$Res> - extends _$HolidaysStateCopyWithImpl<$Res, _$HolidaysStateImpl> - implements _$$HolidaysStateImplCopyWith<$Res> { - __$$HolidaysStateImplCopyWithImpl( - _$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({ - Object? showPastHolidays = null, - Object? showDisclaimer = null, - Object? holidays = null, - }) { - return _then(_$HolidaysStateImpl( - showPastHolidays: null == showPastHolidays - ? _value.showPastHolidays - : showPastHolidays // ignore: cast_nullable_to_non_nullable - as bool, - showDisclaimer: null == showDisclaimer - ? _value.showDisclaimer - : showDisclaimer // ignore: cast_nullable_to_non_nullable - as bool, - holidays: null == holidays - ? _value._holidays - : holidays // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Adds pattern-matching-related methods to [HolidaysState]. +extension HolidaysStatePatterns on HolidaysState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _HolidaysState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _HolidaysState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _HolidaysState value) $default,){ +final _that = this; +switch (_that) { +case _HolidaysState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _HolidaysState value)? $default,){ +final _that = this; +switch (_that) { +case _HolidaysState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool showPastHolidays, bool showDisclaimer, List holidays)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _HolidaysState() when $default != null: +return $default(_that.showPastHolidays,_that.showDisclaimer,_that.holidays);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool showPastHolidays, bool showDisclaimer, List holidays) $default,) {final _that = this; +switch (_that) { +case _HolidaysState(): +return $default(_that.showPastHolidays,_that.showDisclaimer,_that.holidays);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool showPastHolidays, bool showDisclaimer, List holidays)? $default,) {final _that = this; +switch (_that) { +case _HolidaysState() when $default != null: +return $default(_that.showPastHolidays,_that.showDisclaimer,_that.holidays);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _$HolidaysStateImpl - with DiagnosticableTreeMixin - implements _HolidaysState { - const _$HolidaysStateImpl( - {required this.showPastHolidays, - required this.showDisclaimer, - required final List holidays}) - : _holidays = holidays; - factory _$HolidaysStateImpl.fromJson(Map json) => - _$$HolidaysStateImplFromJson(json); +class _HolidaysState with DiagnosticableTreeMixin implements HolidaysState { + const _HolidaysState({required this.showPastHolidays, required this.showDisclaimer, required final List holidays}): _holidays = holidays; + factory _HolidaysState.fromJson(Map json) => _$HolidaysStateFromJson(json); - @override - final bool showPastHolidays; - @override - final bool showDisclaimer; - final List _holidays; - @override - List get holidays { - if (_holidays is EqualUnmodifiableListView) return _holidays; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_holidays); - } - - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'HolidaysState(showPastHolidays: $showPastHolidays, showDisclaimer: $showDisclaimer, holidays: $holidays)'; - } - - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - super.debugFillProperties(properties); - properties - ..add(DiagnosticsProperty('type', 'HolidaysState')) - ..add(DiagnosticsProperty('showPastHolidays', showPastHolidays)) - ..add(DiagnosticsProperty('showDisclaimer', showDisclaimer)) - ..add(DiagnosticsProperty('holidays', holidays)); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$HolidaysStateImpl && - (identical(other.showPastHolidays, showPastHolidays) || - other.showPastHolidays == showPastHolidays) && - (identical(other.showDisclaimer, showDisclaimer) || - other.showDisclaimer == showDisclaimer) && - const DeepCollectionEquality().equals(other._holidays, _holidays)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, showPastHolidays, showDisclaimer, - const DeepCollectionEquality().hash(_holidays)); - - /// 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 => - __$$HolidaysStateImplCopyWithImpl<_$HolidaysStateImpl>(this, _$identity); - - @override - Map toJson() { - return _$$HolidaysStateImplToJson( - this, - ); - } +@override final bool showPastHolidays; +@override final bool showDisclaimer; + final List _holidays; +@override List get holidays { + if (_holidays is EqualUnmodifiableListView) return _holidays; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_holidays); } -abstract class _HolidaysState implements HolidaysState { - const factory _HolidaysState( - {required final bool showPastHolidays, - required final bool showDisclaimer, - required final List holidays}) = _$HolidaysStateImpl; - factory _HolidaysState.fromJson(Map json) = - _$HolidaysStateImpl.fromJson; +/// Create a copy of HolidaysState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$HolidaysStateCopyWith<_HolidaysState> get copyWith => __$HolidaysStateCopyWithImpl<_HolidaysState>(this, _$identity); - @override - bool get showPastHolidays; - @override - 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(includeFromJson: false, includeToJson: false) - _$$HolidaysStateImplCopyWith<_$HolidaysStateImpl> get copyWith => - throw _privateConstructorUsedError; +@override +Map toJson() { + return _$HolidaysStateToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'HolidaysState')) + ..add(DiagnosticsProperty('showPastHolidays', showPastHolidays))..add(DiagnosticsProperty('showDisclaimer', showDisclaimer))..add(DiagnosticsProperty('holidays', holidays)); } -Holiday _$HolidayFromJson(Map json) { - return _Holiday.fromJson(json); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _HolidaysState&&(identical(other.showPastHolidays, showPastHolidays) || other.showPastHolidays == showPastHolidays)&&(identical(other.showDisclaimer, showDisclaimer) || other.showDisclaimer == showDisclaimer)&&const DeepCollectionEquality().equals(other._holidays, _holidays)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,showPastHolidays,showDisclaimer,const DeepCollectionEquality().hash(_holidays)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'HolidaysState(showPastHolidays: $showPastHolidays, showDisclaimer: $showDisclaimer, holidays: $holidays)'; +} + + } /// @nodoc -mixin _$Holiday { - String get start => throw _privateConstructorUsedError; - String get end => throw _privateConstructorUsedError; - int get year => throw _privateConstructorUsedError; - String get stateCode => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get slug => throw _privateConstructorUsedError; +abstract mixin class _$HolidaysStateCopyWith<$Res> implements $HolidaysStateCopyWith<$Res> { + factory _$HolidaysStateCopyWith(_HolidaysState value, $Res Function(_HolidaysState) _then) = __$HolidaysStateCopyWithImpl; +@override @useResult +$Res call({ + bool showPastHolidays, bool showDisclaimer, List holidays +}); + + + + +} +/// @nodoc +class __$HolidaysStateCopyWithImpl<$Res> + implements _$HolidaysStateCopyWith<$Res> { + __$HolidaysStateCopyWithImpl(this._self, this._then); + + final _HolidaysState _self; + final $Res Function(_HolidaysState) _then; + +/// Create a copy of HolidaysState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? showPastHolidays = null,Object? showDisclaimer = null,Object? holidays = null,}) { + return _then(_HolidaysState( +showPastHolidays: null == showPastHolidays ? _self.showPastHolidays : showPastHolidays // ignore: cast_nullable_to_non_nullable +as bool,showDisclaimer: null == showDisclaimer ? _self.showDisclaimer : showDisclaimer // ignore: cast_nullable_to_non_nullable +as bool,holidays: null == holidays ? _self._holidays : holidays // ignore: cast_nullable_to_non_nullable +as List, + )); +} + + +} + + +/// @nodoc +mixin _$Holiday implements DiagnosticableTreeMixin { + + String get start; String get end; int get year; String get stateCode; String get name; String get slug; +/// Create a copy of Holiday +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$HolidayCopyWith get copyWith => _$HolidayCopyWithImpl(this as Holiday, _$identity); /// Serializes this Holiday to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'Holiday')) + ..add(DiagnosticsProperty('start', start))..add(DiagnosticsProperty('end', end))..add(DiagnosticsProperty('year', year))..add(DiagnosticsProperty('stateCode', stateCode))..add(DiagnosticsProperty('name', name))..add(DiagnosticsProperty('slug', slug)); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Holiday&&(identical(other.start, start) || other.start == start)&&(identical(other.end, end) || other.end == end)&&(identical(other.year, year) || other.year == year)&&(identical(other.stateCode, stateCode) || other.stateCode == stateCode)&&(identical(other.name, name) || other.name == name)&&(identical(other.slug, slug) || other.slug == slug)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,start,end,year,stateCode,name,slug); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'Holiday(start: $start, end: $end, year: $year, stateCode: $stateCode, name: $name, slug: $slug)'; +} + - /// 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; } /// @nodoc -abstract class $HolidayCopyWith<$Res> { - factory $HolidayCopyWith(Holiday value, $Res Function(Holiday) then) = - _$HolidayCopyWithImpl<$Res, Holiday>; - @useResult - $Res call( - {String start, - String end, - int year, - String stateCode, - String name, - String slug}); -} +abstract mixin class $HolidayCopyWith<$Res> { + factory $HolidayCopyWith(Holiday value, $Res Function(Holiday) _then) = _$HolidayCopyWithImpl; +@useResult +$Res call({ + String start, String end, int year, String stateCode, String name, String slug +}); + + + +} /// @nodoc -class _$HolidayCopyWithImpl<$Res, $Val extends Holiday> +class _$HolidayCopyWithImpl<$Res> implements $HolidayCopyWith<$Res> { - _$HolidayCopyWithImpl(this._value, this._then); + _$HolidayCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final Holiday _self; + final $Res Function(Holiday) _then; - /// Create a copy of Holiday - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? start = null, - Object? end = null, - Object? year = null, - Object? stateCode = null, - Object? name = null, - Object? slug = null, - }) { - return _then(_value.copyWith( - start: null == start - ? _value.start - : start // ignore: cast_nullable_to_non_nullable - as String, - end: null == end - ? _value.end - : end // ignore: cast_nullable_to_non_nullable - as String, - year: null == year - ? _value.year - : year // ignore: cast_nullable_to_non_nullable - as int, - stateCode: null == stateCode - ? _value.stateCode - : stateCode // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); - } +/// Create a copy of Holiday +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? start = null,Object? end = null,Object? year = null,Object? stateCode = null,Object? name = null,Object? slug = null,}) { + return _then(_self.copyWith( +start: null == start ? _self.start : start // ignore: cast_nullable_to_non_nullable +as String,end: null == end ? _self.end : end // ignore: cast_nullable_to_non_nullable +as String,year: null == year ? _self.year : year // ignore: cast_nullable_to_non_nullable +as int,stateCode: null == stateCode ? _self.stateCode : stateCode // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,slug: null == slug ? _self.slug : slug // ignore: cast_nullable_to_non_nullable +as String, + )); } -/// @nodoc -abstract class _$$HolidayImplCopyWith<$Res> implements $HolidayCopyWith<$Res> { - factory _$$HolidayImplCopyWith( - _$HolidayImpl value, $Res Function(_$HolidayImpl) then) = - __$$HolidayImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String start, - String end, - int year, - String stateCode, - String name, - String slug}); } -/// @nodoc -class __$$HolidayImplCopyWithImpl<$Res> - extends _$HolidayCopyWithImpl<$Res, _$HolidayImpl> - implements _$$HolidayImplCopyWith<$Res> { - __$$HolidayImplCopyWithImpl( - _$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({ - Object? start = null, - Object? end = null, - Object? year = null, - Object? stateCode = null, - Object? name = null, - Object? slug = null, - }) { - return _then(_$HolidayImpl( - start: null == start - ? _value.start - : start // ignore: cast_nullable_to_non_nullable - as String, - end: null == end - ? _value.end - : end // ignore: cast_nullable_to_non_nullable - as String, - year: null == year - ? _value.year - : year // ignore: cast_nullable_to_non_nullable - as int, - stateCode: null == stateCode - ? _value.stateCode - : stateCode // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Adds pattern-matching-related methods to [Holiday]. +extension HolidayPatterns on Holiday { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _Holiday value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Holiday() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _Holiday value) $default,){ +final _that = this; +switch (_that) { +case _Holiday(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _Holiday value)? $default,){ +final _that = this; +switch (_that) { +case _Holiday() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String start, String end, int year, String stateCode, String name, String slug)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Holiday() when $default != null: +return $default(_that.start,_that.end,_that.year,_that.stateCode,_that.name,_that.slug);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String start, String end, int year, String stateCode, String name, String slug) $default,) {final _that = this; +switch (_that) { +case _Holiday(): +return $default(_that.start,_that.end,_that.year,_that.stateCode,_that.name,_that.slug);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String start, String end, int year, String stateCode, String name, String slug)? $default,) {final _that = this; +switch (_that) { +case _Holiday() when $default != null: +return $default(_that.start,_that.end,_that.year,_that.stateCode,_that.name,_that.slug);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _$HolidayImpl with DiagnosticableTreeMixin implements _Holiday { - const _$HolidayImpl( - {required this.start, - required this.end, - required this.year, - required this.stateCode, - required this.name, - required this.slug}); - factory _$HolidayImpl.fromJson(Map json) => - _$$HolidayImplFromJson(json); +class _Holiday with DiagnosticableTreeMixin implements Holiday { + const _Holiday({required this.start, required this.end, required this.year, required this.stateCode, required this.name, required this.slug}); + factory _Holiday.fromJson(Map json) => _$HolidayFromJson(json); - @override - final String start; - @override - final String end; - @override - final int year; - @override - final String stateCode; - @override - final String name; - @override - final String slug; +@override final String start; +@override final String end; +@override final int year; +@override final String stateCode; +@override final String name; +@override final String slug; - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'Holiday(start: $start, end: $end, year: $year, stateCode: $stateCode, name: $name, slug: $slug)'; - } +/// Create a copy of Holiday +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$HolidayCopyWith<_Holiday> get copyWith => __$HolidayCopyWithImpl<_Holiday>(this, _$identity); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - super.debugFillProperties(properties); - properties - ..add(DiagnosticsProperty('type', 'Holiday')) - ..add(DiagnosticsProperty('start', start)) - ..add(DiagnosticsProperty('end', end)) - ..add(DiagnosticsProperty('year', year)) - ..add(DiagnosticsProperty('stateCode', stateCode)) - ..add(DiagnosticsProperty('name', name)) - ..add(DiagnosticsProperty('slug', slug)); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$HolidayImpl && - (identical(other.start, start) || other.start == start) && - (identical(other.end, end) || other.end == end) && - (identical(other.year, year) || other.year == year) && - (identical(other.stateCode, stateCode) || - other.stateCode == stateCode) && - (identical(other.name, name) || other.name == name) && - (identical(other.slug, slug) || other.slug == slug)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, start, end, year, stateCode, name, slug); - - /// 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 => - __$$HolidayImplCopyWithImpl<_$HolidayImpl>(this, _$identity); - - @override - Map toJson() { - return _$$HolidayImplToJson( - this, - ); - } +@override +Map toJson() { + return _$HolidayToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'Holiday')) + ..add(DiagnosticsProperty('start', start))..add(DiagnosticsProperty('end', end))..add(DiagnosticsProperty('year', year))..add(DiagnosticsProperty('stateCode', stateCode))..add(DiagnosticsProperty('name', name))..add(DiagnosticsProperty('slug', slug)); } -abstract class _Holiday implements Holiday { - const factory _Holiday( - {required final String start, - required final String end, - required final int year, - required final String stateCode, - required final String name, - required final String slug}) = _$HolidayImpl; - - factory _Holiday.fromJson(Map json) = _$HolidayImpl.fromJson; - - @override - String get start; - @override - String get end; - @override - int get year; - @override - String get stateCode; - @override - 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(includeFromJson: false, includeToJson: false) - _$$HolidayImplCopyWith<_$HolidayImpl> get copyWith => - throw _privateConstructorUsedError; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Holiday&&(identical(other.start, start) || other.start == start)&&(identical(other.end, end) || other.end == end)&&(identical(other.year, year) || other.year == year)&&(identical(other.stateCode, stateCode) || other.stateCode == stateCode)&&(identical(other.name, name) || other.name == name)&&(identical(other.slug, slug) || other.slug == slug)); } + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,start,end,year,stateCode,name,slug); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'Holiday(start: $start, end: $end, year: $year, stateCode: $stateCode, name: $name, slug: $slug)'; +} + + +} + +/// @nodoc +abstract mixin class _$HolidayCopyWith<$Res> implements $HolidayCopyWith<$Res> { + factory _$HolidayCopyWith(_Holiday value, $Res Function(_Holiday) _then) = __$HolidayCopyWithImpl; +@override @useResult +$Res call({ + String start, String end, int year, String stateCode, String name, String slug +}); + + + + +} +/// @nodoc +class __$HolidayCopyWithImpl<$Res> + implements _$HolidayCopyWith<$Res> { + __$HolidayCopyWithImpl(this._self, this._then); + + final _Holiday _self; + final $Res Function(_Holiday) _then; + +/// Create a copy of Holiday +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? start = null,Object? end = null,Object? year = null,Object? stateCode = null,Object? name = null,Object? slug = null,}) { + return _then(_Holiday( +start: null == start ? _self.start : start // ignore: cast_nullable_to_non_nullable +as String,end: null == end ? _self.end : end // ignore: cast_nullable_to_non_nullable +as String,year: null == year ? _self.year : year // ignore: cast_nullable_to_non_nullable +as int,stateCode: null == stateCode ? _self.stateCode : stateCode // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,slug: null == slug ? _self.slug : slug // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + +} + +// dart format on 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 5549e8f..95211a2 100644 --- a/lib/state/app/modules/holidays/bloc/holidays_state.g.dart +++ b/lib/state/app/modules/holidays/bloc/holidays_state.g.dart @@ -6,8 +6,8 @@ part of 'holidays_state.dart'; // JsonSerializableGenerator // ************************************************************************** -_$HolidaysStateImpl _$$HolidaysStateImplFromJson(Map json) => - _$HolidaysStateImpl( +_HolidaysState _$HolidaysStateFromJson(Map json) => + _HolidaysState( showPastHolidays: json['showPastHolidays'] as bool, showDisclaimer: json['showDisclaimer'] as bool, holidays: (json['holidays'] as List) @@ -15,29 +15,27 @@ _$HolidaysStateImpl _$$HolidaysStateImplFromJson(Map json) => .toList(), ); -Map _$$HolidaysStateImplToJson(_$HolidaysStateImpl instance) => +Map _$HolidaysStateToJson(_HolidaysState instance) => { 'showPastHolidays': instance.showPastHolidays, 'showDisclaimer': instance.showDisclaimer, 'holidays': instance.holidays, }; -_$HolidayImpl _$$HolidayImplFromJson(Map json) => - _$HolidayImpl( - start: json['start'] as String, - end: json['end'] as String, - year: (json['year'] as num).toInt(), - stateCode: json['stateCode'] as String, - name: json['name'] as String, - slug: json['slug'] as String, - ); +_Holiday _$HolidayFromJson(Map json) => _Holiday( + start: json['start'] as String, + end: json['end'] as String, + year: (json['year'] as num).toInt(), + stateCode: json['stateCode'] as String, + name: json['name'] as String, + slug: json['slug'] as String, +); -Map _$$HolidayImplToJson(_$HolidayImpl instance) => - { - 'start': instance.start, - 'end': instance.end, - 'year': instance.year, - 'stateCode': instance.stateCode, - 'name': instance.name, - 'slug': instance.slug, - }; +Map _$HolidayToJson(_Holiday instance) => { + 'start': instance.start, + 'end': instance.end, + 'year': instance.year, + 'stateCode': instance.stateCode, + 'name': instance.name, + 'slug': instance.slug, +}; diff --git a/lib/state/app/modules/marianumMessage/bloc/marianum_message_state.dart b/lib/state/app/modules/marianumMessage/bloc/marianum_message_state.dart index 4f2d7c9..a119bb6 100644 --- a/lib/state/app/modules/marianumMessage/bloc/marianum_message_state.dart +++ b/lib/state/app/modules/marianumMessage/bloc/marianum_message_state.dart @@ -5,7 +5,7 @@ part 'marianum_message_state.g.dart'; @freezed -class MarianumMessageState with _$MarianumMessageState { +abstract class MarianumMessageState with _$MarianumMessageState { const factory MarianumMessageState({ required MarianumMessageList messageList, }) = _MarianumMessageState; @@ -14,7 +14,7 @@ class MarianumMessageState with _$MarianumMessageState { } @freezed -class MarianumMessageList with _$MarianumMessageList { +abstract class MarianumMessageList with _$MarianumMessageList { const factory MarianumMessageList({ required String base, required List messages, @@ -24,7 +24,7 @@ class MarianumMessageList with _$MarianumMessageList { } @freezed -class MarianumMessage with _$MarianumMessage { +abstract class MarianumMessage with _$MarianumMessage { const factory MarianumMessage({ required String name, required String date, 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 b678f47..aee5c09 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 @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,540 +9,828 @@ part of 'marianum_message_state.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -MarianumMessageState _$MarianumMessageStateFromJson(Map json) { - return _MarianumMessageState.fromJson(json); -} - /// @nodoc mixin _$MarianumMessageState { - MarianumMessageList get messageList => throw _privateConstructorUsedError; + + MarianumMessageList get messageList; +/// Create a copy of MarianumMessageState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MarianumMessageStateCopyWith get copyWith => _$MarianumMessageStateCopyWithImpl(this as MarianumMessageState, _$identity); /// Serializes this MarianumMessageState to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumMessageState&&(identical(other.messageList, messageList) || other.messageList == messageList)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,messageList); + +@override +String toString() { + return 'MarianumMessageState(messageList: $messageList)'; +} + - /// 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; } /// @nodoc -abstract class $MarianumMessageStateCopyWith<$Res> { - factory $MarianumMessageStateCopyWith(MarianumMessageState value, - $Res Function(MarianumMessageState) then) = - _$MarianumMessageStateCopyWithImpl<$Res, MarianumMessageState>; - @useResult - $Res call({MarianumMessageList messageList}); +abstract mixin class $MarianumMessageStateCopyWith<$Res> { + factory $MarianumMessageStateCopyWith(MarianumMessageState value, $Res Function(MarianumMessageState) _then) = _$MarianumMessageStateCopyWithImpl; +@useResult +$Res call({ + MarianumMessageList messageList +}); + + +$MarianumMessageListCopyWith<$Res> get messageList; - $MarianumMessageListCopyWith<$Res> get messageList; } - /// @nodoc -class _$MarianumMessageStateCopyWithImpl<$Res, - $Val extends MarianumMessageState> +class _$MarianumMessageStateCopyWithImpl<$Res> implements $MarianumMessageStateCopyWith<$Res> { - _$MarianumMessageStateCopyWithImpl(this._value, this._then); + _$MarianumMessageStateCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final MarianumMessageState _self; + final $Res Function(MarianumMessageState) _then; - /// Create a copy of MarianumMessageState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? messageList = null, - }) { - return _then(_value.copyWith( - messageList: null == messageList - ? _value.messageList - : messageList // ignore: cast_nullable_to_non_nullable - as MarianumMessageList, - ) 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 { - return $MarianumMessageListCopyWith<$Res>(_value.messageList, (value) { - return _then(_value.copyWith(messageList: value) as $Val); - }); - } +/// Create a copy of MarianumMessageState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? messageList = null,}) { + return _then(_self.copyWith( +messageList: null == messageList ? _self.messageList : messageList // ignore: cast_nullable_to_non_nullable +as MarianumMessageList, + )); +} +/// 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 { + + return $MarianumMessageListCopyWith<$Res>(_self.messageList, (value) { + return _then(_self.copyWith(messageList: value)); + }); +} } -/// @nodoc -abstract class _$$MarianumMessageStateImplCopyWith<$Res> - implements $MarianumMessageStateCopyWith<$Res> { - factory _$$MarianumMessageStateImplCopyWith(_$MarianumMessageStateImpl value, - $Res Function(_$MarianumMessageStateImpl) then) = - __$$MarianumMessageStateImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({MarianumMessageList messageList}); - @override - $MarianumMessageListCopyWith<$Res> get messageList; +/// Adds pattern-matching-related methods to [MarianumMessageState]. +extension MarianumMessageStatePatterns on MarianumMessageState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _MarianumMessageState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _MarianumMessageState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _MarianumMessageState value) $default,){ +final _that = this; +switch (_that) { +case _MarianumMessageState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _MarianumMessageState value)? $default,){ +final _that = this; +switch (_that) { +case _MarianumMessageState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( MarianumMessageList messageList)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _MarianumMessageState() when $default != null: +return $default(_that.messageList);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( MarianumMessageList messageList) $default,) {final _that = this; +switch (_that) { +case _MarianumMessageState(): +return $default(_that.messageList);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( MarianumMessageList messageList)? $default,) {final _that = this; +switch (_that) { +case _MarianumMessageState() when $default != null: +return $default(_that.messageList);case _: + return null; + +} } -/// @nodoc -class __$$MarianumMessageStateImplCopyWithImpl<$Res> - extends _$MarianumMessageStateCopyWithImpl<$Res, _$MarianumMessageStateImpl> - implements _$$MarianumMessageStateImplCopyWith<$Res> { - __$$MarianumMessageStateImplCopyWithImpl(_$MarianumMessageStateImpl _value, - $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({ - Object? messageList = null, - }) { - return _then(_$MarianumMessageStateImpl( - messageList: null == messageList - ? _value.messageList - : messageList // ignore: cast_nullable_to_non_nullable - as MarianumMessageList, - )); - } } /// @nodoc @JsonSerializable() -class _$MarianumMessageStateImpl implements _MarianumMessageState { - const _$MarianumMessageStateImpl({required this.messageList}); - factory _$MarianumMessageStateImpl.fromJson(Map json) => - _$$MarianumMessageStateImplFromJson(json); +class _MarianumMessageState implements MarianumMessageState { + const _MarianumMessageState({required this.messageList}); + factory _MarianumMessageState.fromJson(Map json) => _$MarianumMessageStateFromJson(json); - @override - final MarianumMessageList messageList; +@override final MarianumMessageList messageList; - @override - String toString() { - return 'MarianumMessageState(messageList: $messageList)'; - } +/// Create a copy of MarianumMessageState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$MarianumMessageStateCopyWith<_MarianumMessageState> get copyWith => __$MarianumMessageStateCopyWithImpl<_MarianumMessageState>(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$MarianumMessageStateImpl && - (identical(other.messageList, messageList) || - other.messageList == messageList)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, messageList); - - /// 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> - get copyWith => - __$$MarianumMessageStateImplCopyWithImpl<_$MarianumMessageStateImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$MarianumMessageStateImplToJson( - this, - ); - } +@override +Map toJson() { + return _$MarianumMessageStateToJson(this, ); } -abstract class _MarianumMessageState implements MarianumMessageState { - const factory _MarianumMessageState( - {required final MarianumMessageList messageList}) = - _$MarianumMessageStateImpl; - - factory _MarianumMessageState.fromJson(Map json) = - _$MarianumMessageStateImpl.fromJson; - - @override - MarianumMessageList get messageList; - - /// Create a copy of MarianumMessageState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$MarianumMessageStateImplCopyWith<_$MarianumMessageStateImpl> - get copyWith => throw _privateConstructorUsedError; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumMessageState&&(identical(other.messageList, messageList) || other.messageList == messageList)); } -MarianumMessageList _$MarianumMessageListFromJson(Map json) { - return _MarianumMessageList.fromJson(json); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,messageList); + +@override +String toString() { + return 'MarianumMessageState(messageList: $messageList)'; } + +} + +/// @nodoc +abstract mixin class _$MarianumMessageStateCopyWith<$Res> implements $MarianumMessageStateCopyWith<$Res> { + factory _$MarianumMessageStateCopyWith(_MarianumMessageState value, $Res Function(_MarianumMessageState) _then) = __$MarianumMessageStateCopyWithImpl; +@override @useResult +$Res call({ + MarianumMessageList messageList +}); + + +@override $MarianumMessageListCopyWith<$Res> get messageList; + +} +/// @nodoc +class __$MarianumMessageStateCopyWithImpl<$Res> + implements _$MarianumMessageStateCopyWith<$Res> { + __$MarianumMessageStateCopyWithImpl(this._self, this._then); + + final _MarianumMessageState _self; + final $Res Function(_MarianumMessageState) _then; + +/// Create a copy of MarianumMessageState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? messageList = null,}) { + return _then(_MarianumMessageState( +messageList: null == messageList ? _self.messageList : messageList // ignore: cast_nullable_to_non_nullable +as MarianumMessageList, + )); +} + +/// 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 { + + return $MarianumMessageListCopyWith<$Res>(_self.messageList, (value) { + return _then(_self.copyWith(messageList: value)); + }); +} +} + + /// @nodoc mixin _$MarianumMessageList { - String get base => throw _privateConstructorUsedError; - List get messages => throw _privateConstructorUsedError; + + String get base; List get messages; +/// Create a copy of MarianumMessageList +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MarianumMessageListCopyWith get copyWith => _$MarianumMessageListCopyWithImpl(this as MarianumMessageList, _$identity); /// Serializes this MarianumMessageList to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumMessageList&&(identical(other.base, base) || other.base == base)&&const DeepCollectionEquality().equals(other.messages, messages)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,base,const DeepCollectionEquality().hash(messages)); + +@override +String toString() { + return 'MarianumMessageList(base: $base, messages: $messages)'; +} + - /// 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; } /// @nodoc -abstract class $MarianumMessageListCopyWith<$Res> { - factory $MarianumMessageListCopyWith( - MarianumMessageList value, $Res Function(MarianumMessageList) then) = - _$MarianumMessageListCopyWithImpl<$Res, MarianumMessageList>; - @useResult - $Res call({String base, List messages}); -} +abstract mixin class $MarianumMessageListCopyWith<$Res> { + factory $MarianumMessageListCopyWith(MarianumMessageList value, $Res Function(MarianumMessageList) _then) = _$MarianumMessageListCopyWithImpl; +@useResult +$Res call({ + String base, List messages +}); + + + +} /// @nodoc -class _$MarianumMessageListCopyWithImpl<$Res, $Val extends MarianumMessageList> +class _$MarianumMessageListCopyWithImpl<$Res> implements $MarianumMessageListCopyWith<$Res> { - _$MarianumMessageListCopyWithImpl(this._value, this._then); + _$MarianumMessageListCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final MarianumMessageList _self; + final $Res Function(MarianumMessageList) _then; - /// Create a copy of MarianumMessageList - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? base = null, - Object? messages = null, - }) { - return _then(_value.copyWith( - base: null == base - ? _value.base - : base // ignore: cast_nullable_to_non_nullable - as String, - messages: null == messages - ? _value.messages - : messages // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); - } +/// Create a copy of MarianumMessageList +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? base = null,Object? messages = null,}) { + return _then(_self.copyWith( +base: null == base ? _self.base : base // ignore: cast_nullable_to_non_nullable +as String,messages: null == messages ? _self.messages : messages // ignore: cast_nullable_to_non_nullable +as List, + )); } -/// @nodoc -abstract class _$$MarianumMessageListImplCopyWith<$Res> - implements $MarianumMessageListCopyWith<$Res> { - factory _$$MarianumMessageListImplCopyWith(_$MarianumMessageListImpl value, - $Res Function(_$MarianumMessageListImpl) then) = - __$$MarianumMessageListImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({String base, List messages}); } -/// @nodoc -class __$$MarianumMessageListImplCopyWithImpl<$Res> - extends _$MarianumMessageListCopyWithImpl<$Res, _$MarianumMessageListImpl> - implements _$$MarianumMessageListImplCopyWith<$Res> { - __$$MarianumMessageListImplCopyWithImpl(_$MarianumMessageListImpl _value, - $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({ - Object? base = null, - Object? messages = null, - }) { - return _then(_$MarianumMessageListImpl( - base: null == base - ? _value.base - : base // ignore: cast_nullable_to_non_nullable - as String, - messages: null == messages - ? _value._messages - : messages // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Adds pattern-matching-related methods to [MarianumMessageList]. +extension MarianumMessageListPatterns on MarianumMessageList { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _MarianumMessageList value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _MarianumMessageList() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _MarianumMessageList value) $default,){ +final _that = this; +switch (_that) { +case _MarianumMessageList(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _MarianumMessageList value)? $default,){ +final _that = this; +switch (_that) { +case _MarianumMessageList() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String base, List messages)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _MarianumMessageList() when $default != null: +return $default(_that.base,_that.messages);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String base, List messages) $default,) {final _that = this; +switch (_that) { +case _MarianumMessageList(): +return $default(_that.base,_that.messages);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String base, List messages)? $default,) {final _that = this; +switch (_that) { +case _MarianumMessageList() when $default != null: +return $default(_that.base,_that.messages);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _$MarianumMessageListImpl implements _MarianumMessageList { - const _$MarianumMessageListImpl( - {required this.base, required final List messages}) - : _messages = messages; - factory _$MarianumMessageListImpl.fromJson(Map json) => - _$$MarianumMessageListImplFromJson(json); +class _MarianumMessageList implements MarianumMessageList { + const _MarianumMessageList({required this.base, required final List messages}): _messages = messages; + factory _MarianumMessageList.fromJson(Map json) => _$MarianumMessageListFromJson(json); - @override - final String base; - final List _messages; - @override - List get messages { - if (_messages is EqualUnmodifiableListView) return _messages; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_messages); - } - - @override - String toString() { - return 'MarianumMessageList(base: $base, messages: $messages)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$MarianumMessageListImpl && - (identical(other.base, base) || other.base == base) && - const DeepCollectionEquality().equals(other._messages, _messages)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, base, const DeepCollectionEquality().hash(_messages)); - - /// 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 => - __$$MarianumMessageListImplCopyWithImpl<_$MarianumMessageListImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$MarianumMessageListImplToJson( - this, - ); - } +@override final String base; + final List _messages; +@override List get messages { + if (_messages is EqualUnmodifiableListView) return _messages; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_messages); } -abstract class _MarianumMessageList implements MarianumMessageList { - const factory _MarianumMessageList( - {required final String base, - required final List messages}) = - _$MarianumMessageListImpl; - factory _MarianumMessageList.fromJson(Map json) = - _$MarianumMessageListImpl.fromJson; +/// Create a copy of MarianumMessageList +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$MarianumMessageListCopyWith<_MarianumMessageList> get copyWith => __$MarianumMessageListCopyWithImpl<_MarianumMessageList>(this, _$identity); - @override - 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(includeFromJson: false, includeToJson: false) - _$$MarianumMessageListImplCopyWith<_$MarianumMessageListImpl> get copyWith => - throw _privateConstructorUsedError; +@override +Map toJson() { + return _$MarianumMessageListToJson(this, ); } -MarianumMessage _$MarianumMessageFromJson(Map json) { - return _MarianumMessage.fromJson(json); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumMessageList&&(identical(other.base, base) || other.base == base)&&const DeepCollectionEquality().equals(other._messages, _messages)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,base,const DeepCollectionEquality().hash(_messages)); + +@override +String toString() { + return 'MarianumMessageList(base: $base, messages: $messages)'; +} + + +} + +/// @nodoc +abstract mixin class _$MarianumMessageListCopyWith<$Res> implements $MarianumMessageListCopyWith<$Res> { + factory _$MarianumMessageListCopyWith(_MarianumMessageList value, $Res Function(_MarianumMessageList) _then) = __$MarianumMessageListCopyWithImpl; +@override @useResult +$Res call({ + String base, List messages +}); + + + + +} +/// @nodoc +class __$MarianumMessageListCopyWithImpl<$Res> + implements _$MarianumMessageListCopyWith<$Res> { + __$MarianumMessageListCopyWithImpl(this._self, this._then); + + final _MarianumMessageList _self; + final $Res Function(_MarianumMessageList) _then; + +/// Create a copy of MarianumMessageList +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? base = null,Object? messages = null,}) { + return _then(_MarianumMessageList( +base: null == base ? _self.base : base // ignore: cast_nullable_to_non_nullable +as String,messages: null == messages ? _self._messages : messages // ignore: cast_nullable_to_non_nullable +as List, + )); +} + + +} + + /// @nodoc mixin _$MarianumMessage { - String get name => throw _privateConstructorUsedError; - String get date => throw _privateConstructorUsedError; - String get url => throw _privateConstructorUsedError; + + String get name; String get date; String get url; +/// Create a copy of MarianumMessage +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MarianumMessageCopyWith get copyWith => _$MarianumMessageCopyWithImpl(this as MarianumMessage, _$identity); /// Serializes this MarianumMessage to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumMessage&&(identical(other.name, name) || other.name == name)&&(identical(other.date, date) || other.date == date)&&(identical(other.url, url) || other.url == url)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,date,url); + +@override +String toString() { + return 'MarianumMessage(name: $name, date: $date, url: $url)'; +} + - /// 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; } /// @nodoc -abstract class $MarianumMessageCopyWith<$Res> { - factory $MarianumMessageCopyWith( - MarianumMessage value, $Res Function(MarianumMessage) then) = - _$MarianumMessageCopyWithImpl<$Res, MarianumMessage>; - @useResult - $Res call({String name, String date, String url}); -} +abstract mixin class $MarianumMessageCopyWith<$Res> { + factory $MarianumMessageCopyWith(MarianumMessage value, $Res Function(MarianumMessage) _then) = _$MarianumMessageCopyWithImpl; +@useResult +$Res call({ + String name, String date, String url +}); + + + +} /// @nodoc -class _$MarianumMessageCopyWithImpl<$Res, $Val extends MarianumMessage> +class _$MarianumMessageCopyWithImpl<$Res> implements $MarianumMessageCopyWith<$Res> { - _$MarianumMessageCopyWithImpl(this._value, this._then); + _$MarianumMessageCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final MarianumMessage _self; + final $Res Function(MarianumMessage) _then; - /// Create a copy of MarianumMessage - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? date = null, - Object? url = null, - }) { - return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as String, - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); - } +/// Create a copy of MarianumMessage +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? date = null,Object? url = null,}) { + return _then(_self.copyWith( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable +as String,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable +as String, + )); } -/// @nodoc -abstract class _$$MarianumMessageImplCopyWith<$Res> - implements $MarianumMessageCopyWith<$Res> { - factory _$$MarianumMessageImplCopyWith(_$MarianumMessageImpl value, - $Res Function(_$MarianumMessageImpl) then) = - __$$MarianumMessageImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({String name, String date, String url}); } -/// @nodoc -class __$$MarianumMessageImplCopyWithImpl<$Res> - extends _$MarianumMessageCopyWithImpl<$Res, _$MarianumMessageImpl> - implements _$$MarianumMessageImplCopyWith<$Res> { - __$$MarianumMessageImplCopyWithImpl( - _$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({ - Object? name = null, - Object? date = null, - Object? url = null, - }) { - return _then(_$MarianumMessageImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as String, - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Adds pattern-matching-related methods to [MarianumMessage]. +extension MarianumMessagePatterns on MarianumMessage { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _MarianumMessage value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _MarianumMessage() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _MarianumMessage value) $default,){ +final _that = this; +switch (_that) { +case _MarianumMessage(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _MarianumMessage value)? $default,){ +final _that = this; +switch (_that) { +case _MarianumMessage() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String name, String date, String url)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _MarianumMessage() when $default != null: +return $default(_that.name,_that.date,_that.url);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String name, String date, String url) $default,) {final _that = this; +switch (_that) { +case _MarianumMessage(): +return $default(_that.name,_that.date,_that.url);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String name, String date, String url)? $default,) {final _that = this; +switch (_that) { +case _MarianumMessage() when $default != null: +return $default(_that.name,_that.date,_that.url);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _$MarianumMessageImpl implements _MarianumMessage { - const _$MarianumMessageImpl( - {required this.name, required this.date, required this.url}); - factory _$MarianumMessageImpl.fromJson(Map json) => - _$$MarianumMessageImplFromJson(json); +class _MarianumMessage implements MarianumMessage { + const _MarianumMessage({required this.name, required this.date, required this.url}); + factory _MarianumMessage.fromJson(Map json) => _$MarianumMessageFromJson(json); - @override - final String name; - @override - final String date; - @override - final String url; +@override final String name; +@override final String date; +@override final String url; - @override - String toString() { - return 'MarianumMessage(name: $name, date: $date, url: $url)'; - } +/// Create a copy of MarianumMessage +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$MarianumMessageCopyWith<_MarianumMessage> get copyWith => __$MarianumMessageCopyWithImpl<_MarianumMessage>(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$MarianumMessageImpl && - (identical(other.name, name) || other.name == name) && - (identical(other.date, date) || other.date == date) && - (identical(other.url, url) || other.url == url)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, name, date, url); - - /// 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 => - __$$MarianumMessageImplCopyWithImpl<_$MarianumMessageImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$MarianumMessageImplToJson( - this, - ); - } +@override +Map toJson() { + return _$MarianumMessageToJson(this, ); } -abstract class _MarianumMessage implements MarianumMessage { - const factory _MarianumMessage( - {required final String name, - required final String date, - required final String url}) = _$MarianumMessageImpl; - - factory _MarianumMessage.fromJson(Map json) = - _$MarianumMessageImpl.fromJson; - - @override - String get name; - @override - 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(includeFromJson: false, includeToJson: false) - _$$MarianumMessageImplCopyWith<_$MarianumMessageImpl> get copyWith => - throw _privateConstructorUsedError; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumMessage&&(identical(other.name, name) || other.name == name)&&(identical(other.date, date) || other.date == date)&&(identical(other.url, url) || other.url == url)); } + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,date,url); + +@override +String toString() { + return 'MarianumMessage(name: $name, date: $date, url: $url)'; +} + + +} + +/// @nodoc +abstract mixin class _$MarianumMessageCopyWith<$Res> implements $MarianumMessageCopyWith<$Res> { + factory _$MarianumMessageCopyWith(_MarianumMessage value, $Res Function(_MarianumMessage) _then) = __$MarianumMessageCopyWithImpl; +@override @useResult +$Res call({ + String name, String date, String url +}); + + + + +} +/// @nodoc +class __$MarianumMessageCopyWithImpl<$Res> + implements _$MarianumMessageCopyWith<$Res> { + __$MarianumMessageCopyWithImpl(this._self, this._then); + + final _MarianumMessage _self; + final $Res Function(_MarianumMessage) _then; + +/// Create a copy of MarianumMessage +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? date = null,Object? url = null,}) { + return _then(_MarianumMessage( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable +as String,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + +} + +// dart format on diff --git a/lib/state/app/modules/marianumMessage/bloc/marianum_message_state.g.dart b/lib/state/app/modules/marianumMessage/bloc/marianum_message_state.g.dart index 80dc1a2..ddadb8b 100644 --- a/lib/state/app/modules/marianumMessage/bloc/marianum_message_state.g.dart +++ b/lib/state/app/modules/marianumMessage/bloc/marianum_message_state.g.dart @@ -6,45 +6,38 @@ part of 'marianum_message_state.dart'; // JsonSerializableGenerator // ************************************************************************** -_$MarianumMessageStateImpl _$$MarianumMessageStateImplFromJson( - Map json) => - _$MarianumMessageStateImpl( - messageList: MarianumMessageList.fromJson( - json['messageList'] as Map), - ); +_MarianumMessageState _$MarianumMessageStateFromJson( + Map json, +) => _MarianumMessageState( + messageList: MarianumMessageList.fromJson( + json['messageList'] as Map, + ), +); -Map _$$MarianumMessageStateImplToJson( - _$MarianumMessageStateImpl instance) => - { - 'messageList': instance.messageList, - }; +Map _$MarianumMessageStateToJson( + _MarianumMessageState instance, +) => {'messageList': instance.messageList}; -_$MarianumMessageListImpl _$$MarianumMessageListImplFromJson( - Map json) => - _$MarianumMessageListImpl( +_MarianumMessageList _$MarianumMessageListFromJson(Map json) => + _MarianumMessageList( base: json['base'] as String, messages: (json['messages'] as List) .map((e) => MarianumMessage.fromJson(e as Map)) .toList(), ); -Map _$$MarianumMessageListImplToJson( - _$MarianumMessageListImpl instance) => - { - 'base': instance.base, - 'messages': instance.messages, - }; +Map _$MarianumMessageListToJson( + _MarianumMessageList instance, +) => {'base': instance.base, 'messages': instance.messages}; -_$MarianumMessageImpl _$$MarianumMessageImplFromJson( - Map json) => - _$MarianumMessageImpl( +_MarianumMessage _$MarianumMessageFromJson(Map json) => + _MarianumMessage( name: json['name'] as String, date: json['date'] as String, url: json['url'] as String, ); -Map _$$MarianumMessageImplToJson( - _$MarianumMessageImpl instance) => +Map _$MarianumMessageToJson(_MarianumMessage instance) => { 'name': instance.name, 'date': instance.date, diff --git a/lib/storage/base/settings.g.dart b/lib/storage/base/settings.g.dart index c4569e1..a3402be 100644 --- a/lib/storage/base/settings.g.dart +++ b/lib/storage/base/settings.g.dart @@ -7,35 +7,43 @@ part of 'settings.dart'; // ************************************************************************** Settings _$SettingsFromJson(Map json) => Settings( - appTheme: Settings._themeFromJson(json['appTheme'] as String), - devToolsEnabled: json['devToolsEnabled'] as bool, - modulesSettings: ModulesSettings.fromJson( - json['modulesSettings'] as Map), - timetableSettings: TimetableSettings.fromJson( - json['timetableSettings'] as Map), - talkSettings: - TalkSettings.fromJson(json['talkSettings'] as Map), - fileSettings: - FileSettings.fromJson(json['fileSettings'] as Map), - holidaysSettings: HolidaysSettings.fromJson( - json['holidaysSettings'] as Map), - fileViewSettings: FileViewSettings.fromJson( - json['fileViewSettings'] as Map), - notificationSettings: NotificationSettings.fromJson( - json['notificationSettings'] as Map), - devToolsSettings: DevToolsSettings.fromJson( - json['devToolsSettings'] as Map), - ); + appTheme: Settings._themeFromJson(json['appTheme'] as String), + devToolsEnabled: json['devToolsEnabled'] as bool, + modulesSettings: ModulesSettings.fromJson( + json['modulesSettings'] as Map, + ), + timetableSettings: TimetableSettings.fromJson( + json['timetableSettings'] as Map, + ), + talkSettings: TalkSettings.fromJson( + json['talkSettings'] as Map, + ), + fileSettings: FileSettings.fromJson( + json['fileSettings'] as Map, + ), + holidaysSettings: HolidaysSettings.fromJson( + json['holidaysSettings'] as Map, + ), + fileViewSettings: FileViewSettings.fromJson( + json['fileViewSettings'] as Map, + ), + notificationSettings: NotificationSettings.fromJson( + json['notificationSettings'] as Map, + ), + devToolsSettings: DevToolsSettings.fromJson( + json['devToolsSettings'] as Map, + ), +); Map _$SettingsToJson(Settings instance) => { - 'appTheme': Settings._themeToJson(instance.appTheme), - 'devToolsEnabled': instance.devToolsEnabled, - 'modulesSettings': instance.modulesSettings.toJson(), - 'timetableSettings': instance.timetableSettings.toJson(), - 'talkSettings': instance.talkSettings.toJson(), - 'fileSettings': instance.fileSettings.toJson(), - 'holidaysSettings': instance.holidaysSettings.toJson(), - 'fileViewSettings': instance.fileViewSettings.toJson(), - 'notificationSettings': instance.notificationSettings.toJson(), - 'devToolsSettings': instance.devToolsSettings.toJson(), - }; + 'appTheme': Settings._themeToJson(instance.appTheme), + 'devToolsEnabled': instance.devToolsEnabled, + 'modulesSettings': instance.modulesSettings.toJson(), + 'timetableSettings': instance.timetableSettings.toJson(), + 'talkSettings': instance.talkSettings.toJson(), + 'fileSettings': instance.fileSettings.toJson(), + 'holidaysSettings': instance.holidaysSettings.toJson(), + 'fileViewSettings': instance.fileViewSettings.toJson(), + 'notificationSettings': instance.notificationSettings.toJson(), + 'devToolsSettings': instance.devToolsSettings.toJson(), +}; diff --git a/lib/storage/file/fileSettings.g.dart b/lib/storage/file/fileSettings.g.dart index adc8c6e..9855925 100644 --- a/lib/storage/file/fileSettings.g.dart +++ b/lib/storage/file/fileSettings.g.dart @@ -7,10 +7,10 @@ part of 'fileSettings.dart'; // ************************************************************************** FileSettings _$FileSettingsFromJson(Map json) => FileSettings( - sortFoldersToTop: json['sortFoldersToTop'] as bool, - ascending: json['ascending'] as bool, - sortBy: $enumDecode(_$SortOptionEnumMap, json['sortBy']), - ); + sortFoldersToTop: json['sortFoldersToTop'] as bool, + ascending: json['ascending'] as bool, + sortBy: $enumDecode(_$SortOptionEnumMap, json['sortBy']), +); Map _$FileSettingsToJson(FileSettings instance) => { diff --git a/lib/storage/fileView/fileViewSettings.g.dart b/lib/storage/fileView/fileViewSettings.g.dart index ea16ee8..f34915a 100644 --- a/lib/storage/fileView/fileViewSettings.g.dart +++ b/lib/storage/fileView/fileViewSettings.g.dart @@ -12,6 +12,4 @@ FileViewSettings _$FileViewSettingsFromJson(Map json) => ); Map _$FileViewSettingsToJson(FileViewSettings instance) => - { - 'alwaysOpenExternally': instance.alwaysOpenExternally, - }; + {'alwaysOpenExternally': instance.alwaysOpenExternally}; diff --git a/lib/storage/general/modulesSettings.g.dart b/lib/storage/general/modulesSettings.g.dart index 0f9f9b6..c5a7262 100644 --- a/lib/storage/general/modulesSettings.g.dart +++ b/lib/storage/general/modulesSettings.g.dart @@ -16,13 +16,14 @@ ModulesSettings _$ModulesSettingsFromJson(Map json) => .toList(), ); -Map _$ModulesSettingsToJson(ModulesSettings instance) => - { - 'moduleOrder': - instance.moduleOrder.map((e) => _$ModulesEnumMap[e]!).toList(), - 'hiddenModules': - instance.hiddenModules.map((e) => _$ModulesEnumMap[e]!).toList(), - }; +Map _$ModulesSettingsToJson( + ModulesSettings instance, +) => { + 'moduleOrder': instance.moduleOrder.map((e) => _$ModulesEnumMap[e]!).toList(), + 'hiddenModules': instance.hiddenModules + .map((e) => _$ModulesEnumMap[e]!) + .toList(), +}; const _$ModulesEnumMap = { Modules.timetable: 'timetable', diff --git a/lib/storage/notification/notificationSettings.g.dart b/lib/storage/notification/notificationSettings.g.dart index d46c15d..0229204 100644 --- a/lib/storage/notification/notificationSettings.g.dart +++ b/lib/storage/notification/notificationSettings.g.dart @@ -7,15 +7,15 @@ part of 'notificationSettings.dart'; // ************************************************************************** NotificationSettings _$NotificationSettingsFromJson( - Map json) => - NotificationSettings( - askUsageDismissed: json['askUsageDismissed'] as bool, - enabled: json['enabled'] as bool, - ); + Map json, +) => NotificationSettings( + askUsageDismissed: json['askUsageDismissed'] as bool, + enabled: json['enabled'] as bool, +); Map _$NotificationSettingsToJson( - NotificationSettings instance) => - { - 'askUsageDismissed': instance.askUsageDismissed, - 'enabled': instance.enabled, - }; + NotificationSettings instance, +) => { + 'askUsageDismissed': instance.askUsageDismissed, + 'enabled': instance.enabled, +}; diff --git a/lib/storage/talk/talkSettings.g.dart b/lib/storage/talk/talkSettings.g.dart index ad15998..568988e 100644 --- a/lib/storage/talk/talkSettings.g.dart +++ b/lib/storage/talk/talkSettings.g.dart @@ -7,11 +7,11 @@ part of 'talkSettings.dart'; // ************************************************************************** TalkSettings _$TalkSettingsFromJson(Map json) => TalkSettings( - sortFavoritesToTop: json['sortFavoritesToTop'] as bool, - sortUnreadToTop: json['sortUnreadToTop'] as bool, - drafts: Map.from(json['drafts'] as Map), - draftReplies: Map.from(json['draftReplies'] as Map), - ); + sortFavoritesToTop: json['sortFavoritesToTop'] as bool, + sortUnreadToTop: json['sortUnreadToTop'] as bool, + drafts: Map.from(json['drafts'] as Map), + draftReplies: Map.from(json['draftReplies'] as Map), +); Map _$TalkSettingsToJson(TalkSettings instance) => { diff --git a/lib/storage/timetable/timetableSettings.g.dart b/lib/storage/timetable/timetableSettings.g.dart index 823d293..2ea7c43 100644 --- a/lib/storage/timetable/timetableSettings.g.dart +++ b/lib/storage/timetable/timetableSettings.g.dart @@ -9,16 +9,18 @@ part of 'timetableSettings.dart'; TimetableSettings _$TimetableSettingsFromJson(Map json) => TimetableSettings( connectDoubleLessons: json['connectDoubleLessons'] as bool, - timetableNameMode: - $enumDecode(_$TimetableNameModeEnumMap, json['timetableNameMode']), + timetableNameMode: $enumDecode( + _$TimetableNameModeEnumMap, + json['timetableNameMode'], + ), ); -Map _$TimetableSettingsToJson(TimetableSettings instance) => - { - 'connectDoubleLessons': instance.connectDoubleLessons, - 'timetableNameMode': - _$TimetableNameModeEnumMap[instance.timetableNameMode]!, - }; +Map _$TimetableSettingsToJson( + TimetableSettings instance, +) => { + 'connectDoubleLessons': instance.connectDoubleLessons, + 'timetableNameMode': _$TimetableNameModeEnumMap[instance.timetableNameMode]!, +}; const _$TimetableNameModeEnumMap = { TimetableNameMode.name: 'name', diff --git a/pubspec.yaml b/pubspec.yaml index 63931ca..f79ff28 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,36 +1,14 @@ name: marianum_mobile description: Mobile client for Webuntis and Nextcloud with Talk integration -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -# In Windows, build-name is used as the major, minor, and patch parts -# of the product and file versions while build-number is used as the build suffix. -version: 0.1.6+44 +publish_to: 'none' +version: 0.1.7+45 environment: - sdk: '>3.0.0' - -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. + sdk: ">=3.8.0 <4.0.0" dependency_overrides: - intl: any + intl: 0.20.2 dependencies: flutter: @@ -46,6 +24,7 @@ dependencies: bottom_sheet: ^4.0.4 bubble: ^1.2.1 cached_network_image: ^3.4.1 + collection: ^1.19.0 connectivity_plus: ^6.1.2 crypto: ^3.0.6 cupertino_icons: ^1.0.8 @@ -64,11 +43,9 @@ dependencies: url: https://github.com/Harsh223/flowder.git flutter_app_badge: ^2.0.2 flutter_bloc: ^9.0.0 - flutter_launcher_icons: ^0.14.3 flutter_linkify: ^6.0.0 flutter_local_notifications: ^19.4.1 flutter_login: ^5.0.0 - flutter_native_splash: ^2.4.4 flutter_split_view: ^0.1.2 freezed_annotation: ^3.1.0 http: ^1.3.0 @@ -84,6 +61,7 @@ dependencies: path: packages/nextcloud ref: 3683491a94670393e46cbc83ad85b994f7df7481 url: https://github.com/provokateurin/nextcloud-neon + open_filex: ^4.7.0 package_info_plus: ^8.1.3 path_provider: ^2.1.5 persistent_bottom_nav_bar_v2: ^6.1.0 @@ -100,39 +78,19 @@ dependencies: time_range_picker: ^2.3.0 url_launcher: ^6.3.1 uuid: ^4.5.1 - open_filex: ^4.7.0 - collection: ^1.19.0 dev_dependencies: - flutter_test: - sdk: flutter - json_serializable: any - build_runner: any + flutter_launcher_icons: ^0.14.3 + flutter_native_splash: ^2.4.4 - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - flutter_lints: any - freezed: any + build_runner: ^2.10.5 + freezed: ^3.2.4 + json_serializable: ^6.11.4 -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec + flutter_lints: ^6.0.0 -# The following section is specific to Flutter packages. flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - assets: - assets/ca/ - assets/background/