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';
|
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-11-28 23:57:48 +08:00
|
|
|
bind.mainInitInputSource();
|
|
|
|
stateGlobal.getInputSource(force: 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(
|
2023-02-27 12:01:22 +08:00
|
|
|
// Set transparent background for padding the resize area out of the flutter view.
|
|
|
|
// This allows the wallpaper goes through our resize area. (Linux only now).
|
2024-03-24 11:23:06 +08:00
|
|
|
backgroundColor: isLinux ? Colors.transparent : null,
|
2022-08-11 16:03:04 +08:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|