1
This commit is contained in:
parent
0691689152
commit
c045614e31
@ -20,12 +20,13 @@ class LibraryView extends GetView<LibraryController> {
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: MediaQuery.of(context).padding.top),
|
||||
_buildTabBar(),
|
||||
_buildBody(),
|
||||
],
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
_buildTabBar(),
|
||||
_buildBody(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@ -71,10 +71,7 @@ class RecommendView extends GetView<RecommendController> {
|
||||
);
|
||||
},
|
||||
),
|
||||
Container(
|
||||
height: double.infinity,
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top).w,
|
||||
SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
SearchAppbar(
|
||||
@ -148,60 +145,59 @@ class RecommendView extends GetView<RecommendController> {
|
||||
|
||||
Widget _buildMasonryGridView(context) {
|
||||
return Container(
|
||||
height: double.infinity,
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top).w,
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(Assets.imagesRecommendBottomBackground),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
SearchAppbar(
|
||||
onTapToSearch: controller.toSearch,
|
||||
onTapToCategory: controller.homeController.openHomeDrawer,
|
||||
title: appName,
|
||||
titleStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
SearchAppbar(
|
||||
onTapToSearch: controller.toSearch,
|
||||
onTapToCategory: controller.homeController.openHomeDrawer,
|
||||
title: appName,
|
||||
titleStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
Obx(() {
|
||||
return Expanded(
|
||||
child: BaseEasyRefresh(
|
||||
controller: controller.refreshController,
|
||||
onLoad: controller.onLoad,
|
||||
viewState: controller.viewState.value,
|
||||
height: discoverListHeight,
|
||||
child: Scrollbar(
|
||||
controller: controller.scrollController,
|
||||
child: MasonryGridView.count(
|
||||
Obx(() {
|
||||
return Expanded(
|
||||
child: BaseEasyRefresh(
|
||||
controller: controller.refreshController,
|
||||
onLoad: controller.onLoad,
|
||||
viewState: controller.viewState.value,
|
||||
height: discoverListHeight,
|
||||
child: Scrollbar(
|
||||
controller: controller.scrollController,
|
||||
itemCount: controller.images.length,
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 15.w,
|
||||
crossAxisSpacing: 15.w,
|
||||
padding: const EdgeInsets.fromLTRB(15, 0, 15, 0).w,
|
||||
itemBuilder: (context, index) {
|
||||
ImageModel item = controller.images[index];
|
||||
return GestureDetector(
|
||||
onTap: () => controller.gridToImageDetail(index),
|
||||
child: ImageNetworkWidget(
|
||||
url: item.imageUrl,
|
||||
aspectRatio: item.width! / item.height!,
|
||||
radius: 15.r,
|
||||
),
|
||||
);
|
||||
},
|
||||
child: MasonryGridView.count(
|
||||
controller: controller.scrollController,
|
||||
itemCount: controller.images.length,
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 15.w,
|
||||
crossAxisSpacing: 15.w,
|
||||
padding: const EdgeInsets.fromLTRB(15, 0, 15, 0).w,
|
||||
itemBuilder: (context, index) {
|
||||
ImageModel item = controller.images[index];
|
||||
return GestureDetector(
|
||||
onTap: () => controller.gridToImageDetail(index),
|
||||
child: ImageNetworkWidget(
|
||||
url: item.imageUrl,
|
||||
aspectRatio: item.width! / item.height!,
|
||||
radius: 15.r,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
],
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -28,28 +28,27 @@ class SearchImageView extends GetView<SearchImageController> {
|
||||
),
|
||||
child: GetBuilder<SearchImageController>(
|
||||
builder: (controller) => Obx(
|
||||
() => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: MediaQuery.of(context).padding.top,
|
||||
),
|
||||
_buildSearchInput(),
|
||||
if (controller.searchList.isNotEmpty) ...[
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15).w,
|
||||
child: Text(
|
||||
"ALL ${controller.total}",
|
||||
style: TextStyle(color: Colors.white, fontSize: 20.sp),
|
||||
() => SafeArea(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildSearchInput(),
|
||||
if (controller.searchList.isNotEmpty) ...[
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15).w,
|
||||
child: Text(
|
||||
"ALL ${controller.total}",
|
||||
style: TextStyle(color: Colors.white, fontSize: 20.sp),
|
||||
),
|
||||
),
|
||||
),
|
||||
10.verticalSpace,
|
||||
_buildMasonryGridView(),
|
||||
] else ...[
|
||||
Expanded(child: Container()),
|
||||
_buildTags(context),
|
||||
]
|
||||
],
|
||||
10.verticalSpace,
|
||||
_buildMasonryGridView(),
|
||||
] else ...[
|
||||
Expanded(child: Container()),
|
||||
_buildTags(context),
|
||||
]
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -163,9 +162,7 @@ class SearchImageView extends GetView<SearchImageController> {
|
||||
Widget _buildTags(context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.of(context).padding.bottom + 10,
|
||||
),
|
||||
padding: const EdgeInsets.only(bottom: 10).w,
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
|
||||
@ -20,24 +20,24 @@ class SettingsView extends GetView<SettingsController> {
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
top: MediaQuery.of(context).padding.top + 70,
|
||||
).w,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildUserinfo(),
|
||||
Container(
|
||||
height: 1.w,
|
||||
width: double.infinity,
|
||||
margin: const EdgeInsets.symmetric(
|
||||
horizontal: 58,
|
||||
vertical: 15,
|
||||
).w,
|
||||
decoration: BoxDecoration(color: Colors.white.withOpacity(.5)),
|
||||
),
|
||||
_buildOptions(context),
|
||||
],
|
||||
padding: const EdgeInsets.only(top: 70).w,
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildUserinfo(),
|
||||
Container(
|
||||
height: 1.w,
|
||||
width: double.infinity,
|
||||
margin: const EdgeInsets.symmetric(
|
||||
horizontal: 58,
|
||||
vertical: 15,
|
||||
).w,
|
||||
decoration: BoxDecoration(color: Colors.white.withOpacity(.5)),
|
||||
),
|
||||
_buildOptions(context),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user