1
|
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 2.9 KiB |
BIN
assets/icon/category.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 399 B After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 484 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 713 B |
|
Before Width: | Height: | Size: 703 B After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 782 B After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
@ -34,12 +34,7 @@ class CustomAppbar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: onBackTap ??
|
onTap: onBackTap ?? () => Get.back(),
|
||||||
() {
|
|
||||||
Get.back();
|
|
||||||
// ApplovinManage()
|
|
||||||
// .showAdIfReady(ApplovinManage().adUnitId3);
|
|
||||||
},
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(10).w,
|
padding: const EdgeInsets.all(10).w,
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
|
|||||||
@ -32,11 +32,19 @@ class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
Container(
|
||||||
|
padding: const EdgeInsets.all(5).w,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black87,
|
||||||
|
borderRadius: BorderRadius.circular(10).w,
|
||||||
|
),
|
||||||
|
child: GestureDetector(
|
||||||
onTap: onTapToCategory,
|
onTap: onTapToCategory,
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
width: iconWitch ?? 32.w,
|
width: iconWitch ?? 20.w,
|
||||||
groupIcon ?? Assets.iconGroup,
|
color: Colors.white,
|
||||||
|
groupIcon ?? Assets.iconCategory,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
title == null
|
title == null
|
||||||
@ -90,13 +98,21 @@ class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
: Container(),
|
: Container(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
GestureDetector(
|
Container(
|
||||||
|
padding: const EdgeInsets.all(5).w,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black87,
|
||||||
|
borderRadius: BorderRadius.circular(10).w,
|
||||||
|
),
|
||||||
|
child: GestureDetector(
|
||||||
onTap: onTapToSearch,
|
onTap: onTapToSearch,
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
width: iconWitch ?? 32.w,
|
width: iconWitch ?? 20.w,
|
||||||
|
color: Colors.white,
|
||||||
searchIcon ?? Assets.iconSearch,
|
searchIcon ?? Assets.iconSearch,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -20,12 +20,12 @@ class Assets {
|
|||||||
static const String iconArrowTop = 'assets/icon/arrow_top.png';
|
static const String iconArrowTop = 'assets/icon/arrow_top.png';
|
||||||
static const String iconBack = 'assets/icon/back.png';
|
static const String iconBack = 'assets/icon/back.png';
|
||||||
static const String iconBackBig = 'assets/icon/back_big.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 iconCfgScale = 'assets/icon/cfg_scale.png';
|
||||||
static const String iconDataEmpty = 'assets/icon/data_empty.png';
|
static const String iconDataEmpty = 'assets/icon/data_empty.png';
|
||||||
static const String iconDown = 'assets/icon/down.png';
|
static const String iconDown = 'assets/icon/down.png';
|
||||||
static const String iconDownload = 'assets/icon/download.png';
|
static const String iconDownload = 'assets/icon/download.png';
|
||||||
static const String iconFavorite = 'assets/icon/favorite.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 iconIconApp = 'assets/icon/icon_app.png';
|
||||||
static const String iconImgDelTip = 'assets/icon/img_del_tip.png';
|
static const String iconImgDelTip = 'assets/icon/img_del_tip.png';
|
||||||
static const String iconImgErrorType = 'assets/icon/img_error_type.png';
|
static const String iconImgErrorType = 'assets/icon/img_error_type.png';
|
||||||
|
|||||||
@ -21,8 +21,8 @@ import 'package:wallpaperx/routes/app_pages.dart';
|
|||||||
void main() async {
|
void main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
// 初始化Firebase
|
|
||||||
try {
|
try {
|
||||||
|
// 初始化Firebase
|
||||||
await Firebase.initializeApp(
|
await Firebase.initializeApp(
|
||||||
options: DefaultFirebaseOptions.currentPlatform,
|
options: DefaultFirebaseOptions.currentPlatform,
|
||||||
);
|
);
|
||||||
@ -48,9 +48,6 @@ void main() async {
|
|||||||
DeviceOrientation.portraitDown,
|
DeviceOrientation.portraitDown,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 初始化广告sdk
|
|
||||||
// await ApplovinManage().initApplovin();
|
|
||||||
|
|
||||||
// 初始化Hive
|
// 初始化Hive
|
||||||
await initHive();
|
await initHive();
|
||||||
|
|
||||||
|
|||||||
@ -66,7 +66,6 @@ class HomeController extends GetxController with WidgetsBindingObserver {
|
|||||||
Future<void> didChangeAppLifecycleState(AppLifecycleState state) async {
|
Future<void> didChangeAppLifecycleState(AppLifecycleState state) async {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case AppLifecycleState.resumed:
|
case AppLifecycleState.resumed:
|
||||||
// await ApplovinManage().showAdIfReady(ApplovinManage().adUnitId1);
|
|
||||||
break;
|
break;
|
||||||
case AppLifecycleState.inactive:
|
case AppLifecycleState.inactive:
|
||||||
case AppLifecycleState.hidden:
|
case AppLifecycleState.hidden:
|
||||||
@ -88,7 +87,6 @@ class HomeController extends GetxController with WidgetsBindingObserver {
|
|||||||
/// 点击BottomNavigationBar
|
/// 点击BottomNavigationBar
|
||||||
void onTapNavigationBar(int index) {
|
void onTapNavigationBar(int index) {
|
||||||
pageController.jumpToPage(index);
|
pageController.jumpToPage(index);
|
||||||
// ApplovinManage().showAdIfReady(ApplovinManage().adUnitId1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 获取用户信息
|
/// 获取用户信息
|
||||||
|
|||||||
@ -169,6 +169,5 @@ class WallpaperDetailController extends GetxController {
|
|||||||
/// 显示广告
|
/// 显示广告
|
||||||
void showAd() {
|
void showAd() {
|
||||||
Get.back();
|
Get.back();
|
||||||
// ApplovinManage().showAdIfReady(ApplovinManage().adUnitId3);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,7 +100,7 @@ class WallpaperDetailView extends GetView<WallpaperDetailController> {
|
|||||||
16.horizontalSpace,
|
16.horizontalSpace,
|
||||||
_buildOptionItem(
|
_buildOptionItem(
|
||||||
Assets.iconBackBig,
|
Assets.iconBackBig,
|
||||||
'Blur',
|
'',
|
||||||
controller.showAd,
|
controller.showAd,
|
||||||
),
|
),
|
||||||
Expanded(child: Container()),
|
Expanded(child: Container()),
|
||||||
@ -114,13 +114,13 @@ class WallpaperDetailView extends GetView<WallpaperDetailController> {
|
|||||||
24.horizontalSpace,
|
24.horizontalSpace,
|
||||||
_buildOptionItem(
|
_buildOptionItem(
|
||||||
Assets.iconDownload,
|
Assets.iconDownload,
|
||||||
'Download',
|
'',
|
||||||
controller.downloadImg,
|
controller.downloadImg,
|
||||||
),
|
),
|
||||||
24.horizontalSpace,
|
24.horizontalSpace,
|
||||||
_buildOptionItem(
|
_buildOptionItem(
|
||||||
Assets.iconImgInfo,
|
Assets.iconImgInfo,
|
||||||
'Blur',
|
'',
|
||||||
controller.flipCard,
|
controller.flipCard,
|
||||||
),
|
),
|
||||||
16.horizontalSpace,
|
16.horizontalSpace,
|
||||||
@ -154,12 +154,6 @@ class WallpaperDetailView extends GetView<WallpaperDetailController> {
|
|||||||
child: BackdropFilter(
|
child: BackdropFilter(
|
||||||
filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
|
filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.fromLTRB(
|
|
||||||
30,
|
|
||||||
0,
|
|
||||||
30,
|
|
||||||
MediaQuery.of(context).padding.bottom + 55,
|
|
||||||
).w,
|
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xff000000).withOpacity(.8),
|
color: const Color(0xff000000).withOpacity(.8),
|
||||||
@ -169,10 +163,9 @@ class WallpaperDetailView extends GetView<WallpaperDetailController> {
|
|||||||
children: [
|
children: [
|
||||||
63.verticalSpace,
|
63.verticalSpace,
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
24.horizontalSpace,
|
|
||||||
Stack(
|
Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
children: [
|
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,
|
37.verticalSpace,
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: EdgeInsets.zero,
|
padding: const EdgeInsets.symmetric(horizontal: 30).w,
|
||||||
children: [
|
children: [
|
||||||
Wrap(
|
Wrap(
|
||||||
spacing: 8.w,
|
spacing: 8.w,
|
||||||
@ -297,24 +282,49 @@ class WallpaperDetailView extends GetView<WallpaperDetailController> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
24.verticalSpace,
|
24.verticalSpace,
|
||||||
GestureDetector(
|
Container(
|
||||||
onTap: () => controller.copyPrompt(model.generateInfo),
|
height: 70.h,
|
||||||
child: Container(
|
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: EdgeInsets.only(
|
||||||
vertical: 15, horizontal: 8)
|
left: 16,
|
||||||
.w,
|
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(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xff322E31),
|
color: Colors.white.withOpacity(.2),
|
||||||
borderRadius: BorderRadius.circular(30).r,
|
borderRadius: BorderRadius.circular(50).r,
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
"copy",
|
"Copy Prompt",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontSize: 14.sp),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
_buildOptionItem(
|
||||||
|
Assets.iconImgInfo,
|
||||||
|
'',
|
||||||
|
controller.flipCard,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -167,6 +167,5 @@ class WallpaperDetailV2Controller extends GetxController {
|
|||||||
/// 显示广告
|
/// 显示广告
|
||||||
void showAd() {
|
void showAd() {
|
||||||
Get.back();
|
Get.back();
|
||||||
// ApplovinManage().showAdIfReady(ApplovinManage().adUnitId3);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||