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