File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,10 @@ Future<Schedule> postSchedule(Schedule schedule) async {
24
24
25
25
Future <List <Schedule >> getSchedules () async {
26
26
final uri = Uri .http (apiUrl, scheduleEndpoint);
27
- try {
28
- final response = await httpClient.get (uri).timeout (timeout);
29
- _expectResponseCode (200 , response);
30
- // Use the compute function to run parseSchedules in a separate isolate.
31
- return compute (_parseSchedules, response.body);
32
- } on TimeoutException catch (te, stacktrace) {
33
- return Future .error (te, stacktrace);
34
- }
27
+ final response = await httpClient.get (uri).timeout (timeout);
28
+ _expectResponseCode (200 , response);
29
+ // Use the compute function to run parseSchedules in a separate isolate.
30
+ return compute (_parseSchedules, response.body);
35
31
}
36
32
37
33
Future <Schedule > getSchedule (String id) async {
You can’t perform that action at this time.
0 commit comments