HomePage: Call super.initiate() first
This commit is contained in:
parent
010c32ecf7
commit
39d415bab6
1 changed files with 7 additions and 2 deletions
|
@ -54,6 +54,7 @@ class _HomePageState extends State<HomePage> {
|
|||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_textController.addListener(_applyFilteringAndRefresh);
|
||||
_loadCodes();
|
||||
_streamSubscription = Bus.instance.on<CodesUpdatedEvent>().listen((event) {
|
||||
|
@ -64,7 +65,7 @@ class _HomePageState extends State<HomePage> {
|
|||
await autoLogoutAlert(context);
|
||||
});
|
||||
_initDeepLinks();
|
||||
super.initState();
|
||||
|
||||
}
|
||||
|
||||
void _loadCodes() {
|
||||
|
@ -222,7 +223,11 @@ class _HomePageState extends State<HomePage> {
|
|||
} 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,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue