updated project style guidelines
This commit is contained in:
@ -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)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -91,4 +91,4 @@ enum GetTimetableParamsOptionsElementKeyType {
|
||||
@JsonValue('id') id,
|
||||
@JsonValue('name') name,
|
||||
@JsonValue('externalkey') externalkey
|
||||
}
|
||||
}
|
||||
|
@ -136,4 +136,4 @@ class GetTimetableResponseObjectRoom {
|
||||
|
||||
factory GetTimetableResponseObjectRoom.fromJson(Map<String, dynamic> json) => _$GetTimetableResponseObjectRoomFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$GetTimetableResponseObjectRoomToJson(this);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user