diff --git a/lib/ui/home_page.dart b/lib/ui/home_page.dart index 900f047a0..6664c0fb7 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, );