dart format

This commit is contained in:
2026-05-08 20:12:40 +02:00
parent 9e139b5704
commit 3b8da1d3d6
295 changed files with 6404 additions and 4161 deletions
@@ -9,10 +9,12 @@ import 'get_custom_timetable_event_response.dart';
class GetCustomTimetableEvent extends MhslApi<GetCustomTimetableEventResponse> {
GetCustomTimetableEventParams params;
GetCustomTimetableEvent(this.params) : super('server/timetable/customEvents?user=${params.user}');
GetCustomTimetableEvent(this.params)
: super('server/timetable/customEvents?user=${params.user}');
@override
GetCustomTimetableEventResponse assemble(String raw) => GetCustomTimetableEventResponse.fromJson({'events': jsonDecode(raw)});
GetCustomTimetableEventResponse assemble(String raw) =>
GetCustomTimetableEventResponse.fromJson({'events': jsonDecode(raw)});
@override
Future<Response>? request(Uri uri) => http.get(uri);
@@ -3,17 +3,18 @@ import 'get_custom_timetable_event.dart';
import 'get_custom_timetable_event_params.dart';
import 'get_custom_timetable_event_response.dart';
class GetCustomTimetableEventCache extends SimpleCache<GetCustomTimetableEventResponse> {
class GetCustomTimetableEventCache
extends SimpleCache<GetCustomTimetableEventResponse> {
GetCustomTimetableEventCache(
GetCustomTimetableEventParams params, {
super.onUpdate,
super.onError,
super.renew,
}) : super(
cacheTime: RequestCache.cacheMinute,
loader: () => GetCustomTimetableEvent(params).run(),
fromJson: GetCustomTimetableEventResponse.fromJson,
) {
cacheTime: RequestCache.cacheMinute,
loader: () => GetCustomTimetableEvent(params).run(),
fromJson: GetCustomTimetableEventResponse.fromJson,
) {
start('customTimetableEvents');
}
}
@@ -8,6 +8,7 @@ class GetCustomTimetableEventParams {
GetCustomTimetableEventParams(this.user);
factory GetCustomTimetableEventParams.fromJson(Map<String, dynamic> json) => _$GetCustomTimetableEventParamsFromJson(json);
factory GetCustomTimetableEventParams.fromJson(Map<String, dynamic> json) =>
_$GetCustomTimetableEventParamsFromJson(json);
Map<String, dynamic> toJson() => _$GetCustomTimetableEventParamsToJson(this);
}
@@ -11,6 +11,8 @@ class GetCustomTimetableEventResponse extends ApiResponse {
GetCustomTimetableEventResponse(this.events);
factory GetCustomTimetableEventResponse.fromJson(Map<String, dynamic> json) => _$GetCustomTimetableEventResponseFromJson(json);
Map<String, dynamic> toJson() => _$GetCustomTimetableEventResponseToJson(this);
factory GetCustomTimetableEventResponse.fromJson(Map<String, dynamic> json) =>
_$GetCustomTimetableEventResponseFromJson(json);
Map<String, dynamic> toJson() =>
_$GetCustomTimetableEventResponseToJson(this);
}