File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -269,20 +269,25 @@ class DpipDataModel extends _DpipDataModel {
269269 }
270270
271271 Future <(Rts ?, List <Eew >)> _fetchRtsData () async {
272+ Rts ? rts;
273+ List <Eew > eew = [];
274+
272275 try {
273- final data = _isReplayMode
274- ? await Future .wait ([
275- ExpTech ().getRts (currentTime),
276- ExpTech ().getEew (currentTime),
277- ])
278- : await Future .wait ([ExpTech ().getRts (), ExpTech ().getEew ()]);
279-
280- return (data[0 ] as Rts , data[1 ] as List <Eew >);
276+ rts = _isReplayMode
277+ ? await ExpTech ().getRts (currentTime)
278+ : await ExpTech ().getRts ();
281279 } on Rtsnodata {
282- final eew =
283- _isReplayMode ? await ExpTech ().getEew (currentTime) : < Eew > [];
284- return (null , eew);
280+ rts = null ;
281+ }
282+ try {
283+ eew = _isReplayMode
284+ ? await ExpTech ().getEew (currentTime)
285+ : await ExpTech ().getEew ();
286+ } catch (e) {
287+ eew = [];
285288 }
289+
290+ return (rts, eew);
286291 }
287292
288293 Future <void > fetchRtsImmediately () async {
You can’t perform that action at this time.
0 commit comments