From 7b77d75a4ca5bf977aeff11776526ada16292e63 Mon Sep 17 00:00:00 2001 From: bluesea <307723040@qq.com> Date: Mon, 13 May 2024 15:56:10 +0800 Subject: [PATCH] s --- .../lib/pages/homepage/homepage_view.dart | 36 ++++++------- .../imgcategorypage/imgcategorypage_view.dart | 54 +++++++++++-------- 2 files changed, 50 insertions(+), 40 deletions(-) diff --git a/wallpaper/lib/pages/homepage/homepage_view.dart b/wallpaper/lib/pages/homepage/homepage_view.dart index 7a1ecdc..f8909b3 100644 --- a/wallpaper/lib/pages/homepage/homepage_view.dart +++ b/wallpaper/lib/pages/homepage/homepage_view.dart @@ -64,27 +64,27 @@ class HomePageView extends GetView { Material( color: Colors.transparent, child: InkWell( - onTap: () { - Get.to(ImgCategoryPageView(stitle: title,dataModel: controller.typeList[index])); - }, - child: Align( - alignment: Alignment.bottomCenter, - child: Container( - color: Colors.black.withAlpha(160), - height: 30, - width: double.infinity, - child: Align( - alignment: Alignment.center, - child: Text( - title, - style: const TextStyle( - color: Colors.white - ), + onTap: () { + Get.to(ImgCategoryPageView(stitle: title,dataModel: controller.typeList[index])); + }, + child: Align( + alignment: Alignment.bottomCenter, + child: Container( + color: Colors.black.withAlpha(160), + height: 30, + width: double.infinity, + child: Align( + alignment: Alignment.center, + child: Text( + title, + style: const TextStyle( + color: Colors.white + ), + ), ), + ), ), - ), - ), ), ), ], diff --git a/wallpaper/lib/pages/imgcategorypage/imgcategorypage_view.dart b/wallpaper/lib/pages/imgcategorypage/imgcategorypage_view.dart index 345d4bd..5bc1b6c 100644 --- a/wallpaper/lib/pages/imgcategorypage/imgcategorypage_view.dart +++ b/wallpaper/lib/pages/imgcategorypage/imgcategorypage_view.dart @@ -52,30 +52,40 @@ class ImgCategoryPageView extends GetView { fit: BoxFit.cover, ), - Align( - alignment: Alignment.bottomCenter, - child: Container( - color: Colors.black.withAlpha(160), - height: 40, - width: double.infinity, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - // 交叉轴的布局方式,对于column来说就是水平方向的布局方式 - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - IconButton(onPressed:() { - print("download...."); + Material( + color: Colors.transparent, + child: InkWell( + onTap: () { + print("查看大图..."); + // Get.to(ImgCategoryPageView(stitle: title,dataModel: controller.typeList[index])); + }, + child: Align( + alignment: Alignment.bottomCenter, + child: Container( + color: Colors.black.withAlpha(160), + height: 40, + width: double.infinity, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + // 交叉轴的布局方式,对于column来说就是水平方向的布局方式 + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + IconButton(onPressed:() { + print("download...."); - }, icon: Icon(Icons.download),color: Colors.white,), - IconButton(onPressed:() { - print("设置壁纸"); + }, icon: Icon(Icons.download),color: Colors.white,), + IconButton(onPressed:() { + print("设置壁纸"); - }, icon: Icon(Icons.wallpaper),color: Colors.white,), - ], - ), - ), - ) + }, icon: Icon(Icons.wallpaper),color: Colors.white,), + ], + ), + ), + ), + ), + ), + ], ); }