2022-08-17 21:28:36 +08:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_hbb/consts.dart';
|
|
|
|
import 'package:flutter_hbb/main.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
import 'package:window_manager/window_manager.dart';
|
|
|
|
|
2022-08-22 20:12:05 +08:00
|
|
|
import 'common.dart';
|
2022-08-17 21:28:36 +08:00
|
|
|
import 'desktop/pages/server_page.dart';
|
2022-08-22 20:12:05 +08:00
|
|
|
import 'models/server_model.dart';
|
2022-08-17 21:28:36 +08:00
|
|
|
|
|
|
|
/// -t lib/cm_main.dart to test cm
|
|
|
|
void main(List<String> args) async {
|
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
await windowManager.ensureInitialized();
|
|
|
|
await windowManager.setSize(Size(400, 600));
|
|
|
|
await windowManager.setAlignment(Alignment.topRight);
|
2022-08-23 15:24:04 +08:00
|
|
|
await initEnv(kAppTypeMain);
|
2022-08-22 20:12:05 +08:00
|
|
|
gFFI.serverModel.clients
|
|
|
|
.add(Client(0, false, false, "UserA", "123123123", true, false, false));
|
|
|
|
gFFI.serverModel.clients
|
|
|
|
.add(Client(1, false, false, "UserB", "221123123", true, false, false));
|
|
|
|
gFFI.serverModel.clients
|
|
|
|
.add(Client(2, false, false, "UserC", "331123123", true, false, false));
|
|
|
|
gFFI.serverModel.clients
|
|
|
|
.add(Client(3, false, false, "UserD", "441123123", true, false, false));
|
|
|
|
runApp(GetMaterialApp(
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
theme: getCurrentTheme(),
|
|
|
|
home: DesktopServerPage()));
|
2022-08-17 21:28:36 +08:00
|
|
|
}
|