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(
|
||||
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(
|
||||
|
||||
@ -32,11 +32,19 @@ class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GestureDetector(
|
||||
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 ?? 32.w,
|
||||
groupIcon ?? Assets.iconGroup,
|
||||
width: iconWitch ?? 20.w,
|
||||
color: Colors.white,
|
||||
groupIcon ?? Assets.iconCategory,
|
||||
),
|
||||
),
|
||||
),
|
||||
title == null
|
||||
@ -90,13 +98,21 @@ class SearchAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
: Container(),
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
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 ?? 32.w,
|
||||
width: iconWitch ?? 20.w,
|
||||
color: Colors.white,
|
||||
searchIcon ?? Assets.iconSearch,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
/// 获取用户信息
|
||||
|
||||
@ -169,6 +169,5 @@ class WallpaperDetailController extends GetxController {
|
||||
/// 显示广告
|
||||
void showAd() {
|
||||
Get.back();
|
||||
// ApplovinManage().showAdIfReady(ApplovinManage().adUnitId3);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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,24 +282,49 @@ class WallpaperDetailView extends GetView<WallpaperDetailController> {
|
||||
),
|
||||
),
|
||||
24.verticalSpace,
|
||||
GestureDetector(
|
||||
onTap: () => controller.copyPrompt(model.generateInfo),
|
||||
child: Container(
|
||||
Container(
|
||||
height: 70.h,
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 15, horizontal: 8)
|
||||
.w,
|
||||
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: const Color(0xff322E31),
|
||||
borderRadius: BorderRadius.circular(30).r,
|
||||
color: Colors.white.withOpacity(.2),
|
||||
borderRadius: BorderRadius.circular(50).r,
|
||||
),
|
||||
child: Text(
|
||||
"copy",
|
||||
"Copy Prompt",
|
||||
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() {
|
||||
Get.back();
|
||||
// ApplovinManage().showAdIfReady(ApplovinManage().adUnitId3);
|
||||
}
|
||||
}
|
||||
|
||||