From 3787745f591def4c4b5125dc42596fc0bcb45548 Mon Sep 17 00:00:00 2001 From: dan63047 Date: Tue, 21 Jan 2025 18:08:59 +0300 Subject: [PATCH] ...i'm so stupid --- lib/views/destination_home.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/views/destination_home.dart b/lib/views/destination_home.dart index e80c2bb..99025ca 100644 --- a/lib/views/destination_home.dart +++ b/lib/views/destination_home.dart @@ -806,7 +806,7 @@ class _DestinationHomeState extends State with SingleTickerProv const Divider(), RecordSummary(record: summaries.zenith != null ? summaries.zenith : summaries.zenithCareerBest, hideRank: true, old: summaries.zenith == null), const Divider(), - Text(t.overallPB(pb: (summaries.achievements.isNotEmpty && summaries.achievements.firstWhere((e) => e.k == 18).v != null) ? f2.format(summaries.achievements.firstWhere((e) => e.k == 18).v!) : "-.--"), style: const TextStyle(color: Colors.grey)) + Text(t.overallPB(pb: (summaries.achievements.firstWhere((e) => e.k == 18, orElse: () => Achievement(k: 18, rt: 0, vt: 0, min: 0, deci: 0, name: "", object: "", category: "", hidden: true, art: 1, nolb: true, desc: "", n: "", a: 0)).v != null) ? f2.format(summaries.achievements.firstWhere((e) => e.k == 18).v!) : "-.--"), style: const TextStyle(color: Colors.grey)) ], ), ), @@ -821,7 +821,7 @@ class _DestinationHomeState extends State with SingleTickerProv const Divider(), RecordSummary(record: summaries.zenithEx != null ? summaries.zenithEx : summaries.zenithExCareerBest, hideRank: true, old: summaries.zenith == null), const Divider(), - Text(t.overallPB(pb: (summaries.achievements.isNotEmpty && summaries.achievements.firstWhere((e) => e.k == 19).v != null) ? f2.format(summaries.achievements.firstWhere((e) => e.k == 19).v!) : "-.--"), style: const TextStyle(color: Colors.grey)) + Text(t.overallPB(pb: (summaries.achievements.firstWhere((e) => e.k == 19, orElse: () => Achievement(k: 19, rt: 0, vt: 0, min: 0, deci: 0, name: "", object: "", category: "", hidden: true, art: 1, nolb: true, desc: "", n: "", a: 0)).v != null) ? f2.format(summaries.achievements.firstWhere((e) => e.k == 19).v!) : "-.--"), style: const TextStyle(color: Colors.grey)) ], ), ), @@ -872,14 +872,14 @@ class _DestinationHomeState extends State with SingleTickerProv children: [ Text("${t.stats.piecesTotal}:"), const Spacer(), - Text((summaries.achievements.isNotEmpty && summaries.achievements.firstWhere((e) => e.k == 1).v != null) ? intf.format(summaries.achievements.firstWhere((e) => e.k == 1).v!) : "---"), + Text((summaries.achievements.firstWhere((e) => e.k == 1, orElse: () => Achievement(k: 1, rt: 0, vt: 0, min: 0, deci: 0, name: "", object: "", category: "", hidden: true, art: 1, nolb: true, desc: "", n: "", a: 0)).v != null) ? intf.format(summaries.achievements.firstWhere((e) => e.k == 1).v!) : "---"), ], ), Row( children: [ Text(" - ${t.stats.piecesWithPerfectFinesse}:"), const Spacer(), - Text((summaries.achievements.isNotEmpty && summaries.achievements.firstWhere((e) => e.k == 4).v != null) ? intf.format(summaries.achievements.firstWhere((e) => e.k == 4).v!) : "---"), + Text((summaries.achievements.firstWhere((e) => e.k == 4, orElse: () => Achievement(k: 4, rt: 0, vt: 0, min: 0, deci: 0, name: "", object: "", category: "", hidden: true, art: 1, nolb: true, desc: "", n: "", a: 0)).v != null) ? intf.format(summaries.achievements.firstWhere((e) => e.k == 4).v!) : "---"), ], ) ],