fixed black background flashing before showing content on launch

This commit is contained in:
Thibault Deckers 2020-07-12 21:50:25 +09:00
parent 760ee681d2
commit 1e7c682bee
2 changed files with 2 additions and 2 deletions

View file

@ -62,7 +62,7 @@ class _AvesAppState extends State<AvesApp> {
future: _appSetup, future: _appSetup,
builder: (context, AsyncSnapshot<void> snapshot) { builder: (context, AsyncSnapshot<void> snapshot) {
if (snapshot.hasError) return const Icon(AIcons.error); if (snapshot.hasError) return const Icon(AIcons.error);
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink(); if (snapshot.connectionState != ConnectionState.done) return const Scaffold();
return settings.hasAcceptedTerms ? const HomePage() : const WelcomePage(); return settings.hasAcceptedTerms ? const HomePage() : const WelcomePage();
}, },
), ),

View file

@ -96,7 +96,7 @@ class _HomePageState extends State<HomePage> {
future: _appSetup, future: _appSetup,
builder: (context, AsyncSnapshot<void> snapshot) { builder: (context, AsyncSnapshot<void> snapshot) {
if (snapshot.hasError) return const Icon(AIcons.error); if (snapshot.hasError) return const Icon(AIcons.error);
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink(); if (snapshot.connectionState != ConnectionState.done) return const Scaffold();
if (AvesApp.mode == AppMode.view) { if (AvesApp.mode == AppMode.view) {
return SingleFullscreenPage(entry: _viewerEntry); return SingleFullscreenPage(entry: _viewerEntry);
} }