Browse Source

Merge pull request #72 from jld3103/fix/news-article-loading

neon: Fix news article loading
pull/73/head
jld3103 2 years ago committed by GitHub
parent
commit
f59f4ce7f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      packages/neon/lib/src/apps/news/pages/article.dart

17
packages/neon/lib/src/apps/news/pages/article.dart

@ -141,6 +141,7 @@ class _NewsArticlePageState extends State<NewsArticlePage> {
body: widget.useWebView
? Stack(
alignment: Alignment.center,
fit: StackFit.expand,
children: [
WebView(
javascriptMode: JavascriptMode.unrestricted,
@ -161,15 +162,13 @@ class _NewsArticlePageState extends State<NewsArticlePage> {
},
),
if (_webviewLoading) ...[
Expanded(
child: ColoredBox(
color: Theme.of(context).colorScheme.background,
child: Center(
child: LayoutBuilder(
builder: (final context, final constraints) => SizedBox(
width: constraints.maxWidth / 2,
child: const CustomLinearProgressIndicator(),
),
ColoredBox(
color: Theme.of(context).colorScheme.background,
child: Center(
child: LayoutBuilder(
builder: (final context, final constraints) => SizedBox(
width: constraints.maxWidth / 2,
child: const CustomLinearProgressIndicator(),
),
),
),

Loading…
Cancel
Save