mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-20 21:43:19 +03:00
fix: flutter remove setState in initState (#8807)
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
@@ -65,7 +65,10 @@ class _PortForwardPageState extends State<PortForwardPage>
|
||||
isRdp: widget.isRDP);
|
||||
Get.put<FFI>(_ffi, tag: 'pf_${widget.id}');
|
||||
debugPrint("Port forward page init success with id ${widget.id}");
|
||||
widget.tabController.onSelected?.call(widget.id);
|
||||
// Call onSelected in post frame callback, since we cannot guarantee that the callback will not call setState.
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
widget.tabController.onSelected?.call(widget.id);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user