From 39d415bab6e8e5a532db4daa9b5de1efb36034c7 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Tue, 1 Aug 2023 12:50:24 +0530 Subject: [PATCH] HomePage: Call super.initiate() first --- lib/ui/home_page.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/ui/home_page.dart b/lib/ui/home_page.dart index 900f047a03..6664c0fb7e 100644 --- a/lib/ui/home_page.dart +++ b/lib/ui/home_page.dart @@ -54,6 +54,7 @@ class _HomePageState extends State { @override void initState() { + super.initState(); _textController.addListener(_applyFilteringAndRefresh); _loadCodes(); _streamSubscription = Bus.instance.on().listen((event) { @@ -64,7 +65,7 @@ class _HomePageState extends State { await autoLogoutAlert(context); }); _initDeepLinks(); - super.initState(); + } void _loadCodes() { @@ -222,7 +223,11 @@ class _HomePageState extends State { } else { final list = ListView.builder( itemBuilder: ((context, index) { - return CodeWidget(_filteredCodes[index]); + try { + return CodeWidget(_filteredCodes[index]); + } catch(e) { + return const Text("Failed"); + } }), itemCount: _filteredCodes.length, );