2022-05-29 17:19:50 +08:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_hbb/common.dart';
|
2022-09-08 21:12:35 +08:00
|
|
|
import 'package:flutter_hbb/desktop/pages/remote_tab_page.dart';
|
2022-12-12 21:46:58 +08:00
|
|
|
import 'package:flutter_hbb/models/platform_model.dart';
|
2022-10-26 14:39:13 +08:00
|
|
|
import 'package:flutter_hbb/desktop/widgets/refresh_wrapper.dart';
|
2023-01-10 14:11:49 +08:00
|
|
|
import 'package:flutter_hbb/models/state_model.dart';
|
2022-05-29 17:19:50 +08:00
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
/// multi-tab desktop remote screen
|
|
|
|
class DesktopRemoteScreen extends StatelessWidget {
|
|
|
|
final Map<String, dynamic> params;
|
|
|
|
|
2022-12-12 21:46:58 +08:00
|
|
|
DesktopRemoteScreen({Key? key, required this.params}) : super(key: key) {
|
2023-01-10 14:11:49 +08:00
|
|
|
if (!bind.mainStartGrabKeyboard()) {
|
|
|
|
stateGlobal.grabKeyboard = true;
|
|
|
|
}
|
2022-12-12 21:46:58 +08:00
|
|
|
}
|
2022-05-29 17:19:50 +08:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return MultiProvider(
|
2022-08-11 16:03:04 +08:00
|
|
|
providers: [
|
|
|
|
ChangeNotifierProvider.value(value: gFFI.ffiModel),
|
|
|
|
ChangeNotifierProvider.value(value: gFFI.imageModel),
|
|
|
|
ChangeNotifierProvider.value(value: gFFI.cursorModel),
|
|
|
|
ChangeNotifierProvider.value(value: gFFI.canvasModel),
|
|
|
|
],
|
|
|
|
child: Scaffold(
|
|
|
|
body: ConnectionTabPage(
|
2022-05-29 17:19:50 +08:00
|
|
|
params: params,
|
|
|
|
),
|
2022-08-11 16:03:04 +08:00
|
|
|
));
|
2022-05-29 17:19:50 +08:00
|
|
|
}
|
|
|
|
}
|