mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-02 18:59:24 +08:00
41 lines
1.4 KiB
Dart
41 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:firebase_analytics/firebase_analytics.dart';
|
|
import 'package:firebase_analytics/observer.dart';
|
|
import 'package:firebase_core/firebase_core.dart';
|
|
import 'model.dart';
|
|
import 'home_page.dart';
|
|
|
|
Future<Null> main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
await Firebase.initializeApp();
|
|
runApp(App());
|
|
}
|
|
|
|
class App extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final analytics = FirebaseAnalytics();
|
|
return ChangeNotifierProvider.value(
|
|
value: FFI.ffiModel,
|
|
child: ChangeNotifierProvider.value(
|
|
value: FFI.imageModel,
|
|
child: ChangeNotifierProvider.value(
|
|
value: FFI.cursorModel,
|
|
child: ChangeNotifierProvider.value(
|
|
value: FFI.canvasModel,
|
|
child: MaterialApp(
|
|
debugShowCheckedModeBanner: false,
|
|
title: 'RustDesk',
|
|
theme: ThemeData(
|
|
primarySwatch: Colors.blue,
|
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
|
),
|
|
home: HomePage(title: 'RustDesk'),
|
|
navigatorObservers: [
|
|
FirebaseAnalyticsObserver(analytics: analytics),
|
|
],
|
|
)))));
|
|
}
|
|
}
|