This commit is contained in:
xuhang-x 2024-07-23 16:41:58 +08:00
parent 42d5720b58
commit 6cf8ae4d44
5 changed files with 65 additions and 62 deletions

View File

@ -14,6 +14,7 @@ class CategoryView extends GetView<CategoryController> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
body: Container(
decoration: const BoxDecoration(
image: DecorationImage(

View File

@ -21,77 +21,75 @@ class HomeDrawerView extends StatelessWidget {
fit: BoxFit.cover,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(height: MediaQuery.of(context).padding.top + 15.w),
Container(
margin: EdgeInsets.only(left: 16.w),
child: Text(
child: SafeArea(
bottom: false,
child: Column(
children: <Widget>[
Text(
"Style classification",
style: TextStyle(
fontSize: 24.sp,
fontWeight: FontWeight.w600,
color: Colors.white),
),
),
10.verticalSpace,
Expanded(
child: MasonryGridView.count(
itemCount: controller.category.length,
crossAxisCount: 2,
mainAxisSpacing: 10.w,
crossAxisSpacing: 10.w,
padding: EdgeInsets.fromLTRB(
8,
0,
8,
MediaQuery.of(context).padding.bottom + 10,
).w,
itemBuilder: (context, index) {
return GestureDetector(
onTap: () => controller
.toCategory(controller.category[index]),
child: Stack(
alignment: AlignmentDirectional.bottomStart,
children: [
Container(
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.w),
),
child: Image.asset(
controller.categoryImages[index],
),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.w),
color: Colors.black54,
),
padding: const EdgeInsets.symmetric(
horizontal: 9,
).w,
margin: const EdgeInsets.symmetric(
vertical: 9,
horizontal: 9,
).w,
child: Text(
controller.category[index],
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: FontWeight.w600,
10.verticalSpace,
Expanded(
child: MasonryGridView.count(
itemCount: controller.category.length,
crossAxisCount: 2,
mainAxisSpacing: 10.w,
crossAxisSpacing: 10.w,
padding: EdgeInsets.fromLTRB(
8,
0,
8,
MediaQuery.of(context).padding.bottom ,
).w,
itemBuilder: (context, index) {
return GestureDetector(
onTap: () =>
controller.toCategory(controller.category[index]),
child: Stack(
alignment: AlignmentDirectional.bottomStart,
children: [
Container(
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.w),
),
child: Image.asset(
controller.categoryImages[index],
),
),
),
],
),
);
},
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.w),
color: Colors.black54,
),
padding: const EdgeInsets.symmetric(
horizontal: 9,
).w,
margin: const EdgeInsets.symmetric(
vertical: 9,
horizontal: 9,
).w,
child: Text(
controller.category[index],
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: FontWeight.w600,
),
),
),
],
),
);
},
),
),
),
],
],
),
),
),
);

View File

@ -21,6 +21,7 @@ class LibraryView extends GetView<LibraryController> {
),
),
child: SafeArea(
bottom: false,
child: Column(
children: [
_buildTabBar(),

View File

@ -72,6 +72,7 @@ class RecommendView extends GetView<RecommendController> {
},
),
SafeArea(
bottom: false,
child: Column(
children: [
SearchAppbar(
@ -152,6 +153,7 @@ class RecommendView extends GetView<RecommendController> {
),
),
child: SafeArea(
bottom: false,
child: Column(
children: [
SearchAppbar(

View File

@ -29,6 +29,7 @@ class SearchImageView extends GetView<SearchImageController> {
child: GetBuilder<SearchImageController>(
builder: (controller) => Obx(
() => SafeArea(
bottom: false,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [