imin_vice_screen 1.0.0 copy "imin_vice_screen: ^1.0.0" to clipboard
imin_vice_screen: ^1.0.0 copied to clipboard

PlatformAndroid

flutter plugin for iMin or smart devices with secondary screens

example/lib/main.dart

import 'package:flutter/material.dart';
import 'pages/lcd_home.dart';
import 'pages/main_home.dart';
import 'pages/sub_home.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});
  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool hasSubSreen = false;
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        debugShowCheckedModeBanner: false,
        onGenerateRoute: (RouteSettings routeSettings) {
          return MaterialPageRoute<void>(
              settings: routeSettings,
              builder: (BuildContext context) {
                if (routeSettings.name == 'viceMain') {
                  hasSubSreen = true;
                  switch (routeSettings.name) {
                    case SubHome.routeName:
                    default:
                      return const SubHome();
                  }
                } else {
                  switch (routeSettings.name) {
                    case MainHome.routeName:
                    default:
                      return hasSubSreen ? const MainHome() : const LCDHome();
                  }
                }
              });
        });
  }
}
3
likes
130
points
117
downloads

Publisher

verified publisherimin.sg

Weekly Downloads

flutter plugin for iMin or smart devices with secondary screens

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, logger, plugin_platform_interface

More

Packages that depend on imin_vice_screen

Packages that implement imin_vice_screen