This commit is contained in:
xh 2024-07-22 19:13:11 +08:00
parent a77fb829c8
commit 46dbbe2578
19 changed files with 78 additions and 64 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
assets/icon/category.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 703 B

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 782 B

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -34,12 +34,7 @@ class CustomAppbar extends StatelessWidget implements PreferredSizeWidget {
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: onBackTap ??
() {
Get.back();
// ApplovinManage()
// .showAdIfReady(ApplovinManage().adUnitId3);
},
onTap: onBackTap ?? () => Get.back(),
child: Padding(
padding: const EdgeInsets.all(10).w,
child: Image.asset(

View File

@ -32,11 +32,19 @@ class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap: onTapToCategory,
child: Image.asset(
width: iconWitch ?? 32.w,
groupIcon ?? Assets.iconGroup,
Container(
padding: const EdgeInsets.all(5).w,
decoration: BoxDecoration(
color: Colors.black87,
borderRadius: BorderRadius.circular(10).w,
),
child: GestureDetector(
onTap: onTapToCategory,
child: Image.asset(
width: iconWitch ?? 20.w,
color: Colors.white,
groupIcon ?? Assets.iconCategory,
),
),
),
title == null
@ -45,9 +53,9 @@ class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
children: [
showDown ?? true
? Image.asset(
width: 24.w,
Assets.iconDown,
)
width: 24.w,
Assets.iconDown,
)
: Container(),
Stack(
clipBehavior: Clip.none,
@ -90,11 +98,19 @@ class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
: Container(),
],
),
GestureDetector(
onTap: onTapToSearch,
child: Image.asset(
width: iconWitch ?? 32.w,
searchIcon ?? Assets.iconSearch,
Container(
padding: const EdgeInsets.all(5).w,
decoration: BoxDecoration(
color: Colors.black87,
borderRadius: BorderRadius.circular(10).w,
),
child: GestureDetector(
onTap: onTapToSearch,
child: Image.asset(
width: iconWitch ?? 20.w,
color: Colors.white,
searchIcon ?? Assets.iconSearch,
),
),
),
],

View File

@ -20,12 +20,12 @@ class Assets {
static const String iconArrowTop = 'assets/icon/arrow_top.png';
static const String iconBack = 'assets/icon/back.png';
static const String iconBackBig = 'assets/icon/back_big.png';
static const String iconCategory = 'assets/icon/category.png';
static const String iconCfgScale = 'assets/icon/cfg_scale.png';
static const String iconDataEmpty = 'assets/icon/data_empty.png';
static const String iconDown = 'assets/icon/down.png';
static const String iconDownload = 'assets/icon/download.png';
static const String iconFavorite = 'assets/icon/favorite.png';
static const String iconGroup = 'assets/icon/group.png';
static const String iconIconApp = 'assets/icon/icon_app.png';
static const String iconImgDelTip = 'assets/icon/img_del_tip.png';
static const String iconImgErrorType = 'assets/icon/img_error_type.png';

View File

@ -21,8 +21,8 @@ import 'package:wallpaperx/routes/app_pages.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Firebase
try {
// Firebase
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
@ -48,9 +48,6 @@ void main() async {
DeviceOrientation.portraitDown,
]);
// 广sdk
// await ApplovinManage().initApplovin();
// Hive
await initHive();

View File

@ -66,7 +66,6 @@ class HomeController extends GetxController with WidgetsBindingObserver {
Future<void> didChangeAppLifecycleState(AppLifecycleState state) async {
switch (state) {
case AppLifecycleState.resumed:
// await ApplovinManage().showAdIfReady(ApplovinManage().adUnitId1);
break;
case AppLifecycleState.inactive:
case AppLifecycleState.hidden:
@ -88,7 +87,6 @@ class HomeController extends GetxController with WidgetsBindingObserver {
/// BottomNavigationBar
void onTapNavigationBar(int index) {
pageController.jumpToPage(index);
// ApplovinManage().showAdIfReady(ApplovinManage().adUnitId1);
}
///

View File

@ -169,6 +169,5 @@ class WallpaperDetailController extends GetxController {
/// 广
void showAd() {
Get.back();
// ApplovinManage().showAdIfReady(ApplovinManage().adUnitId3);
}
}

View File

@ -100,7 +100,7 @@ class WallpaperDetailView extends GetView<WallpaperDetailController> {
16.horizontalSpace,
_buildOptionItem(
Assets.iconBackBig,
'Blur',
'',
controller.showAd,
),
Expanded(child: Container()),
@ -114,13 +114,13 @@ class WallpaperDetailView extends GetView<WallpaperDetailController> {
24.horizontalSpace,
_buildOptionItem(
Assets.iconDownload,
'Download',
'',
controller.downloadImg,
),
24.horizontalSpace,
_buildOptionItem(
Assets.iconImgInfo,
'Blur',
'',
controller.flipCard,
),
16.horizontalSpace,
@ -154,12 +154,6 @@ class WallpaperDetailView extends GetView<WallpaperDetailController> {
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
child: Container(
padding: EdgeInsets.fromLTRB(
30,
0,
30,
MediaQuery.of(context).padding.bottom + 55,
).w,
width: double.infinity,
decoration: BoxDecoration(
color: const Color(0xff000000).withOpacity(.8),
@ -169,10 +163,9 @@ class WallpaperDetailView extends GetView<WallpaperDetailController> {
children: [
63.verticalSpace,
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
24.horizontalSpace,
Stack(
clipBehavior: Clip.none,
children: [
@ -207,20 +200,12 @@ class WallpaperDetailView extends GetView<WallpaperDetailController> {
),
],
),
GestureDetector(
onTap: controller.flipCard,
child: Icon(
Icons.close,
color: Colors.white,
size: 24.w,
),
),
],
),
37.verticalSpace,
Expanded(
child: ListView(
padding: EdgeInsets.zero,
padding: const EdgeInsets.symmetric(horizontal: 30).w,
children: [
Wrap(
spacing: 8.w,
@ -297,22 +282,47 @@ class WallpaperDetailView extends GetView<WallpaperDetailController> {
),
),
24.verticalSpace,
GestureDetector(
onTap: () => controller.copyPrompt(model.generateInfo),
child: Container(
width: double.infinity,
padding: const EdgeInsets.symmetric(
vertical: 15, horizontal: 8)
.w,
decoration: BoxDecoration(
color: const Color(0xff322E31),
borderRadius: BorderRadius.circular(30).r,
),
child: Text(
"copy",
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white, fontSize: 14.sp),
),
Container(
height: 70.h,
width: double.infinity,
padding: EdgeInsets.only(
left: 16,
right: 16,
top: 15,
bottom: MediaQuery.of(context).padding.bottom + 15).w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_buildOptionItem(
Assets.iconBackBig,
'',
controller.showAd,
),
GestureDetector(
onTap: () =>
controller.copyPrompt(model.generateInfo),
child: Container(
width: 200.w,
height: 70.h,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.white.withOpacity(.2),
borderRadius: BorderRadius.circular(50).r,
),
child: Text(
"Copy Prompt",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white, fontSize: 14.sp),
),
),
),
_buildOptionItem(
Assets.iconImgInfo,
'',
controller.flipCard,
),
],
),
),
],

View File

@ -167,6 +167,5 @@ class WallpaperDetailV2Controller extends GetxController {
/// 广
void showAd() {
Get.back();
// ApplovinManage().showAdIfReady(ApplovinManage().adUnitId3);
}
}