Skip to content

Commit

Permalink
fix: 详情页可能会出现的灰屏
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaoMint committed Aug 7, 2023
1 parent e18ca5c commit 358a7f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pages/detail/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class _DetailPageState extends State<DetailPage> {
snap: false,
primary: true,
title: DetailAppbarTitle(
c.isLoading.value ? '' : c.detail!.title,
c.detail?.title ?? '',
controller: c.scrollController,
),
flexibleSpace: const DetailAppbarflexibleSpace(),
Expand Down Expand Up @@ -188,7 +188,7 @@ class _DetailPageState extends State<DetailPage> {
);
}

if (c.detail == null) {
if (c.isLoading.value) {
return const Center(
child: ProgressRing(),
);
Expand Down Expand Up @@ -255,7 +255,7 @@ class _DetailPageState extends State<DetailPage> {
constraints: const BoxConstraints(
maxHeight: 100,
),
child: SelectableText(c.detail!.desc!),
child: SelectableText(c.detail!.desc ?? ''),
),
const SizedBox(height: 16),
Row(
Expand Down

0 comments on commit 358a7f4

Please sign in to comment.