From 35736fe0251b86572a41f438c4f76ba14a82ea27 Mon Sep 17 00:00:00 2001 From: xh <36baea72@gmail.com> Date: Tue, 16 Jul 2024 15:37:10 +0800 Subject: [PATCH] 1 --- .../components/image_network_widget.dart | 2 +- .../navigation_bar/base_appbar.dart | 4 +- .../navigation_bar/search_appbar.dart | 12 +- lib/common/components/view_state_widget.dart | 6 +- lib/gen/assets.dart | 57 ------- lib/generated/assets.dart | 2 +- lib/page/about/about_view.dart | 9 +- lib/page/ai_setting/ai_setting_view.dart | 81 +++++----- lib/page/category/category_view.dart | 32 ++-- lib/page/cls_det/cls_det_view.dart | 4 +- lib/page/discover/discover_view.dart | 93 ++++++------ lib/page/favorite/favorite_view.dart | 2 +- lib/page/feed_back/feed_back_view.dart | 73 +++------ lib/page/history/history_view.dart | 2 +- lib/page/home/drawer_view/drawer_view.dart | 141 ++++++++++-------- lib/page/home/home_controller.dart | 4 +- lib/page/home/home_view.dart | 100 +++++++------ lib/page/library/library_view.dart | 7 +- lib/page/login/login_view.dart | 30 ++-- lib/page/search/search_view.dart | 10 +- lib/page/settings/settings_controller.dart | 2 +- lib/page/settings/settings_view.dart | 83 +++++------ .../splash_screen/splash_screen_view.dart | 2 +- lib/page/user_edit/user_edit_controller.dart | 6 +- lib/page/user_edit/user_edit_view.dart | 32 ++-- .../wallpaper_det/wallpaper_det_view.dart | 22 +-- .../wallpaper_det_v2_view.dart | 22 +-- lib/page/web_page/web_page_view.dart | 6 +- 28 files changed, 403 insertions(+), 443 deletions(-) delete mode 100644 lib/gen/assets.dart diff --git a/lib/common/components/image_network_widget.dart b/lib/common/components/image_network_widget.dart index 81962b2..b50a6a6 100644 --- a/lib/common/components/image_network_widget.dart +++ b/lib/common/components/image_network_widget.dart @@ -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({ diff --git a/lib/common/components/navigation_bar/base_appbar.dart b/lib/common/components/navigation_bar/base_appbar.dart index 8e511f3..eeb7712 100644 --- a/lib/common/components/navigation_bar/base_appbar.dart +++ b/lib/common/components/navigation_bar/base_appbar.dart @@ -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, diff --git a/lib/common/components/navigation_bar/search_appbar.dart b/lib/common/components/navigation_bar/search_appbar.dart index 5570fca..db25ec4 100644 --- a/lib/common/components/navigation_bar/search_appbar.dart +++ b/lib/common/components/navigation_bar/search_appbar.dart @@ -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, ), ), ], diff --git a/lib/common/components/view_state_widget.dart b/lib/common/components/view_state_widget.dart index d13afac..53e9835 100644 --- a/lib/common/components/view_state_widget.dart +++ b/lib/common/components/view_state_widget.dart @@ -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, diff --git a/lib/gen/assets.dart b/lib/gen/assets.dart deleted file mode 100644 index 7a7b393..0000000 --- a/lib/gen/assets.dart +++ /dev/null @@ -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'; - -} diff --git a/lib/generated/assets.dart b/lib/generated/assets.dart index 2591af2..ab81b11 100644 --- a/lib/generated/assets.dart +++ b/lib/generated/assets.dart @@ -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'; diff --git a/lib/page/about/about_view.dart b/lib/page/about/about_view.dart index 6a3226b..c0390fe 100644 --- a/lib/page/about/about_view.dart +++ b/lib/page/about/about_view.dart @@ -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 { ), 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 { style: TextStyle( color: Colors.grey, fontSize: 12.sp, - fontWeight: FontWeight.w600, ), ), ], diff --git a/lib/page/ai_setting/ai_setting_view.dart b/lib/page/ai_setting/ai_setting_view.dart index 61f08f2..bd47559 100644 --- a/lib/page/ai_setting/ai_setting_view.dart +++ b/lib/page/ai_setting/ai_setting_view.dart @@ -15,21 +15,20 @@ class AiSettingView extends GetView { 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 { children: controller.labelSettingList .map((e) => labelSettingItem(e)) .toList(), - ) + ), ], ), ); @@ -65,7 +64,10 @@ class AiSettingView extends GetView { 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 { children: controller.labelOptionList .map((e) => labelOptionItem(e)) .toList(), - ) + ), ], ), ); @@ -115,46 +117,51 @@ class AiSettingView extends GetView { 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, + ), ), - ), - ) - ], + ], + ), + ), ); } } diff --git a/lib/page/category/category_view.dart b/lib/page/category/category_view.dart index 9903b79..2fc4753 100644 --- a/lib/page/category/category_view.dart +++ b/lib/page/category/category_view.dart @@ -47,7 +47,7 @@ class CategoryView extends GetView { 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 { overflow: TextOverflow.ellipsis, style: TextStyle( color: Colors.white, - fontSize: 20.sp, + fontSize: 18.sp, ), ), ), @@ -86,30 +86,37 @@ class CategoryView extends GetView { '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 { } Widget _buildImgWidget( - ImageModel item, List wallpaperList, int index) { + ImageModel item, + List wallpaperList, + int index, + ) { return GestureDetector( onTap: () => controller.onTapItem(wallpaperList, index), child: KeepAliveWrapper( @@ -127,7 +137,7 @@ class CategoryView extends GetView { width: 126.w, height: double.infinity, aspectRatio: 126 / 180, - radius: 12.r, + radius: 15.r, ), ), ); diff --git a/lib/page/cls_det/cls_det_view.dart b/lib/page/cls_det/cls_det_view.dart index 9c03c2f..ffffd5b 100644 --- a/lib/page/cls_det/cls_det_view.dart +++ b/lib/page/cls_det/cls_det_view.dart @@ -22,7 +22,7 @@ class ClsDetView extends GetView { titleStyle: TextStyle( color: Colors.white, fontSize: 24.sp, - fontWeight: FontWeight.w700, + fontWeight: FontWeight.w600, ), ), body: Obx( @@ -33,7 +33,7 @@ class ClsDetView extends GetView { itemCount: controller.wallpaperList.length, crossAxisCount: 2, mainAxisSpacing: 20.w, - crossAxisSpacing: 21.w, + crossAxisSpacing: 20.w, padding: EdgeInsets.fromLTRB( 16, 32, diff --git a/lib/page/discover/discover_view.dart b/lib/page/discover/discover_view.dart index 0c74d91..657425c 100644 --- a/lib/page/discover/discover_view.dart +++ b/lib/page/discover/discover_view.dart @@ -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 { Widget _buildPhotoView(context) { return Stack( children: [ - _buildBackground(), + GetBuilder( + 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 { 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 { ), ); }), - 32.verticalSpace, + 30.verticalSpace, Image.asset( width: 24.w, - Assets.discoverUp, + Assets.imagesDiscoverUp, ), ], ), @@ -91,7 +127,7 @@ class DiscoverView extends GetView { 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 { fontWeight: FontWeight.w700, ), ), - 20.verticalSpace, Obx(() { return Expanded( child: BaseEasyRefresh( @@ -119,7 +154,7 @@ class DiscoverView extends GetView { 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 { ), ); } - - Widget _buildBackground() { - return GetBuilder( - 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, - ), - ), - ); - }, - ); - } } diff --git a/lib/page/favorite/favorite_view.dart b/lib/page/favorite/favorite_view.dart index 8d1c47e..09c3d4b 100644 --- a/lib/page/favorite/favorite_view.dart +++ b/lib/page/favorite/favorite_view.dart @@ -29,7 +29,7 @@ class FavoriteView extends GetView { 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) { diff --git a/lib/page/feed_back/feed_back_view.dart b/lib/page/feed_back/feed_back_view.dart index a40de33..5420336 100644 --- a/lib/page/feed_back/feed_back_view.dart +++ b/lib/page/feed_back/feed_back_view.dart @@ -15,7 +15,11 @@ class FeedBackView extends GetView { 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 { 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 { 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, ), ), - ), + ], ), - ], + ), ), ], ), diff --git a/lib/page/history/history_view.dart b/lib/page/history/history_view.dart index cf5d381..e7689ca 100644 --- a/lib/page/history/history_view.dart +++ b/lib/page/history/history_view.dart @@ -30,7 +30,7 @@ class HistoryView extends GetView { 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) { diff --git a/lib/page/home/drawer_view/drawer_view.dart b/lib/page/home/drawer_view/drawer_view.dart index 24feb3e..42c2f58 100644 --- a/lib/page/home/drawer_view/drawer_view.dart +++ b/lib/page/home/drawer_view/drawer_view.dart @@ -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(); return Drawer( - width: 300.w, + width: 320.w, backgroundColor: Colors.black, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - 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: [ + 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, + ), + ), + ), + ], + ), + ); + }, + ), + ), + ], + )), ); } } diff --git a/lib/page/home/home_controller.dart b/lib/page/home/home_controller.dart index 19cd2ff..ec2ceba 100644 --- a/lib/page/home/home_controller.dart +++ b/lib/page/home/home_controller.dart @@ -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; diff --git a/lib/page/home/home_view.dart b/lib/page/home/home_view.dart index 5598b24..551d152 100644 --- a/lib/page/home/home_view.dart +++ b/lib/page/home/home_view.dart @@ -13,63 +13,67 @@ class HomeView extends GetView { 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 _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(); + ), + ); } } diff --git a/lib/page/library/library_view.dart b/lib/page/library/library_view.dart index 3852085..6f16018 100644 --- a/lib/page/library/library_view.dart +++ b/lib/page/library/library_view.dart @@ -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 { 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 { right: -5.5.w, bottom: 10.w, child: Image.asset( - Assets.selectedIcon, + Assets.imagesSelectedIcon, width: 30.w, height: 9.w, fit: BoxFit.fill, diff --git a/lib/page/login/login_view.dart b/lib/page/login/login_view.dart index 6bedf90..7eb8be8 100644 --- a/lib/page/login/login_view.dart +++ b/lib/page/login/login_view.dart @@ -56,14 +56,14 @@ class LoginView extends GetView { 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 { 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 { 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 { 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, diff --git a/lib/page/search/search_view.dart b/lib/page/search/search_view.dart index cfff74e..1598035 100644 --- a/lib/page/search/search_view.dart +++ b/lib/page/search/search_view.dart @@ -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 { @@ -110,7 +110,7 @@ class SearchView extends GetView { decoration: InputDecoration( icon: Image.asset( width: 24.w, - Assets.searchIcon, + Assets.imagesSearchIcon, ), hintText: 'Title', hintStyle: TextStyle( @@ -182,7 +182,7 @@ class SearchView extends GetView { "", Image.asset( width: 40.w, - Assets.searchTop, + Assets.imagesSearchTop, ), padding: const EdgeInsets.all(13).w), ), @@ -266,7 +266,7 @@ class SearchView extends GetView { "", 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 { "", Image.asset( width: 40.w, - Assets.searchBottom, + Assets.imagesSearchBottom, ), angle: 0.0 * (math.pi / 180.0), padding: const EdgeInsets.all(13).w, diff --git a/lib/page/settings/settings_controller.dart b/lib/page/settings/settings_controller.dart index 3a9f4ce..b7dae7f 100644 --- a/lib/page/settings/settings_controller.dart +++ b/lib/page/settings/settings_controller.dart @@ -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'; diff --git a/lib/page/settings/settings_view.dart b/lib/page/settings/settings_view.dart index 8664e3d..90a6038 100644 --- a/lib/page/settings/settings_view.dart +++ b/lib/page/settings/settings_view.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 { @@ -12,35 +12,21 @@ class SettingsView extends GetView { 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 { child: Image.asset( fit: BoxFit.cover, controller.homeController.userinfo.avatar ?? - Assets.placeholder), + Assets.imagesPlaceholder), ), ), 16.verticalSpace, @@ -115,7 +101,7 @@ class SettingsView extends GetView { fontWeight: FontWeight.w600, ), ), - 24.verticalSpace, + 20.verticalSpace, Container( height: 0.5.w, width: 260.w, @@ -130,27 +116,40 @@ class SettingsView extends GetView { ); } - 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, + ); + }, ); } } diff --git a/lib/page/splash_screen/splash_screen_view.dart b/lib/page/splash_screen/splash_screen_view.dart index df3aa30..7ef2bb5 100644 --- a/lib/page/splash_screen/splash_screen_view.dart +++ b/lib/page/splash_screen/splash_screen_view.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/splash_screen/splash_screen_controller.dart'; import 'package:wallpaperx/res/values/strings.dart'; diff --git a/lib/page/user_edit/user_edit_controller.dart b/lib/page/user_edit/user_edit_controller.dart index 09a4b25..26cc03f 100644 --- a/lib/page/user_edit/user_edit_controller.dart +++ b/lib/page/user_edit/user_edit_controller.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 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 ?? ""); diff --git a/lib/page/user_edit/user_edit_view.dart b/lib/page/user_edit/user_edit_view.dart index 06ae310..8589ef0 100644 --- a/lib/page/user_edit/user_edit_view.dart +++ b/lib/page/user_edit/user_edit_view.dart @@ -21,13 +21,13 @@ class UserEditView extends GetView { 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 { 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 { 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 { 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 { 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 { 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 { 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, diff --git a/lib/page/wallpaper_det/wallpaper_det_view.dart b/lib/page/wallpaper_det/wallpaper_det_view.dart index b324752..6c49495 100644 --- a/lib/page/wallpaper_det/wallpaper_det_view.dart +++ b/lib/page/wallpaper_det/wallpaper_det_view.dart @@ -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 { @@ -99,7 +99,7 @@ class WallpaperDetView extends GetView { children: [ 16.horizontalSpace, _buildOptionItem( - Assets.imagesIcDelBack, + Assets.imagesIcImgDelBack, 'Blur', controller.showAd, ), @@ -119,7 +119,7 @@ class WallpaperDetView extends GetView { ), 24.horizontalSpace, _buildOptionItem( - Assets.imagesIcInfo, + Assets.imagesIcImgInfo, 'Blur', controller.onTapToggleCard, ), @@ -177,7 +177,7 @@ class WallpaperDetView extends GetView { clipBehavior: Clip.none, children: [ Image.asset( - Assets.imagesIcTip, + Assets.imagesIcImgDelTip, width: 52.w, height: 52.w, ), @@ -185,7 +185,7 @@ class WallpaperDetView extends GetView { left: -15.w, top: 15.w, child: Image.asset( - Assets.startS, + Assets.imagesStarsS, width: 20.w, ), ), @@ -193,7 +193,7 @@ class WallpaperDetView extends GetView { left: -8.w, top: 10.w, child: Image.asset( - Assets.startM, + Assets.imagesStarsM, width: 20.w, ), ), @@ -201,7 +201,7 @@ class WallpaperDetView extends GetView { right: -12.w, bottom: -2.w, child: Image.asset( - Assets.startL, + Assets.imagesStarsL, width: 25.w, ), ), @@ -232,7 +232,7 @@ class WallpaperDetView extends GetView { 32.verticalSpace, genInfo( Image.asset( - Assets.icSampler, + Assets.imagesIcSampler, width: 28.w, ), "Sampler:", @@ -241,7 +241,7 @@ class WallpaperDetView extends GetView { 23.verticalSpace, genInfo( Image.asset( - Assets.icCfgScale, + Assets.imagesIcCfgScale, width: 28.w, ), "CFG scale:", @@ -250,7 +250,7 @@ class WallpaperDetView extends GetView { 23.verticalSpace, genInfo( Image.asset( - Assets.icSteps, + Assets.imagesIcSteps, width: 28.w, ), "Steps:", @@ -259,7 +259,7 @@ class WallpaperDetView extends GetView { 23.verticalSpace, genInfo( Image.asset( - Assets.icSeed, + Assets.imagesIcSeed, width: 28.w, ), "Seed:", diff --git a/lib/page/wallpaper_det_v2/wallpaper_det_v2_view.dart b/lib/page/wallpaper_det_v2/wallpaper_det_v2_view.dart index 1054b04..abbfaf5 100644 --- a/lib/page/wallpaper_det_v2/wallpaper_det_v2_view.dart +++ b/lib/page/wallpaper_det_v2/wallpaper_det_v2_view.dart @@ -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 { @@ -98,7 +98,7 @@ class WallpaperDetV2View extends GetView { children: [ 16.horizontalSpace, _buildOptionItem( - Assets.imagesIcDelBack, + Assets.imagesIcImgDelBack, 'Blur', controller.showAd, ), @@ -118,7 +118,7 @@ class WallpaperDetV2View extends GetView { ), 24.horizontalSpace, _buildOptionItem( - Assets.imagesIcInfo, + Assets.imagesIcImgInfo, 'Blur', controller.onTapToggleCard, ), @@ -176,7 +176,7 @@ class WallpaperDetV2View extends GetView { clipBehavior: Clip.none, children: [ Image.asset( - Assets.imagesIcTip, + Assets.imagesIcImgDelTip, width: 52.w, height: 52.w, ), @@ -184,7 +184,7 @@ class WallpaperDetV2View extends GetView { left: -15.w, top: 15.w, child: Image.asset( - Assets.startS, + Assets.imagesStarsS, width: 20.w, ), ), @@ -192,7 +192,7 @@ class WallpaperDetV2View extends GetView { left: -8.w, top: 10.w, child: Image.asset( - Assets.startM, + Assets.imagesStarsM, width: 20.w, ), ), @@ -200,7 +200,7 @@ class WallpaperDetV2View extends GetView { right: -12.w, bottom: -2.w, child: Image.asset( - Assets.startL, + Assets.imagesStarsL, width: 25.w, ), ), @@ -231,7 +231,7 @@ class WallpaperDetV2View extends GetView { 32.verticalSpace, genInfo( Image.asset( - Assets.icSampler, + Assets.imagesIcSampler, width: 28.w, ), "Sampler:", @@ -240,7 +240,7 @@ class WallpaperDetV2View extends GetView { 23.verticalSpace, genInfo( Image.asset( - Assets.icCfgScale, + Assets.imagesIcCfgScale, width: 28.w, ), "CFG scale:", @@ -249,7 +249,7 @@ class WallpaperDetV2View extends GetView { 23.verticalSpace, genInfo( Image.asset( - Assets.icSteps, + Assets.imagesIcSteps, width: 28.w, ), "Steps:", @@ -258,7 +258,7 @@ class WallpaperDetV2View extends GetView { 23.verticalSpace, genInfo( Image.asset( - Assets.icSeed, + Assets.imagesIcSeed, width: 28.w, ), "Seed:", diff --git a/lib/page/web_page/web_page_view.dart b/lib/page/web_page/web_page_view.dart index 10ad135..cdc7003 100644 --- a/lib/page/web_page/web_page_view.dart +++ b/lib/page/web_page/web_page_view.dart @@ -16,7 +16,11 @@ class WebPageView extends GetView { 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(