Refact. Flutter web, key input (#7511)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2024-03-26 10:45:06 +08:00
committed by GitHub
parent d36e33a7cf
commit e86d4657da
6 changed files with 321 additions and 74 deletions

View File

@@ -295,25 +295,26 @@ class _RemotePageState extends State<RemotePage> {
: Offstage(),
],
)),
body: getRawPointerAndKeyBody(Overlay(
initialEntries: [
OverlayEntry(builder: (context) {
return Container(
body: Obx(
() => getRawPointerAndKeyBody(Overlay(
initialEntries: [
OverlayEntry(builder: (context) {
return Container(
color: Colors.black,
child: isWebDesktop
? getBodyForDesktopWithListener(keyboard)
: SafeArea(child:
OrientationBuilder(builder: (ctx, orientation) {
if (_currentOrientation != orientation) {
Timer(const Duration(milliseconds: 200), () {
gFFI.dialogManager
.resetMobileActionsOverlay(ffi: gFFI);
_currentOrientation = orientation;
gFFI.canvasModel.updateViewStyle();
});
}
return Obx(
() => Container(
: SafeArea(
child:
OrientationBuilder(builder: (ctx, orientation) {
if (_currentOrientation != orientation) {
Timer(const Duration(milliseconds: 200), () {
gFFI.dialogManager
.resetMobileActionsOverlay(ffi: gFFI);
_currentOrientation = orientation;
gFFI.canvasModel.updateViewStyle();
});
}
return Container(
color: MyTheme.canvasColor,
child: inputModel.isPhysicalMouse.value
? getBodyForMobile()
@@ -321,12 +322,14 @@ class _RemotePageState extends State<RemotePage> {
child: getBodyForMobile(),
ffi: gFFI,
),
),
);
})));
})
],
))),
);
}),
),
);
})
],
)),
)),
);
}