修正底部APP显示问题
BIN
assets/images/home/btn_bg_grey.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/images/home/btn_bg_music.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
assets/images/home/btn_bg_picture_book.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
assets/images/home/btn_bg_programme.png
Normal file
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 1.7 KiB |
@ -23,11 +23,11 @@ class HomeController extends GetxController {
|
|||||||
|
|
||||||
HomeController({required this.homeProvider});
|
HomeController({required this.homeProvider});
|
||||||
|
|
||||||
final explored = true.obs;
|
final explored = false.obs;
|
||||||
final explored2 = 0.obs;
|
final explored2 = 0.obs;
|
||||||
final create = true.obs;
|
final create = true.obs;
|
||||||
final prompt = false.obs;
|
final prompt = false.obs;
|
||||||
final exploreCount = 2.obs;
|
final exploreCount = 0.obs;
|
||||||
final exploreDay = 1.obs;
|
final exploreDay = 1.obs;
|
||||||
final chatMsgList = RxList<ChatMsg>([]);
|
final chatMsgList = RxList<ChatMsg>([]);
|
||||||
final selectKnowledge = Rx<KnowledgePoint?>(null);
|
final selectKnowledge = Rx<KnowledgePoint?>(null);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'package:dreampad/app/models/models.dart';
|
import 'package:dreampad/app/models/models.dart';
|
||||||
import 'package:dreampad/app/routes/app_pages.dart';
|
import 'package:dreampad/app/routes/app_pages.dart';
|
||||||
|
import 'package:dreampad/app/shared/constants/dimens.dart';
|
||||||
import 'package:dreampad/app/shared/shared.dart';
|
import 'package:dreampad/app/shared/shared.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
@ -527,9 +528,19 @@ class HomeView extends GetView<HomeController> {
|
|||||||
bottom: 10.h,
|
bottom: 10.h,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
child: controller.explored.value
|
child: buildMainApp(
|
||||||
? Images.homePicturebook
|
'智慧编程',
|
||||||
: Images.homePicturebookGrey,
|
Images.homeMainAppProgramme,
|
||||||
|
Images.homeProgramme,
|
||||||
|
Images.homeProgrammeGrey,
|
||||||
|
TextStyle(
|
||||||
|
fontSize: Dimens.font_sp10.sp,
|
||||||
|
fontFamily: 'alph-b',
|
||||||
|
color: const Color(0xFFFFBC5A),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
controller.explored.value,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
@ -537,9 +548,19 @@ class HomeView extends GetView<HomeController> {
|
|||||||
bottom: 10.h,
|
bottom: 10.h,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
child: controller.explored.value
|
child: buildMainApp(
|
||||||
? Images.homeProgramme
|
'绘本创作',
|
||||||
: Images.homeProgrammeGrey,
|
Images.homeMainAppPictureBook,
|
||||||
|
Images.homePicturebook,
|
||||||
|
Images.homePicturebookGrey,
|
||||||
|
TextStyle(
|
||||||
|
fontSize: Dimens.font_sp10.sp,
|
||||||
|
fontFamily: 'alph-b',
|
||||||
|
color: const Color(0xFF68FFFA),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
controller.explored.value,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
@ -547,9 +568,19 @@ class HomeView extends GetView<HomeController> {
|
|||||||
bottom: 10.h,
|
bottom: 10.h,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
child: controller.explored.value
|
child: buildMainApp(
|
||||||
? Images.homeMusic
|
'乐曲创作',
|
||||||
: Images.homeMusicGrey,
|
Images.homeMainAppMusic,
|
||||||
|
Images.homeMusic,
|
||||||
|
Images.homeMusicGrey,
|
||||||
|
TextStyle(
|
||||||
|
fontSize: Dimens.font_sp10.sp,
|
||||||
|
fontFamily: 'alph-b',
|
||||||
|
color: const Color(0xFFEA74DF),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
controller.explored.value,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -557,6 +588,37 @@ class HomeView extends GetView<HomeController> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget buildMainApp(
|
||||||
|
String name,
|
||||||
|
AssetImage bgImage,
|
||||||
|
Widget appIco,
|
||||||
|
Widget appGreyIco,
|
||||||
|
TextStyle textStyle,
|
||||||
|
bool usable,
|
||||||
|
) {
|
||||||
|
return Container(
|
||||||
|
height: 90.w,
|
||||||
|
width: 90.w,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: usable ? bgImage : Images.homeMainAppGrey,
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
usable ? appIco : appGreyIco,
|
||||||
|
Text(
|
||||||
|
name,
|
||||||
|
style: usable ? textStyle : TextStyles.boldColor10,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void showGoalDialog(Goal goal) {
|
void showGoalDialog(Goal goal) {
|
||||||
SmartDialog.show(
|
SmartDialog.show(
|
||||||
maskColor: const Color(0xFF02184B).withOpacity(0.7),
|
maskColor: const Color(0xFF02184B).withOpacity(0.7),
|
||||||
|
@ -135,38 +135,38 @@ class Images {
|
|||||||
|
|
||||||
static Widget homePicturebook = LoadAssetImage(
|
static Widget homePicturebook = LoadAssetImage(
|
||||||
'home/btn_icon_picture_book',
|
'home/btn_icon_picture_book',
|
||||||
height: 90.w,
|
height: 41.w,
|
||||||
width: 90.w,
|
width: 41.w,
|
||||||
);
|
);
|
||||||
|
|
||||||
static Widget homePicturebookGrey = LoadAssetImage(
|
static Widget homePicturebookGrey = LoadAssetImage(
|
||||||
'home/btn_icon_picture_book_grey',
|
'home/btn_icon_picture_book_grey',
|
||||||
height: 90.w,
|
height: 41.w,
|
||||||
width: 90.w,
|
width: 41.w,
|
||||||
);
|
);
|
||||||
|
|
||||||
static Widget homeProgramme = LoadAssetImage(
|
static Widget homeProgramme = LoadAssetImage(
|
||||||
'home/btn_icon_programme',
|
'home/btn_icon_programme',
|
||||||
height: 90.w,
|
height: 41.w,
|
||||||
width: 90.w,
|
width: 41.w,
|
||||||
);
|
);
|
||||||
|
|
||||||
static Widget homeProgrammeGrey = LoadAssetImage(
|
static Widget homeProgrammeGrey = LoadAssetImage(
|
||||||
'home/btn_icon_programme_grey',
|
'home/btn_icon_programme_grey',
|
||||||
height: 90.w,
|
height: 41.w,
|
||||||
width: 90.w,
|
width: 41.w,
|
||||||
);
|
);
|
||||||
|
|
||||||
static Widget homeMusic = LoadAssetImage(
|
static Widget homeMusic = LoadAssetImage(
|
||||||
'home/btn_icon_music',
|
'home/btn_icon_music',
|
||||||
height: 90.w,
|
height: 41.w,
|
||||||
width: 90.w,
|
width: 41.w,
|
||||||
);
|
);
|
||||||
|
|
||||||
static Widget homeMusicGrey = LoadAssetImage(
|
static Widget homeMusicGrey = LoadAssetImage(
|
||||||
'home/btn_icon_music_grey',
|
'home/btn_icon_music_grey',
|
||||||
height: 90.w,
|
height: 41.w,
|
||||||
width: 90.w,
|
width: 41.w,
|
||||||
);
|
);
|
||||||
|
|
||||||
static Widget homeIp = LoadAssetImage(
|
static Widget homeIp = LoadAssetImage(
|
||||||
@ -283,6 +283,14 @@ class Images {
|
|||||||
AssetImage("assets/images/home/bg_pic_windows.png");
|
AssetImage("assets/images/home/bg_pic_windows.png");
|
||||||
static const AssetImage homeLantern =
|
static const AssetImage homeLantern =
|
||||||
AssetImage("assets/images/home/label_icon_lantern.png");
|
AssetImage("assets/images/home/label_icon_lantern.png");
|
||||||
|
static const AssetImage homeMainAppProgramme =
|
||||||
|
AssetImage("assets/images/home/btn_bg_programme.png");
|
||||||
|
static const AssetImage homeMainAppPictureBook =
|
||||||
|
AssetImage("assets/images/home/btn_bg_picture_book.png");
|
||||||
|
static const AssetImage homeMainAppMusic =
|
||||||
|
AssetImage("assets/images/home/btn_bg_music.png");
|
||||||
|
static const AssetImage homeMainAppGrey =
|
||||||
|
AssetImage("assets/images/home/btn_bg_grey.png");
|
||||||
|
|
||||||
static const AssetImage studyBg =
|
static const AssetImage studyBg =
|
||||||
AssetImage("assets/images/study/bg_pic_dream_exploration_page.png");
|
AssetImage("assets/images/study/bg_pic_dream_exploration_page.png");
|
||||||
|
@ -355,6 +355,12 @@ class TextStyles {
|
|||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
);
|
);
|
||||||
|
static TextStyle boldColor10 = TextStyle(
|
||||||
|
fontSize: Dimens.font_sp10.sp,
|
||||||
|
fontFamily: 'alph-b',
|
||||||
|
color: const Color(0xFFAAAAAA),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
);
|
||||||
|
|
||||||
static TextStyle boldColor24 = TextStyle(
|
static TextStyle boldColor24 = TextStyle(
|
||||||
fontSize: Dimens.font_sp24.sp,
|
fontSize: Dimens.font_sp24.sp,
|
||||||
|