updated project style guidelines

This commit is contained in:
2024-04-03 19:18:17 +02:00
parent 27618f4404
commit 4c7f53e309
185 changed files with 505 additions and 873 deletions

View File

@ -11,8 +11,8 @@ class GetTimetable extends WebuntisApi {
@override
Future<GetTimetableResponse> run() async {
String rawAnswer = await query(this);
var rawAnswer = await query(this);
return finalize(GetTimetableResponse.fromJson(jsonDecode(rawAnswer)));
}
}
}

View File

@ -15,13 +15,10 @@ class GetTimetableCache extends RequestCache<GetTimetableResponse> {
}
@override
GetTimetableResponse onLocalData(String json) {
return GetTimetableResponse.fromJson(jsonDecode(json));
}
GetTimetableResponse onLocalData(String json) => GetTimetableResponse.fromJson(jsonDecode(json));
@override
Future<GetTimetableResponse> onLoad() async {
return GetTimetable(
Future<GetTimetableResponse> onLoad() async => GetTimetable(
GetTimetableParams(
options: GetTimetableParamsOptions(
element: GetTimetableParamsOptionsElement(
@ -38,5 +35,4 @@ class GetTimetableCache extends RequestCache<GetTimetableResponse> {
)
)
).run();
}
}
}

View File

@ -91,4 +91,4 @@ enum GetTimetableParamsOptionsElementKeyType {
@JsonValue('id') id,
@JsonValue('name') name,
@JsonValue('externalkey') externalkey
}
}

View File

@ -136,4 +136,4 @@ class GetTimetableResponseObjectRoom {
factory GetTimetableResponseObjectRoom.fromJson(Map<String, dynamic> json) => _$GetTimetableResponseObjectRoomFromJson(json);
Map<String, dynamic> toJson() => _$GetTimetableResponseObjectRoomToJson(this);
}
}