Skip to content

Commit

Permalink
re-enable indicator on init page to aviod dialog helper exception (di…
Browse files Browse the repository at this point in the history
…alog helper need at least one scaffold context in router stack)

(cherry picked from commit 88e1653)
  • Loading branch information
Predidit authored and ErBWs committed Dec 19, 2024
1 parent 2eb8d88 commit 472350d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/pages/init_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,17 @@ class _InitPageState extends State<InitPage> {
KazumiLogger().log(Level.info, '当前设备非宽屏');
}
setting.put(SettingBoxKey.isWideScreen, isWideScreen);
return const RouterOutlet();
return const LoadingWidget();
}
}

class LoadingWidget extends StatelessWidget {
const LoadingWidget({super.key, required this.value});

final double value;
const LoadingWidget({super.key});

@override
Widget build(BuildContext context) {
var size = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(title: const Text("Kazumi")),
body: Center(
child: SizedBox(
height: 200,
Expand All @@ -192,8 +189,7 @@ class LoadingWidget extends StatelessWidget {
children: [
SizedBox(
width: size.width * 0.6,
child: LinearProgressIndicator(
value: value,
child: const LinearProgressIndicator(
backgroundColor: Colors.black12,
minHeight: 10,
),
Expand Down

0 comments on commit 472350d

Please sign in to comment.