From 7f9621a986a73f049cf82a79d66215edb177b531 Mon Sep 17 00:00:00 2001 From: erinn Date: Mon, 11 Jan 2021 18:57:29 -0800 Subject: [PATCH] bug: calls to Provider.of() inside of a setState(handler) handler require listen:false to avoid recursing --- lib/views/profilemgrview.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/views/profilemgrview.dart b/lib/views/profilemgrview.dart index 64c86de..06b469b 100644 --- a/lib/views/profilemgrview.dart +++ b/lib/views/profilemgrview.dart @@ -84,7 +84,7 @@ class _ProfileMgrViewState extends State { subtitle: Text(profile.onion), onTap: () { setState(() { - var selectProfileC = Provider.of(context).library.lookup>("SelectProfile"); + var selectProfileC = Provider.of(context, listen: false).library.lookup>("SelectProfile"); // ignore: non_constant_identifier_names final SelectProfile = selectProfileC.asFunction();