Skip to content

Commit

Permalink
fix: Android 首页空内容占位符不居中
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaoMint committed Jul 7, 2023
1 parent fc9264a commit 3d7ab33
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions lib/pages/home/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,22 @@ class _HomePageState extends State<HomePage> {
child: Obx(
() {
if (c.resents.isEmpty && c.favorites.isEmpty) {
return const Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 200),
Image(
image: AssetImage("assets/icon/logo.png"),
width: 100,
),
SizedBox(height: 16),
Text(
"暂无收藏和观看记录",
),
],
return const Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 200),
Image(
image: AssetImage("assets/icon/logo.png"),
width: 100,
),
SizedBox(height: 16),
Text(
"暂无收藏和观看记录",
),
],
),
);
}

Expand Down

0 comments on commit 3d7ab33

Please sign in to comment.