bug: calls to Provider.of() inside of a setState(handler) handler require listen:false to avoid recursing

This commit is contained in:
erinn 2021-01-11 18:57:29 -08:00
parent 5394482967
commit 7f9621a986
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
subtitle: Text(profile.onion),
onTap: () {
setState(() {
var selectProfileC = Provider.of<FlwtchState>(context).library.lookup<NativeFunction<get_json_blob_string_function>>("SelectProfile");
var selectProfileC = Provider.of<FlwtchState>(context, listen: false).library.lookup<NativeFunction<get_json_blob_string_function>>("SelectProfile");
// ignore: non_constant_identifier_names
final SelectProfile = selectProfileC.asFunction<GetJsonBlobStringFn>();