flutter_subscreen_plugin 1.3.2+3 flutter_subscreen_plugin: ^1.3.2+3 copied to clipboard
支持双屏安卓设备,主副屏均使用 flutter 进行开发,提供双屏通信能力
import 'dart:ui';
import 'package:flutter/material.dart';
import 'main_widget.dart';
import 'sub_main_widget.dart';
void main() {
var defaultRouteName = window.defaultRouteName;
if ("subMain" == defaultRouteName) {
viceScreenMain();
} else {
defaultMain();
}
}
//主屏ui
void defaultMain() {
runApp(MaterialApp(home: MainApp(),));
}
//副屏ui
void viceScreenMain() {
runApp(SubApp());
}