Bladeren bron

hide build and test module for deploy system

arthur.wu 1 jaar geleden
bovenliggende
commit
f5edbd6ce2
1 gewijzigde bestanden met toevoegingen van 72 en 94 verwijderingen
  1. 72 94
      Tools/Flyinsono.Deployment/lib/MainScreen.dart

+ 72 - 94
Tools/Flyinsono.Deployment/lib/MainScreen.dart

@@ -53,12 +53,10 @@ class _MainScreenState extends State<MainScreen> with RestorationMixin {
   Widget build(BuildContext context) {
     print("build MainScreen");
     final selectedItem = <Widget>[
-      BuildView(),
       PackageView(),
       PublishView(),
-      AutoTestView(),
-      MyView(),
       OperatorListView(),
+      MyView(),
     ]; //DOTo
     return Scaffold(
       appBar: AppBar(
@@ -66,97 +64,77 @@ class _MainScreenState extends State<MainScreen> with RestorationMixin {
           AppLocalizations.of(context)!.deploySystem,
         ),
       ),
-      body: PlatformUtils.isWindows?PublishProcessView(): Row(
-        children: [
-          NavigationRail(
-            selectedIndex: _selectedIndex.value,
-            onDestinationSelected: (index) {
-              setState(() {
-                var oldIndex = _selectedIndex.value;
-                print('oldIndex:$oldIndex =>index:$index');
-                _selectedIndex.value = index;
-              });
-            },
-            labelType: NavigationRailLabelType.all,
-            destinations: [
-              NavigationRailDestination(
-                icon: const Icon(
-                  Icons.build_outlined,
-                ),
-                selectedIcon: const Icon(
-                  Icons.build_rounded,
-                ),
-                label: Text(
-                  AppLocalizations.of(context)!.build,
-                ),
-              ),
-              NavigationRailDestination(
-                icon: const Icon(
-                  Icons.badge_outlined,
-                ),
-                selectedIcon: const Icon(
-                  Icons.badge_rounded,
-                ),
-                label: Text(
-                  AppLocalizations.of(context)!.package,
-                ),
-              ),
-              NavigationRailDestination(
-                icon: const Icon(
-                  Icons.publish_outlined,
-                ),
-                selectedIcon: const Icon(
-                  Icons.publish_rounded,
-                ),
-                label: Text(
-                  AppLocalizations.of(context)!.publish,
-                ),
-              ),
-              NavigationRailDestination(
-                icon: const Icon(
-                  Icons.list_outlined,
-                ),
-                selectedIcon: const Icon(
-                  Icons.list_alt_rounded,
-                ),
-                label: Text(
-                  AppLocalizations.of(context)!.autoTest,
-                ),
-              ),
-              NavigationRailDestination(
-                icon: const Icon(
-                  Icons.account_circle_outlined,
-                ),
-                selectedIcon: const Icon(
-                  Icons.account_circle_rounded,
-                ),
-                label: Text(
-                  "My",
-                ),
-              ),
-              NavigationRailDestination(
-                icon: const Icon(
-                  Icons.list_outlined,
-                ),
-                selectedIcon: const Icon(
-                  Icons.list_alt_rounded,
-                ),
-                label: Text(
-                  AppLocalizations.of(context)!.operatorList,
-                ),
-              ),
-            ],
-          ),
-          const VerticalDivider(thickness: 1, width: 1),
-          Expanded(
-            child: Padding(
-                padding: EdgeInsets.all(16.0),
-                child: Center(
-                  child: selectedItem[_selectedIndex.value],
-                )),
-          ),
-        ],
-      ),
+      body: PlatformUtils.isWindows
+          ? PublishProcessView()
+          : Row(
+              children: [
+                NavigationRail(
+                  selectedIndex: _selectedIndex.value,
+                  onDestinationSelected: (index) {
+                    setState(() {
+                      var oldIndex = _selectedIndex.value;
+                      print('oldIndex:$oldIndex =>index:$index');
+                      _selectedIndex.value = index;
+                    });
+                  },
+                  labelType: NavigationRailLabelType.all,
+                  destinations: [
+                    NavigationRailDestination(
+                      icon: const Icon(
+                        Icons.badge_outlined,
+                      ),
+                      selectedIcon: const Icon(
+                        Icons.badge_rounded,
+                      ),
+                      label: Text(
+                        AppLocalizations.of(context)!.package,
+                      ),
+                    ),
+                    NavigationRailDestination(
+                      icon: const Icon(
+                        Icons.publish_outlined,
+                      ),
+                      selectedIcon: const Icon(
+                        Icons.publish_rounded,
+                      ),
+                      label: Text(
+                        AppLocalizations.of(context)!.publish,
+                      ),
+                    ),
+                    NavigationRailDestination(
+                      icon: const Icon(
+                        Icons.list_outlined,
+                      ),
+                      selectedIcon: const Icon(
+                        Icons.list_alt_rounded,
+                      ),
+                      label: Text(
+                        AppLocalizations.of(context)!.operatorList,
+                      ),
+                    ),
+                    NavigationRailDestination(
+                      icon: const Icon(
+                        Icons.account_circle_outlined,
+                      ),
+                      selectedIcon: const Icon(
+                        Icons.account_circle_rounded,
+                      ),
+                      label: Text(
+                        "My",
+                      ),
+                    ),
+                  ],
+                ),
+                const VerticalDivider(thickness: 1, width: 1),
+                Expanded(
+                  child: Padding(
+                      padding: EdgeInsets.all(16.0),
+                      child: Center(
+                        child: selectedItem[_selectedIndex.value],
+                      )),
+                ),
+              ],
+            ),
     );
   }
 }