Skip to content

Commit e3df0d5

Browse files
committed
Fix bug with no internet icon on tail blog
1 parent 0467135 commit e3df0d5

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

lib/Frontend/Widgets/tail_blog.dart

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import '../../constants.dart';
1616
import '../utils.dart';
1717

1818
part 'tail_blog.freezed.dart';
19-
2019
part 'tail_blog.g.dart';
2120

2221
final _wpLogger = Logger('Main');
@@ -43,15 +42,17 @@ class _TailBlogState extends State<TailBlog> {
4342
alignment: Alignment.topCenter,
4443
firstChild: feedState == FeedState.loading
4544
? const LinearProgressIndicator()
46-
: const Center(
47-
child: Opacity(
48-
opacity: 0.5,
49-
child: Icon(
50-
Icons.signal_cellular_connected_no_internet_0_bar,
51-
size: 150,
52-
),
53-
),
54-
),
45+
: [FeedState.noInternet, FeedState.error].contains(feedState)
46+
? const Center(
47+
child: Opacity(
48+
opacity: 0.5,
49+
child: Icon(
50+
Icons.signal_cellular_connected_no_internet_0_bar,
51+
size: 150,
52+
),
53+
),
54+
)
55+
: Container(),
5556
secondChild: GridView.builder(
5657
controller: widget.controller,
5758
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(maxCrossAxisExtent: 500, mainAxisExtent: 300),

0 commit comments

Comments
 (0)