2022-05-29 17:19:50 +08:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_hbb/common.dart';
|
|
|
|
import 'package:flutter_hbb/desktop/pages/connection_tab_page.dart';
|
|
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
/// multi-tab desktop remote screen
|
|
|
|
class DesktopRemoteScreen extends StatelessWidget {
|
|
|
|
final Map<String, dynamic> params;
|
|
|
|
|
|
|
|
const DesktopRemoteScreen({Key? key, required this.params}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return MultiProvider(
|
|
|
|
providers: [
|
2022-06-13 21:07:26 +08:00
|
|
|
ChangeNotifierProvider.value(value: gFFI.ffiModel),
|
|
|
|
ChangeNotifierProvider.value(value: gFFI.imageModel),
|
|
|
|
ChangeNotifierProvider.value(value: gFFI.cursorModel),
|
|
|
|
ChangeNotifierProvider.value(value: gFFI.canvasModel),
|
2022-05-29 17:19:50 +08:00
|
|
|
],
|
|
|
|
child: MaterialApp(
|
|
|
|
navigatorKey: globalKey,
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
title: 'RustDesk - Remote Desktop',
|
|
|
|
theme: ThemeData(
|
|
|
|
primarySwatch: Colors.blue,
|
|
|
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
|
|
|
),
|
|
|
|
home: ConnectionTabPage(
|
|
|
|
params: params,
|
|
|
|
),
|
|
|
|
navigatorObservers: [
|
|
|
|
// FirebaseAnalyticsObserver(analytics: analytics),
|
|
|
|
FlutterSmartDialog.observer
|
|
|
|
],
|
|
|
|
builder: FlutterSmartDialog.init(
|
|
|
|
builder: isAndroid
|
|
|
|
? (_, child) => AccessibilityListener(
|
|
|
|
child: child,
|
|
|
|
)
|
|
|
|
: null)),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|