mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-08-26 10:16:54 +08:00
upgrade flutter to 3.16.9 (#7099)
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@ -1327,7 +1327,8 @@ class _ResolutionsMenuState extends State<_ResolutionsMenu> {
|
||||
}
|
||||
}
|
||||
|
||||
_onChanged(BuildContext context, String? value) async {
|
||||
// This widget has been unmounted, so the State no longer has a context
|
||||
_onChanged(String? value) async {
|
||||
if (pi.currentDisplay == kAllDisplayValue) {
|
||||
return;
|
||||
}
|
||||
@ -1350,12 +1351,12 @@ class _ResolutionsMenuState extends State<_ResolutionsMenu> {
|
||||
|
||||
if (w != null && h != null) {
|
||||
if (w != rect?.width.toInt() || h != rect?.height.toInt()) {
|
||||
await _changeResolution(context, w, h);
|
||||
await _changeResolution(w, h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_changeResolution(BuildContext context, int w, int h) async {
|
||||
_changeResolution(int w, int h) async {
|
||||
if (pi.currentDisplay == kAllDisplayValue) {
|
||||
return;
|
||||
}
|
||||
@ -1387,8 +1388,8 @@ class _ResolutionsMenuState extends State<_ResolutionsMenu> {
|
||||
return Offstage(
|
||||
offstage: !showOriginalBtn,
|
||||
child: MenuButton(
|
||||
onPressed: () => _changeResolution(
|
||||
context, display.originalWidth, display.originalHeight),
|
||||
onPressed: () =>
|
||||
_changeResolution(display.originalWidth, display.originalHeight),
|
||||
ffi: widget.ffi,
|
||||
child: Text(
|
||||
'${translate('resolution_original_tip')} ${display.originalWidth}x${display.originalHeight}'),
|
||||
@ -1404,7 +1405,7 @@ class _ResolutionsMenuState extends State<_ResolutionsMenu> {
|
||||
onPressed: () {
|
||||
final resolution = _getBestFitResolution();
|
||||
if (resolution != null) {
|
||||
_changeResolution(context, resolution.width, resolution.height);
|
||||
_changeResolution(resolution.width, resolution.height);
|
||||
}
|
||||
},
|
||||
ffi: widget.ffi,
|
||||
@ -1420,7 +1421,7 @@ class _ResolutionsMenuState extends State<_ResolutionsMenu> {
|
||||
child: RdoMenuButton(
|
||||
value: _kCustomResolutionValue,
|
||||
groupValue: _groupValue,
|
||||
onChanged: (String? value) => _onChanged(context, value),
|
||||
onChanged: (String? value) => _onChanged(value),
|
||||
ffi: widget.ffi,
|
||||
child: Row(
|
||||
children: [
|
||||
@ -1461,7 +1462,7 @@ class _ResolutionsMenuState extends State<_ResolutionsMenu> {
|
||||
.map((e) => RdoMenuButton(
|
||||
value: '${e.width}x${e.height}',
|
||||
groupValue: _groupValue,
|
||||
onChanged: (String? value) => _onChanged(context, value),
|
||||
onChanged: (String? value) => _onChanged(value),
|
||||
ffi: widget.ffi,
|
||||
child: Text('${e.width}x${e.height}')))
|
||||
.toList();
|
||||
|
Reference in New Issue
Block a user