File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ import 'package:server_box/view/page/home.dart';
1212
1313part 'intro.dart' ;
1414
15+ Widget _buildHomeWithWindowFrame () {
16+ return VirtualWindowFrame (title: BuildData .name, child: const HomePage ());
17+ }
18+
1519class MyApp extends StatefulWidget {
1620 const MyApp ({super .key});
1721
@@ -136,17 +140,20 @@ class _MyAppState extends State<MyApp> {
136140 if (appL10n != null ) l10n = appL10n;
137141
138142 Widget child;
143+ var hasWindowFrame = false ;
139144 if (snapshot.connectionState == ConnectionState .waiting) {
140145 child = const Scaffold (body: Center (child: CircularProgressIndicator ()));
141146 } else {
142147 final intros = snapshot.data ?? [];
143148 if (intros.isNotEmpty) {
144149 child = _IntroPage (intros);
145150 } else {
146- child = const HomePage ();
151+ child = _buildHomeWithWindowFrame ();
152+ hasWindowFrame = true ;
147153 }
148154 }
149155
156+ if (hasWindowFrame) return child;
150157 return VirtualWindowFrame (title: BuildData .name, child: child);
151158 },
152159 ),
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ final class _IntroPage extends StatelessWidget {
1818 pages: pages_,
1919 onDone: (ctx) {
2020 Stores .setting.introVer.put (BuildData .build);
21- Navigator .of (ctx).pushReplacement (MaterialPageRoute (builder: (_) => const HomePage ()));
21+ Navigator .of (ctx).pushReplacement (MaterialPageRoute (builder: (_) => _buildHomeWithWindowFrame ()));
2222 },
2323 ),
2424 );
You can’t perform that action at this time.
0 commit comments