Custom Timetable code style corrections
This commit is contained in:
parent
22db412e75
commit
0f6c75690d
@ -1,5 +1,4 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:developer';
|
|
||||||
|
|
||||||
import 'package:http/http.dart';
|
import 'package:http/http.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
@ -18,7 +17,6 @@ class AddCustomTimetableEvent extends MhslApi<void> {
|
|||||||
@override
|
@override
|
||||||
Future<Response>? request(Uri uri) {
|
Future<Response>? request(Uri uri) {
|
||||||
String body = jsonEncode(params.toJson());
|
String body = jsonEncode(params.toJson());
|
||||||
log(body);
|
|
||||||
return http.post(uri, body: body);
|
return http.post(uri, body: body);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -22,7 +22,6 @@ class CustomTimetableEvent {
|
|||||||
CustomTimetableEvent({required this.id, required this.title, required this.description, required this.startDate,
|
CustomTimetableEvent({required this.id, required this.title, required this.description, required this.startDate,
|
||||||
required this.endDate, required this.rrule, required this.createdAt, required this.updatedAt});
|
required this.endDate, required this.rrule, required this.createdAt, required this.updatedAt});
|
||||||
|
|
||||||
|
|
||||||
factory CustomTimetableEvent.fromJson(Map<String, dynamic> json) => _$CustomTimetableEventFromJson(json);
|
factory CustomTimetableEvent.fromJson(Map<String, dynamic> json) => _$CustomTimetableEventFromJson(json);
|
||||||
Map<String, dynamic> toJson() => _$CustomTimetableEventToJson(this);
|
Map<String, dynamic> toJson() => _$CustomTimetableEventToJson(this);
|
||||||
}
|
}
|
@ -18,5 +18,4 @@ class RemoveCustomTimetableEvent extends MhslApi<void> {
|
|||||||
Future<Response>? request(Uri uri) {
|
Future<Response>? request(Uri uri) {
|
||||||
return http.delete(uri, body: jsonEncode(params.toJson()));
|
return http.delete(uri, body: jsonEncode(params.toJson()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -18,5 +18,4 @@ class UpdateCustomTimetableEvent extends MhslApi<void> {
|
|||||||
Future<Response>? request(Uri uri) {
|
Future<Response>? request(Uri uri) {
|
||||||
return http.patch(uri, body: jsonEncode(params.toJson()));
|
return http.patch(uri, body: jsonEncode(params.toJson()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user