flutter_subscreen_plugin 1.0.1 flutter_subscreen_plugin: ^1.0.1 copied to clipboard
The plug-in supports double screen Android device, and uses flutter to draw the main and secondary screens to realize communication and interaction between the two screens
import 'dart:ui';
import 'package:flutter/material.dart';
import 'main_widget.dart';
import 'sub_main_widget.dart';
import 'test_web/web_view_example.dart';
void main() {
var defaultRouteName = window.defaultRouteName;
if ("subMain" == defaultRouteName) {
viceScreenMain();
} else {
defaultMain();
}
}
//主屏ui
void defaultMain() {
// runApp(WebViewExample());
runApp(MainApp());
}
//副屏ui
void viceScreenMain() {
runApp(SubApp());
// runApp(WebViewExample());
}