1
This commit is contained in:
parent
2975e10bb4
commit
35736fe025
@ -1,6 +1,6 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
|
||||
class ImageNetworkWidget extends StatelessWidget {
|
||||
const ImageNetworkWidget({
|
||||
|
||||
@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:wallpaperx/applovin_max/applovin_manage.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/res/themes/app_colors.dart';
|
||||
|
||||
class BaseAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
@ -44,7 +44,7 @@ class BaseAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10).w,
|
||||
child: Image.asset(
|
||||
Assets.backIcon,
|
||||
Assets.imagesBackIcon,
|
||||
width: 32.w,
|
||||
height: 32.w,
|
||||
color: Colors.white,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
|
||||
class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
const SearchAppbar({
|
||||
@ -34,7 +34,7 @@ class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
onTap: onTapToCategory,
|
||||
child: Image.asset(
|
||||
width: iconWitch ?? 32.w,
|
||||
groupIcon ?? Assets.discoverGroup,
|
||||
groupIcon ?? Assets.imagesDiscoverGroup,
|
||||
),
|
||||
),
|
||||
title == null
|
||||
@ -49,7 +49,7 @@ class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
right: 0,
|
||||
child: Image.asset(
|
||||
width: 30.w,
|
||||
Assets.genieAiBackground1,
|
||||
Assets.imagesGenieAiBackground1,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
@ -57,7 +57,7 @@ class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
right: -8.w,
|
||||
child: Image.asset(
|
||||
width: 8.w,
|
||||
Assets.genieAiBackground2,
|
||||
Assets.imagesGenieAiBackground2,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
@ -76,7 +76,7 @@ class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
10.horizontalSpace,
|
||||
Image.asset(
|
||||
width: 24.w,
|
||||
Assets.discoverDown,
|
||||
Assets.imagesDiscoverDown,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -84,7 +84,7 @@ class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
onTap: onTapToSearch,
|
||||
child: Image.asset(
|
||||
width: iconWitch ?? 32.w,
|
||||
searchIcon ?? Assets.discoverSearch,
|
||||
searchIcon ?? Assets.imagesDiscoverSearch,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:loading_animation_widget/loading_animation_widget.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
|
||||
/// 四种视图状态
|
||||
enum ViewState { normal, error, loading, empty }
|
||||
@ -65,7 +65,7 @@ Widget get emptyView {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
Assets.noDataAvailable,
|
||||
Assets.imagesNoDataAvailable,
|
||||
width: 120.w,
|
||||
color: const Color(0xFF666666),
|
||||
gaplessPlayback: true,
|
||||
@ -112,7 +112,7 @@ Widget get errorViewV1 {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
Assets.errorLoading,
|
||||
Assets.imagesErrorLoading,
|
||||
width: 120.w,
|
||||
color: const Color(0xFF666666),
|
||||
gaplessPlayback: true,
|
||||
|
||||
@ -1,57 +0,0 @@
|
||||
///This file is automatically generated. DO NOT EDIT, all your changes would be lost.
|
||||
class Assets {
|
||||
Assets._();
|
||||
|
||||
static const String iconIconApp = 'assets/icon/icon_app.png';
|
||||
static const String imagesCatalogSelected = 'assets/images/catalog_selected.png';
|
||||
static const String imagesCatalogUnchecked = 'assets/images/catalog_unchecked.png';
|
||||
static const String imagesDiscoverSelected = 'assets/images/discover_selected.png';
|
||||
static const String imagesDiscoverUnchecked = 'assets/images/discover_unchecked.png';
|
||||
static const String imagesFavoriteSelected = 'assets/images/favorite_selected.png';
|
||||
static const String imagesFavoriteUnchecked = 'assets/images/favorite_unchecked.png';
|
||||
static const String imagesIcBack = 'assets/images/ic_back.png';
|
||||
static const String imagesIcDownload = 'assets/images/ic_download.png';
|
||||
static const String imagesIcFavorite = 'assets/images/ic_favorite.png';
|
||||
static const String imagesIcUnFavorite = 'assets/images/ic_un_favorite.png';
|
||||
static const String imagesIcInfo = 'assets/images/ic_img_info.png';
|
||||
static const String imagesIcDelBack = 'assets/images/ic_img_del_back.png';
|
||||
static const String imagesIcFiltered = 'assets/images/ic_filtered.png';
|
||||
static const String imagesIcPreview = 'assets/images/ic_preview.png';
|
||||
static const String imagesIcSettingArrow = 'assets/images/ic_setting_arrow.png';
|
||||
static const String imagesIcSettings = 'assets/images/ic_settings.png';
|
||||
static const String imagesIcTip = 'assets/images/ic_img_del_tip.png';
|
||||
static const String imagesImgError = 'assets/images/img_error.png';
|
||||
static const String imagesImgPlaceholder = 'assets/images/img_placeholder.png';
|
||||
static const String jsonLuxWallpaper = 'assets/json/lux_wallpaper.json';
|
||||
static const String settingSelected = 'assets/images/setting_selected.png';
|
||||
static const String settingUnchecked = 'assets/images/setting_unchecked.png';
|
||||
static const String noDataAvailable = 'assets/images/no_data_available.png';
|
||||
static const String errorLoading = 'assets/images/error_loading.png';
|
||||
static const String viewMore = 'assets/images/view_more.png';
|
||||
static const String putItAway = 'assets/images/put_it_away.png';
|
||||
static const String homeBackground = 'assets/images/home_background.png';
|
||||
static const String discoverBackground = 'assets/images/discover_background.png';
|
||||
static const String discoverGroup = 'assets/images/discover_group.png';
|
||||
static const String discoverSearch = 'assets/images/discover_search.png';
|
||||
static const String discoverUp = 'assets/images/discover_up.png';
|
||||
static const String discoverDown = 'assets/images/discover_down.png';
|
||||
static const String searchIcon = 'assets/images/search_icon.png';
|
||||
static const String searchTop = 'assets/images/search_top.png';
|
||||
static const String searchBottomRight = 'assets/images/search_bottom_right.png';
|
||||
static const String searchBottom = 'assets/images/search_bottom.png';
|
||||
static const String searchLongRight = 'assets/images/search_long_right.png';
|
||||
static const String backIcon = 'assets/images/back_icon.png';
|
||||
static const String settingBackground = 'assets/images/setting_background.png';
|
||||
static const String selectedIcon = 'assets/images/selected_icon.png';
|
||||
static const String placeholder = 'assets/images/placeholder.png';
|
||||
static const String genieAiBackground1 = 'assets/images/genie_ai_background1.png';
|
||||
static const String genieAiBackground2 = 'assets/images/genie_ai_background2.png';
|
||||
static const String icCfgScale = 'assets/images/ic_cfg_scale.png';
|
||||
static const String icSeed = 'assets/images/ic_seed.png';
|
||||
static const String icSteps = 'assets/images/ic_steps.png';
|
||||
static const String icSampler = 'assets/images/ic_sampler.png';
|
||||
static const String startS = 'assets/images/stars_s.png';
|
||||
static const String startM = 'assets/images/stars_m.png';
|
||||
static const String startL = 'assets/images/stars_l.png';
|
||||
|
||||
}
|
||||
@ -50,7 +50,7 @@ class Assets {
|
||||
static const String imagesImgError = 'assets/images/img_error.png';
|
||||
static const String imagesImgPlaceholder = 'assets/images/img_placeholder.png';
|
||||
static const String imagesNoDataAvailable = 'assets/images/no_data_available.png';
|
||||
static const String imagesPlaceholder = 'assets/images/placeholder.jpg';
|
||||
static const String imagesPlaceholder = 'assets/images/placeholder.png';
|
||||
static const String imagesPutItAway = 'assets/images/put_it_away.png';
|
||||
static const String imagesSearchBottom = 'assets/images/search_bottom.png';
|
||||
static const String imagesSearchBottomRight = 'assets/images/search_bottom_right.png';
|
||||
|
||||
@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:wallpaperx/common/components/navigation_bar/base_appbar.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/page/about/about_controller.dart';
|
||||
import 'package:wallpaperx/res/values/strings.dart';
|
||||
|
||||
@ -34,11 +34,11 @@ class AboutView extends GetView<AboutController> {
|
||||
),
|
||||
child: Image.asset(
|
||||
Assets.iconIconApp,
|
||||
width: 110.w,
|
||||
height: 110.w,
|
||||
width: 100.w,
|
||||
height: 100.w,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.h),
|
||||
20.verticalSpace,
|
||||
Obx(() {
|
||||
return RichText(
|
||||
maxLines: 2,
|
||||
@ -57,7 +57,6 @@ class AboutView extends GetView<AboutController> {
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@ -15,21 +15,20 @@ class AiSettingView extends GetView<AiSettingController> {
|
||||
appBar: BaseAppBar(
|
||||
appName,
|
||||
backgroundColor: Colors.black,
|
||||
titleStyle: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
titleStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24.sp,
|
||||
),
|
||||
),
|
||||
body: Container(
|
||||
padding: const EdgeInsets.all(15).w,
|
||||
child: Obx(
|
||||
() => Column(
|
||||
children: [
|
||||
const Text(
|
||||
"Label",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
_buildSettingLabel(),
|
||||
10.verticalSpace,
|
||||
15.verticalSpace,
|
||||
_buildLabelOption(),
|
||||
10.verticalSpace,
|
||||
15.verticalSpace,
|
||||
_buildApply(),
|
||||
],
|
||||
),
|
||||
@ -55,7 +54,7 @@ class AiSettingView extends GetView<AiSettingController> {
|
||||
children: controller.labelSettingList
|
||||
.map((e) => labelSettingItem(e))
|
||||
.toList(),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -65,7 +64,10 @@ class AiSettingView extends GetView<AiSettingController> {
|
||||
return GestureDetector(
|
||||
onTap: () => controller.removeLabel(label),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 8).w,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 5,
|
||||
horizontal: 8,
|
||||
).w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(50).r,
|
||||
border: Border.all(color: Colors.grey),
|
||||
@ -104,7 +106,7 @@ class AiSettingView extends GetView<AiSettingController> {
|
||||
children: controller.labelOptionList
|
||||
.map((e) => labelOptionItem(e))
|
||||
.toList(),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -115,46 +117,51 @@ class AiSettingView extends GetView<AiSettingController> {
|
||||
onTap: () => controller.addLabel(label),
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(right: 3.w),
|
||||
padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 8).w,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 5,
|
||||
horizontal: 8,
|
||||
).w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(50).r,
|
||||
border: Border.all(color: Colors.grey),
|
||||
),
|
||||
child: Text(
|
||||
label,
|
||||
style: TextStyle(color: Colors.white),
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildApply() {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: controller.setLabelSetting,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.w, horizontal: 15.w),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20).r, color: Colors.white),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Apply",
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.black87,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
return GestureDetector(
|
||||
onTap: controller.setLabelSetting,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.w,
|
||||
horizontal: 15.w,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(50).r,
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Apply",
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.black87,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ class CategoryView extends GetView<CategoryController> {
|
||||
return _buildCatalogItem(keys[index], imageModels);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return SizedBox(height: 24.h);
|
||||
return SizedBox(height: 20.h);
|
||||
},
|
||||
),
|
||||
),
|
||||
@ -72,7 +72,7 @@ class CategoryView extends GetView<CategoryController> {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 20.sp,
|
||||
fontSize: 18.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -86,30 +86,37 @@ class CategoryView extends GetView<CategoryController> {
|
||||
'More',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
),
|
||||
Icon(Icons.keyboard_arrow_right,
|
||||
color: Colors.white, size: 18.w),
|
||||
Icon(
|
||||
Icons.keyboard_arrow_right,
|
||||
color: Colors.white,
|
||||
size: 12.w,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
SizedBox(height: 7.h),
|
||||
10.verticalSpace,
|
||||
SizedBox(
|
||||
height: 233.h,
|
||||
height: 200.h,
|
||||
child: ListView.separated(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
scrollDirection: Axis.horizontal,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16).w,
|
||||
itemCount: imageModels.length,
|
||||
itemBuilder: (context, index) {
|
||||
return _buildImgWidget(imageModels[index], imageModels, index);
|
||||
return _buildImgWidget(
|
||||
imageModels[index],
|
||||
imageModels,
|
||||
index,
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return SizedBox(width: 8.w);
|
||||
return SizedBox(width: 10.w);
|
||||
},
|
||||
),
|
||||
),
|
||||
@ -118,7 +125,10 @@ class CategoryView extends GetView<CategoryController> {
|
||||
}
|
||||
|
||||
Widget _buildImgWidget(
|
||||
ImageModel item, List<ImageModel> wallpaperList, int index) {
|
||||
ImageModel item,
|
||||
List<ImageModel> wallpaperList,
|
||||
int index,
|
||||
) {
|
||||
return GestureDetector(
|
||||
onTap: () => controller.onTapItem(wallpaperList, index),
|
||||
child: KeepAliveWrapper(
|
||||
@ -127,7 +137,7 @@ class CategoryView extends GetView<CategoryController> {
|
||||
width: 126.w,
|
||||
height: double.infinity,
|
||||
aspectRatio: 126 / 180,
|
||||
radius: 12.r,
|
||||
radius: 15.r,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@ -22,7 +22,7 @@ class ClsDetView extends GetView<ClsDetController> {
|
||||
titleStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
body: Obx(
|
||||
@ -33,7 +33,7 @@ class ClsDetView extends GetView<ClsDetController> {
|
||||
itemCount: controller.wallpaperList.length,
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 20.w,
|
||||
crossAxisSpacing: 21.w,
|
||||
crossAxisSpacing: 20.w,
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16,
|
||||
32,
|
||||
|
||||
@ -12,7 +12,7 @@ import 'package:wallpaperx/common/components/navigation_bar/search_appbar.dart';
|
||||
import 'package:wallpaperx/common/components/refresh/base_easyrefresh.dart';
|
||||
import 'package:wallpaperx/common/components/view_state_widget.dart';
|
||||
import 'package:wallpaperx/entity/image_model.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/page/discover/discover_controller.dart';
|
||||
import 'package:wallpaperx/res/themes/app_sizes.dart';
|
||||
import 'package:wallpaperx/res/values/strings.dart';
|
||||
@ -38,7 +38,43 @@ class DiscoverView extends GetView<DiscoverController> {
|
||||
Widget _buildPhotoView(context) {
|
||||
return Stack(
|
||||
children: [
|
||||
_buildBackground(),
|
||||
GetBuilder<DiscoverController>(
|
||||
id: 'discover_background',
|
||||
builder: (logic) {
|
||||
return Container(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.black87,
|
||||
),
|
||||
child: ImageFiltered(
|
||||
imageFilter: ImageFilter.blur(
|
||||
sigmaX: 50,
|
||||
sigmaY: 50,
|
||||
tileMode: TileMode.decal,
|
||||
),
|
||||
child: controller.banners.isEmpty
|
||||
? Image.asset(
|
||||
Assets.imagesHomeBackground,
|
||||
)
|
||||
: PhotoView(
|
||||
enableRotation: false,
|
||||
imageProvider: CachedNetworkImageProvider(controller
|
||||
.banners[controller.index.value].imageUrl),
|
||||
initialScale: PhotoViewComputedScale.covered,
|
||||
minScale: PhotoViewComputedScale.contained * 0.5,
|
||||
maxScale: PhotoViewComputedScale.covered * 3,
|
||||
loadingBuilder: (context, event) =>
|
||||
loadingViewV1(color: Colors.white),
|
||||
errorBuilder: (BuildContext context, Object error,
|
||||
StackTrace? stackTrace) =>
|
||||
errorView,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Container(
|
||||
height: double.infinity,
|
||||
width: double.infinity,
|
||||
@ -49,10 +85,10 @@ class DiscoverView extends GetView<DiscoverController> {
|
||||
onTapToSearch: controller.onTapToSearch,
|
||||
onTapToCategory: controller.homeController.openDrawer,
|
||||
),
|
||||
32.verticalSpace,
|
||||
30.verticalSpace,
|
||||
Obx(() {
|
||||
return SizedBox(
|
||||
height: 500.w,
|
||||
height: 520.w,
|
||||
child: Swiper(
|
||||
loop: true,
|
||||
autoplay: true,
|
||||
@ -72,10 +108,10 @@ class DiscoverView extends GetView<DiscoverController> {
|
||||
),
|
||||
);
|
||||
}),
|
||||
32.verticalSpace,
|
||||
30.verticalSpace,
|
||||
Image.asset(
|
||||
width: 24.w,
|
||||
Assets.discoverUp,
|
||||
Assets.imagesDiscoverUp,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -91,7 +127,7 @@ class DiscoverView extends GetView<DiscoverController> {
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top).w,
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(Assets.discoverBackground),
|
||||
image: AssetImage(Assets.imagesDiscoverBackground),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
@ -107,7 +143,6 @@ class DiscoverView extends GetView<DiscoverController> {
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
20.verticalSpace,
|
||||
Obx(() {
|
||||
return Expanded(
|
||||
child: BaseEasyRefresh(
|
||||
@ -119,7 +154,7 @@ class DiscoverView extends GetView<DiscoverController> {
|
||||
itemCount: controller.images.length,
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 20.w,
|
||||
crossAxisSpacing: 21.w,
|
||||
crossAxisSpacing: 20.w,
|
||||
padding: const EdgeInsets.fromLTRB(16, 0, 16, 0).w,
|
||||
itemBuilder: (context, index) {
|
||||
ImageModel item = controller.images[index];
|
||||
@ -140,44 +175,4 @@ class DiscoverView extends GetView<DiscoverController> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildBackground() {
|
||||
return GetBuilder<DiscoverController>(
|
||||
id: 'discover_background',
|
||||
builder: (logic) {
|
||||
return Container(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.black87,
|
||||
),
|
||||
child: ImageFiltered(
|
||||
imageFilter: ImageFilter.blur(
|
||||
sigmaX: 60,
|
||||
sigmaY: 60,
|
||||
tileMode: TileMode.decal,
|
||||
),
|
||||
child: controller.banners.isEmpty
|
||||
? Image.asset(
|
||||
Assets.homeBackground,
|
||||
)
|
||||
: PhotoView(
|
||||
enableRotation: false,
|
||||
imageProvider: CachedNetworkImageProvider(
|
||||
controller.banners[controller.index.value].imageUrl),
|
||||
initialScale: PhotoViewComputedScale.covered,
|
||||
minScale: PhotoViewComputedScale.contained * 0.5,
|
||||
maxScale: PhotoViewComputedScale.covered * 3,
|
||||
loadingBuilder: (context, event) =>
|
||||
loadingViewV1(color: Colors.white),
|
||||
errorBuilder: (BuildContext context, Object error,
|
||||
StackTrace? stackTrace) =>
|
||||
errorView,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ class FavoriteView extends GetView<FavoriteController> {
|
||||
itemCount: controller.favoriteList.length,
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 20.w,
|
||||
crossAxisSpacing: 21.w,
|
||||
crossAxisSpacing: 20.w,
|
||||
padding: const EdgeInsets.fromLTRB(16, 20, 16, 0).w,
|
||||
physics: const BouncingScrollPhysics(),
|
||||
itemBuilder: (context, index) {
|
||||
|
||||
@ -15,7 +15,11 @@ class FeedBackView extends GetView<FeedBackController> {
|
||||
appBar: BaseAppBar(
|
||||
"Feed Back",
|
||||
backgroundColor: Colors.black,
|
||||
titleStyle: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
titleStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
body: Container(
|
||||
padding: const EdgeInsets.all(15).w,
|
||||
@ -33,7 +37,7 @@ class FeedBackView extends GetView<FeedBackController> {
|
||||
Container(
|
||||
height: 150.w,
|
||||
padding: const EdgeInsets.fromLTRB(10, 0, 10, 10).w,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.w),
|
||||
margin: const EdgeInsets.symmetric(vertical: 10).w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8).r,
|
||||
border: Border.all(color: Colors.grey),
|
||||
@ -50,72 +54,41 @@ class FeedBackView extends GetView<FeedBackController> {
|
||||
maxLines: 7,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: "Please input",
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white.withOpacity(.5),
|
||||
fontSize: 12.sp,
|
||||
color: Colors.grey,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// Row(
|
||||
// children: [
|
||||
// Container(
|
||||
// width: 50.w,
|
||||
// height: 50.w,
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(8).r,
|
||||
// border: Border.all(
|
||||
// color: Colors.grey,
|
||||
// width: 1.w,
|
||||
// ),
|
||||
// ),
|
||||
// child: const Icon(
|
||||
// Icons.add,
|
||||
// color: Colors.grey,
|
||||
// ),
|
||||
// ),
|
||||
// 10.horizontalSpace,
|
||||
// Text(
|
||||
// "Add pictures or videos",
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// style: TextStyle(
|
||||
// color: Colors.grey,
|
||||
// fontSize: 12.sp,
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: controller.feedBackSubmit,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 2.w, horizontal: 5.w),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20).r,
|
||||
color: Colors.white),
|
||||
child: Text(
|
||||
GestureDetector(
|
||||
onTap: controller.feedBackSubmit,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 15).w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(50).r, color: Colors.white),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Submit",
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.black87,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -30,7 +30,7 @@ class HistoryView extends GetView<HistoryController> {
|
||||
itemCount: controller.historyList.length,
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 20.w,
|
||||
crossAxisSpacing: 21.w,
|
||||
crossAxisSpacing: 20.w,
|
||||
padding: const EdgeInsets.fromLTRB(16, 20, 16, 0).w,
|
||||
physics: const BouncingScrollPhysics(),
|
||||
itemBuilder: (context, index) {
|
||||
|
||||
@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:wallpaperx/common/components/image_network_widget.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/page/home/home_controller.dart';
|
||||
|
||||
///个人信息侧滑页面
|
||||
@ -13,69 +13,88 @@ class DrawerView extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
HomeController controller = Get.find<HomeController>();
|
||||
return Drawer(
|
||||
width: 300.w,
|
||||
width: 320.w,
|
||||
backgroundColor: Colors.black,
|
||||
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(
|
||||
"Style classification",
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white),
|
||||
)),
|
||||
82.verticalSpace,
|
||||
Expanded(
|
||||
child: MasonryGridView.count(
|
||||
itemCount: controller.categoryList.length,
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 8.w,
|
||||
crossAxisSpacing: 8.w,
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
0, 0, 16, MediaQuery.of(context).padding.bottom + 10)
|
||||
.w,
|
||||
itemBuilder: (context, index) {
|
||||
return GestureDetector(
|
||||
onTap: () => controller
|
||||
.onTapToCategory(controller.categoryList[index]),
|
||||
child: Stack(
|
||||
alignment: AlignmentDirectional.bottomStart,
|
||||
children: [
|
||||
Container(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12.w),
|
||||
),
|
||||
child: Image.asset(
|
||||
controller.categoryImgList[index],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
vertical: 16.w, horizontal: 9.w),
|
||||
child: Text(
|
||||
controller.categoryList[index],
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(Assets.imagesHomeBackground),
|
||||
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(
|
||||
"Style classification",
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white),
|
||||
)),
|
||||
10.verticalSpace,
|
||||
Expanded(
|
||||
child: MasonryGridView.count(
|
||||
itemCount: controller.categoryList.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
|
||||
.onTapToCategory(controller.categoryList[index]),
|
||||
child: Stack(
|
||||
alignment: AlignmentDirectional.bottomStart,
|
||||
children: [
|
||||
Container(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12.w),
|
||||
),
|
||||
child: Image.asset(
|
||||
controller.categoryImgList[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.categoryList[index],
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import 'package:wallpaperx/common/components/view_state_widget.dart';
|
||||
import 'package:wallpaperx/common/utils/shared_util.dart';
|
||||
import 'package:wallpaperx/config/app_tracking_transparency_manager.dart';
|
||||
import 'package:wallpaperx/entity/userinfo_model.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/page/discover/discover_view.dart';
|
||||
import 'package:wallpaperx/page/library/library_view.dart';
|
||||
import 'package:wallpaperx/page/settings/settings_view.dart';
|
||||
@ -29,7 +29,7 @@ class HomeController extends GetxController with WidgetsBindingObserver {
|
||||
PageItem(
|
||||
'Setting',
|
||||
appName,
|
||||
[Assets.settingSelected, Assets.settingSelected],
|
||||
[Assets.imagesSettingSelected, Assets.imagesSettingSelected],
|
||||
const SettingsView()),
|
||||
];
|
||||
late PageController pageController;
|
||||
|
||||
@ -13,63 +13,67 @@ class HomeView extends GetView<HomeController> {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
key: controller.scaffoldKey,
|
||||
drawer: const DrawerView(),
|
||||
body: Stack(
|
||||
alignment: AlignmentDirectional.bottomCenter,
|
||||
children: [
|
||||
PageView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
controller: controller.pageController,
|
||||
onPageChanged: (index) => controller.onPageChanged(index),
|
||||
children: controller.pages
|
||||
.map((e) => KeepAliveWrapper(child: e.widget))
|
||||
.toList(),
|
||||
),
|
||||
Obx(
|
||||
() => Container(
|
||||
decoration: const BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Colors.transparent,
|
||||
Colors.black,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
child: BottomNavigationBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
currentIndex: controller.currentIndex.value,
|
||||
onTap: (index) => controller.onTapNavigationBar(index),
|
||||
items: _bottomNavigationBarItems(),
|
||||
),
|
||||
),
|
||||
),
|
||||
_buildBody(),
|
||||
_bottomNavigationBar(),
|
||||
],
|
||||
),
|
||||
drawer: const DrawerView(),
|
||||
);
|
||||
}
|
||||
|
||||
List<BottomNavigationBarItem> _bottomNavigationBarItems() {
|
||||
return controller.pages.map((e) {
|
||||
return BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
e.icons[0],
|
||||
width: 32.w,
|
||||
height: 32.w,
|
||||
color: const Color(0xff6D6D6D),
|
||||
gaplessPlayback: true,
|
||||
Widget _buildBody() {
|
||||
return PageView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
controller: controller.pageController,
|
||||
onPageChanged: (index) => controller.onPageChanged(index),
|
||||
children: controller.pages
|
||||
.map((e) => KeepAliveWrapper(child: e.widget))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _bottomNavigationBar() {
|
||||
return Obx(
|
||||
() => Container(
|
||||
decoration: const BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Colors.transparent,
|
||||
Colors.black,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
activeIcon: Image.asset(
|
||||
e.icons[1],
|
||||
width: 32.w,
|
||||
height: 32.w,
|
||||
color: Colors.white,
|
||||
gaplessPlayback: true,
|
||||
child: BottomNavigationBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
currentIndex: controller.currentIndex.value,
|
||||
onTap: (index) => controller.onTapNavigationBar(index),
|
||||
items: controller.pages.map((e) {
|
||||
return BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
e.icons[0],
|
||||
width: 32.w,
|
||||
height: 32.w,
|
||||
color: const Color(0xff6D6D6D),
|
||||
gaplessPlayback: true,
|
||||
),
|
||||
activeIcon: Image.asset(
|
||||
e.icons[1],
|
||||
width: 32.w,
|
||||
height: 32.w,
|
||||
color: Colors.white,
|
||||
gaplessPlayback: true,
|
||||
),
|
||||
label: "",
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
label: "",
|
||||
);
|
||||
}).toList();
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:wallpaperx/common/utils/log_print.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/page/favorite/favorite_view.dart';
|
||||
import 'package:wallpaperx/page/history/history_view.dart';
|
||||
import 'package:wallpaperx/page/library/library_controller.dart';
|
||||
@ -55,7 +54,7 @@ class LibraryView extends GetView<LibraryController> {
|
||||
right: -5.5.w,
|
||||
bottom: 10.w,
|
||||
child: Image.asset(
|
||||
Assets.selectedIcon,
|
||||
Assets.imagesSelectedIcon,
|
||||
width: 30.w,
|
||||
height: 9.w,
|
||||
fit: BoxFit.fill,
|
||||
@ -75,7 +74,7 @@ class LibraryView extends GetView<LibraryController> {
|
||||
right: -5.5.w,
|
||||
bottom: 10.w,
|
||||
child: Image.asset(
|
||||
Assets.selectedIcon,
|
||||
Assets.imagesSelectedIcon,
|
||||
width: 30.w,
|
||||
height: 9.w,
|
||||
fit: BoxFit.fill,
|
||||
|
||||
@ -56,14 +56,14 @@ class LoginView extends GetView<LoginController> {
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: "Username",
|
||||
hintStyle: TextStyle(
|
||||
color: controller.usernameEmpty ? Colors.red : Colors.grey,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -93,14 +93,14 @@ class LoginView extends GetView<LoginController> {
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: "Password",
|
||||
hintStyle: TextStyle(
|
||||
color: controller.passwordEmpty ? Colors.red : Colors.grey,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -112,16 +112,19 @@ class LoginView extends GetView<LoginController> {
|
||||
onTap: controller.onTapLogin,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.symmetric(vertical: 10.w, horizontal: 15.w),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 10,
|
||||
horizontal: 15,
|
||||
).w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20).r, color: Colors.white),
|
||||
borderRadius: BorderRadius.circular(50).r,
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Login",
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.black87,
|
||||
fontSize: 16.sp,
|
||||
@ -138,16 +141,19 @@ class LoginView extends GetView<LoginController> {
|
||||
onTap: controller.onTapToUserEdit,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.symmetric(vertical: 10.w, horizontal: 15.w),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 10,
|
||||
horizontal: 15,
|
||||
).w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20).r, color: Colors.white),
|
||||
borderRadius: BorderRadius.circular(50).r,
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Register",
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.black87,
|
||||
fontSize: 16.sp,
|
||||
|
||||
@ -8,7 +8,7 @@ import 'package:get/get.dart';
|
||||
import 'package:gradient_borders/box_borders/gradient_box_border.dart';
|
||||
import 'package:wallpaperx/common/components/image_network_widget.dart';
|
||||
import 'package:wallpaperx/entity/image_model.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/page/search/search_controller.dart';
|
||||
|
||||
class SearchView extends GetView<CSearchController> {
|
||||
@ -110,7 +110,7 @@ class SearchView extends GetView<CSearchController> {
|
||||
decoration: InputDecoration(
|
||||
icon: Image.asset(
|
||||
width: 24.w,
|
||||
Assets.searchIcon,
|
||||
Assets.imagesSearchIcon,
|
||||
),
|
||||
hintText: 'Title',
|
||||
hintStyle: TextStyle(
|
||||
@ -182,7 +182,7 @@ class SearchView extends GetView<CSearchController> {
|
||||
"",
|
||||
Image.asset(
|
||||
width: 40.w,
|
||||
Assets.searchTop,
|
||||
Assets.imagesSearchTop,
|
||||
),
|
||||
padding: const EdgeInsets.all(13).w),
|
||||
),
|
||||
@ -266,7 +266,7 @@ class SearchView extends GetView<CSearchController> {
|
||||
"",
|
||||
Image.asset(
|
||||
width: 40.w,
|
||||
Assets.searchBottomRight,
|
||||
Assets.imagesSearchBottomRight,
|
||||
),
|
||||
angle: 0.0 * (math.pi / 180.0),
|
||||
padding: const EdgeInsets.all(13).w,
|
||||
@ -311,7 +311,7 @@ class SearchView extends GetView<CSearchController> {
|
||||
"",
|
||||
Image.asset(
|
||||
width: 40.w,
|
||||
Assets.searchBottom,
|
||||
Assets.imagesSearchBottom,
|
||||
),
|
||||
angle: 0.0 * (math.pi / 180.0),
|
||||
padding: const EdgeInsets.all(13).w,
|
||||
|
||||
@ -9,7 +9,7 @@ import 'package:wallpaperx/common/components/easy_loading.dart';
|
||||
import 'package:wallpaperx/common/utils/local_path_util.dart';
|
||||
import 'package:wallpaperx/common/utils/shared_util.dart';
|
||||
import 'package:wallpaperx/entity/userinfo_model.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/page/home/home_controller.dart';
|
||||
import 'package:wallpaperx/res/values/strings.dart';
|
||||
import 'package:wallpaperx/routes/app_pages.dart';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/page/settings/settings_controller.dart';
|
||||
|
||||
class SettingsView extends GetView<SettingsController> {
|
||||
@ -12,35 +12,21 @@ class SettingsView extends GetView<SettingsController> {
|
||||
Get.put(SettingsController());
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.black,
|
||||
body: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(Assets.settingBackground),
|
||||
image: AssetImage(Assets.imagesSettingBackground),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
padding:
|
||||
EdgeInsets.only(top: MediaQuery.of(context).padding.top + 74).w,
|
||||
EdgeInsets.only(top: MediaQuery.of(context).padding.top + 70).w,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildUserinfo(),
|
||||
20.verticalSpace,
|
||||
ListView.separated(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
itemCount: controller.options.length,
|
||||
itemBuilder: (context, index) {
|
||||
return _buildOptionItem(index);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return Container(
|
||||
height: 12.w,
|
||||
color: Colors.transparent,
|
||||
);
|
||||
},
|
||||
),
|
||||
15.verticalSpace,
|
||||
_buildOptionItem(),
|
||||
// SizedBox(
|
||||
// height: 400.w,
|
||||
// child: ShaderMask(
|
||||
@ -101,7 +87,7 @@ class SettingsView extends GetView<SettingsController> {
|
||||
child: Image.asset(
|
||||
fit: BoxFit.cover,
|
||||
controller.homeController.userinfo.avatar ??
|
||||
Assets.placeholder),
|
||||
Assets.imagesPlaceholder),
|
||||
),
|
||||
),
|
||||
16.verticalSpace,
|
||||
@ -115,7 +101,7 @@ class SettingsView extends GetView<SettingsController> {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
24.verticalSpace,
|
||||
20.verticalSpace,
|
||||
Container(
|
||||
height: 0.5.w,
|
||||
width: 260.w,
|
||||
@ -130,27 +116,40 @@ class SettingsView extends GetView<SettingsController> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildOptionItem(index) {
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () => controller.onTapItem(index),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
controller.options[index],
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Widget _buildOptionItem() {
|
||||
return ListView.separated(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
itemCount: controller.options.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () => controller.onTapItem(index),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
controller.options[index],
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return Container(
|
||||
height: 15.w,
|
||||
color: Colors.transparent,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/page/splash_screen/splash_screen_controller.dart';
|
||||
import 'package:wallpaperx/res/values/strings.dart';
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import 'package:get/get.dart';
|
||||
import 'package:wallpaperx/common/components/easy_loading.dart';
|
||||
import 'package:wallpaperx/common/utils/shared_util.dart';
|
||||
import 'package:wallpaperx/entity/userinfo_model.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/page/home/home_controller.dart';
|
||||
import 'package:wallpaperx/page/settings/settings_controller.dart';
|
||||
|
||||
@ -30,7 +30,7 @@ class UserEditController extends GetxController {
|
||||
late String title;
|
||||
Timer? _timer;
|
||||
|
||||
RxString avatar = Assets.placeholder.obs;
|
||||
RxString avatar = Assets.imagesPlaceholder.obs;
|
||||
|
||||
List<String> avatarList = [
|
||||
'assets/avatar/1.png',
|
||||
@ -48,7 +48,7 @@ class UserEditController extends GetxController {
|
||||
var map = UPCache.getInstance().getJson(loginAccount ?? "");
|
||||
if (map != null) {
|
||||
final userinfo = UserinfoModel.fromJson(map);
|
||||
avatar.value = userinfo.avatar ?? Assets.placeholder;
|
||||
avatar.value = userinfo.avatar ?? Assets.imagesPlaceholder;
|
||||
usernameController.value =
|
||||
TextEditingValue(text: userinfo.username ?? "");
|
||||
emailController.value = TextEditingValue(text: userinfo.email ?? "");
|
||||
|
||||
@ -21,13 +21,13 @@ class UserEditView extends GetView<UserEditController> {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Obx(() => _buildAvatar()),
|
||||
20.verticalSpace,
|
||||
15.verticalSpace,
|
||||
_buildUsernameInput(),
|
||||
20.verticalSpace,
|
||||
15.verticalSpace,
|
||||
_buildEmailInput(),
|
||||
20.verticalSpace,
|
||||
15.verticalSpace,
|
||||
_buildPasswordInput(),
|
||||
20.verticalSpace,
|
||||
15.verticalSpace,
|
||||
_buildApply(),
|
||||
],
|
||||
),
|
||||
@ -57,6 +57,7 @@ class UserEditView extends GetView<UserEditController> {
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(40).r,
|
||||
border: Border.all(color: Colors.white),
|
||||
),
|
||||
child: Image.asset(
|
||||
controller.avatar.value,
|
||||
@ -67,7 +68,10 @@ class UserEditView extends GetView<UserEditController> {
|
||||
GestureDetector(
|
||||
onTap: controller.editAvatar,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 2.w, horizontal: 5.w),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 2,
|
||||
horizontal: 5,
|
||||
).w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20).r,
|
||||
color: Colors.white),
|
||||
@ -109,14 +113,14 @@ class UserEditView extends GetView<UserEditController> {
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: "Username",
|
||||
hintStyle: TextStyle(
|
||||
color: controller.usernameEmpty ? Colors.red : Colors.grey,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -145,14 +149,14 @@ class UserEditView extends GetView<UserEditController> {
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: "E-mail",
|
||||
hintStyle: TextStyle(
|
||||
color: controller.emailEmpty ? Colors.red : Colors.grey,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -181,14 +185,14 @@ class UserEditView extends GetView<UserEditController> {
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: "Password",
|
||||
hintStyle: TextStyle(
|
||||
color: controller.passwordEmpty ? Colors.red : Colors.grey,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -200,16 +204,14 @@ class UserEditView extends GetView<UserEditController> {
|
||||
onTap: controller.setUserInfo,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.symmetric(vertical: 10.w, horizontal: 15.w),
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 15).w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20).r, color: Colors.white),
|
||||
borderRadius: BorderRadius.circular(50).r, color: Colors.white),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Apply",
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.black87,
|
||||
fontSize: 16.sp,
|
||||
|
||||
@ -11,7 +11,7 @@ import 'package:photo_view/photo_view_gallery.dart';
|
||||
import 'package:wallpaperx/common/components/button/base_textbutton.dart';
|
||||
import 'package:wallpaperx/common/components/view_state_widget.dart';
|
||||
import 'package:wallpaperx/entity/image_model.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/page/wallpaper_det/wallpaper_det_controller.dart';
|
||||
|
||||
class WallpaperDetView extends GetView<WallpaperDetController> {
|
||||
@ -99,7 +99,7 @@ class WallpaperDetView extends GetView<WallpaperDetController> {
|
||||
children: [
|
||||
16.horizontalSpace,
|
||||
_buildOptionItem(
|
||||
Assets.imagesIcDelBack,
|
||||
Assets.imagesIcImgDelBack,
|
||||
'Blur',
|
||||
controller.showAd,
|
||||
),
|
||||
@ -119,7 +119,7 @@ class WallpaperDetView extends GetView<WallpaperDetController> {
|
||||
),
|
||||
24.horizontalSpace,
|
||||
_buildOptionItem(
|
||||
Assets.imagesIcInfo,
|
||||
Assets.imagesIcImgInfo,
|
||||
'Blur',
|
||||
controller.onTapToggleCard,
|
||||
),
|
||||
@ -177,7 +177,7 @@ class WallpaperDetView extends GetView<WallpaperDetController> {
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Image.asset(
|
||||
Assets.imagesIcTip,
|
||||
Assets.imagesIcImgDelTip,
|
||||
width: 52.w,
|
||||
height: 52.w,
|
||||
),
|
||||
@ -185,7 +185,7 @@ class WallpaperDetView extends GetView<WallpaperDetController> {
|
||||
left: -15.w,
|
||||
top: 15.w,
|
||||
child: Image.asset(
|
||||
Assets.startS,
|
||||
Assets.imagesStarsS,
|
||||
width: 20.w,
|
||||
),
|
||||
),
|
||||
@ -193,7 +193,7 @@ class WallpaperDetView extends GetView<WallpaperDetController> {
|
||||
left: -8.w,
|
||||
top: 10.w,
|
||||
child: Image.asset(
|
||||
Assets.startM,
|
||||
Assets.imagesStarsM,
|
||||
width: 20.w,
|
||||
),
|
||||
),
|
||||
@ -201,7 +201,7 @@ class WallpaperDetView extends GetView<WallpaperDetController> {
|
||||
right: -12.w,
|
||||
bottom: -2.w,
|
||||
child: Image.asset(
|
||||
Assets.startL,
|
||||
Assets.imagesStarsL,
|
||||
width: 25.w,
|
||||
),
|
||||
),
|
||||
@ -232,7 +232,7 @@ class WallpaperDetView extends GetView<WallpaperDetController> {
|
||||
32.verticalSpace,
|
||||
genInfo(
|
||||
Image.asset(
|
||||
Assets.icSampler,
|
||||
Assets.imagesIcSampler,
|
||||
width: 28.w,
|
||||
),
|
||||
"Sampler:",
|
||||
@ -241,7 +241,7 @@ class WallpaperDetView extends GetView<WallpaperDetController> {
|
||||
23.verticalSpace,
|
||||
genInfo(
|
||||
Image.asset(
|
||||
Assets.icCfgScale,
|
||||
Assets.imagesIcCfgScale,
|
||||
width: 28.w,
|
||||
),
|
||||
"CFG scale:",
|
||||
@ -250,7 +250,7 @@ class WallpaperDetView extends GetView<WallpaperDetController> {
|
||||
23.verticalSpace,
|
||||
genInfo(
|
||||
Image.asset(
|
||||
Assets.icSteps,
|
||||
Assets.imagesIcSteps,
|
||||
width: 28.w,
|
||||
),
|
||||
"Steps:",
|
||||
@ -259,7 +259,7 @@ class WallpaperDetView extends GetView<WallpaperDetController> {
|
||||
23.verticalSpace,
|
||||
genInfo(
|
||||
Image.asset(
|
||||
Assets.icSeed,
|
||||
Assets.imagesIcSeed,
|
||||
width: 28.w,
|
||||
),
|
||||
"Seed:",
|
||||
|
||||
@ -10,7 +10,7 @@ import 'package:photo_view/photo_view.dart';
|
||||
import 'package:photo_view/photo_view_gallery.dart';
|
||||
import 'package:wallpaperx/common/components/view_state_widget.dart';
|
||||
import 'package:wallpaperx/entity/image_model.dart';
|
||||
import 'package:wallpaperx/gen/assets.dart';
|
||||
import 'package:wallpaperx/generated/assets.dart';
|
||||
import 'package:wallpaperx/page/wallpaper_det_v2/wallpaper_det_v2_controller.dart';
|
||||
|
||||
class WallpaperDetV2View extends GetView<WallpaperDetV2Controller> {
|
||||
@ -98,7 +98,7 @@ class WallpaperDetV2View extends GetView<WallpaperDetV2Controller> {
|
||||
children: [
|
||||
16.horizontalSpace,
|
||||
_buildOptionItem(
|
||||
Assets.imagesIcDelBack,
|
||||
Assets.imagesIcImgDelBack,
|
||||
'Blur',
|
||||
controller.showAd,
|
||||
),
|
||||
@ -118,7 +118,7 @@ class WallpaperDetV2View extends GetView<WallpaperDetV2Controller> {
|
||||
),
|
||||
24.horizontalSpace,
|
||||
_buildOptionItem(
|
||||
Assets.imagesIcInfo,
|
||||
Assets.imagesIcImgInfo,
|
||||
'Blur',
|
||||
controller.onTapToggleCard,
|
||||
),
|
||||
@ -176,7 +176,7 @@ class WallpaperDetV2View extends GetView<WallpaperDetV2Controller> {
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Image.asset(
|
||||
Assets.imagesIcTip,
|
||||
Assets.imagesIcImgDelTip,
|
||||
width: 52.w,
|
||||
height: 52.w,
|
||||
),
|
||||
@ -184,7 +184,7 @@ class WallpaperDetV2View extends GetView<WallpaperDetV2Controller> {
|
||||
left: -15.w,
|
||||
top: 15.w,
|
||||
child: Image.asset(
|
||||
Assets.startS,
|
||||
Assets.imagesStarsS,
|
||||
width: 20.w,
|
||||
),
|
||||
),
|
||||
@ -192,7 +192,7 @@ class WallpaperDetV2View extends GetView<WallpaperDetV2Controller> {
|
||||
left: -8.w,
|
||||
top: 10.w,
|
||||
child: Image.asset(
|
||||
Assets.startM,
|
||||
Assets.imagesStarsM,
|
||||
width: 20.w,
|
||||
),
|
||||
),
|
||||
@ -200,7 +200,7 @@ class WallpaperDetV2View extends GetView<WallpaperDetV2Controller> {
|
||||
right: -12.w,
|
||||
bottom: -2.w,
|
||||
child: Image.asset(
|
||||
Assets.startL,
|
||||
Assets.imagesStarsL,
|
||||
width: 25.w,
|
||||
),
|
||||
),
|
||||
@ -231,7 +231,7 @@ class WallpaperDetV2View extends GetView<WallpaperDetV2Controller> {
|
||||
32.verticalSpace,
|
||||
genInfo(
|
||||
Image.asset(
|
||||
Assets.icSampler,
|
||||
Assets.imagesIcSampler,
|
||||
width: 28.w,
|
||||
),
|
||||
"Sampler:",
|
||||
@ -240,7 +240,7 @@ class WallpaperDetV2View extends GetView<WallpaperDetV2Controller> {
|
||||
23.verticalSpace,
|
||||
genInfo(
|
||||
Image.asset(
|
||||
Assets.icCfgScale,
|
||||
Assets.imagesIcCfgScale,
|
||||
width: 28.w,
|
||||
),
|
||||
"CFG scale:",
|
||||
@ -249,7 +249,7 @@ class WallpaperDetV2View extends GetView<WallpaperDetV2Controller> {
|
||||
23.verticalSpace,
|
||||
genInfo(
|
||||
Image.asset(
|
||||
Assets.icSteps,
|
||||
Assets.imagesIcSteps,
|
||||
width: 28.w,
|
||||
),
|
||||
"Steps:",
|
||||
@ -258,7 +258,7 @@ class WallpaperDetV2View extends GetView<WallpaperDetV2Controller> {
|
||||
23.verticalSpace,
|
||||
genInfo(
|
||||
Image.asset(
|
||||
Assets.icSeed,
|
||||
Assets.imagesIcSeed,
|
||||
width: 28.w,
|
||||
),
|
||||
"Seed:",
|
||||
|
||||
@ -16,7 +16,11 @@ class WebPageView extends GetView<WebPageController> {
|
||||
appBar: BaseAppBar(
|
||||
controller.title,
|
||||
backgroundColor: Colors.black,
|
||||
titleStyle: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
titleStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
body: Obx(() {
|
||||
return ViewStateWidget(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user