WIP: bugfix: calls to Provider.of() inside of a setState(handler) handler require listen:false to avoid recursing #3

Closed
erinn wants to merge 1 commits from showmessages into trunk
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>();