Compare commits
2 Commits
0d9aee1ed4
...
5748046c60
Author | SHA1 | Date | |
---|---|---|---|
5748046c60 | |||
997f5e0a88 |
BIN
assets/images/home/btn_icon_click.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
assets/images/home/btn_icon_dream_exploration.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
BIN
assets/images/home/text_dream_tree_page_first_line.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
assets/images/home/text_dream_tree_page_fourth_line.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
assets/images/home/text_dream_tree_page_second_line.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
assets/images/home/text_dream_tree_page_third_line.png
Normal file
After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 26 KiB |
BIN
assets/images/splash/text_startup_page_first_line.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
assets/images/splash/text_startup_page_fourth_line.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
assets/images/splash/text_startup_page_second_line.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
assets/images/splash/text_startup_page_third_line.png
Normal file
After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 17 KiB |
BIN
assets/images/welcome/text_welcome_page_first_line.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
assets/images/welcome/text_welcome_page_fourth_line.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
assets/images/welcome/text_welcome_page_second_line.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/images/welcome/text_welcome_page_third_line.png
Normal file
After Width: | Height: | Size: 12 KiB |
@ -71,6 +71,12 @@ class HomeController extends GetxController {
|
||||
occupationName = SpUtil.getString(Constant.occupationName).nullSafe;
|
||||
occupationId = SpUtil.getInt(Constant.occupationId, defValue: 2)!;
|
||||
create.value = SpUtil.getBool(Constant.create, defValue: true)!;
|
||||
if (account.isEmpty) {
|
||||
SchedulerBinding.instance.addPostFrameCallback((timeStamp) {
|
||||
Get.offAllNamed(Routes.WELCOME);
|
||||
});
|
||||
return;
|
||||
}
|
||||
initLeftExploreApps();
|
||||
initRightExploreApps();
|
||||
initArtistGoals();
|
||||
@ -572,11 +578,15 @@ class HomeController extends GetxController {
|
||||
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
|
||||
var knowledgePointDialogue = knowledgePointDialogues.firstWhere((t) =>
|
||||
var knowledgePointDialogue = knowledgePointDialogues.firstWhereOrNull((t) =>
|
||||
t!.kpId == selectKnowledge.value!.id && t.id == sendCount && t.isGpt!);
|
||||
|
||||
if (knowledgePointDialogue == null) {
|
||||
return;
|
||||
}
|
||||
chatMsg = ChatMsg(
|
||||
id: Guid.newGuid.toString(),
|
||||
text: knowledgePointDialogue!.text,
|
||||
text: knowledgePointDialogue.text,
|
||||
isBot: 1,
|
||||
knowledgeId: selectKnowledge.value!.id,
|
||||
);
|
||||
|
@ -477,21 +477,7 @@ class HomeView extends GetView<HomeController> {
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'梦想',
|
||||
style: TextStyles.boldWhiteShadow22_012,
|
||||
),
|
||||
Text(
|
||||
'探索',
|
||||
style: TextStyles.boldWhiteShadow22_012,
|
||||
)
|
||||
],
|
||||
),
|
||||
child: Images.homeBtnIconDreamExploration,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -557,12 +543,21 @@ class HomeView extends GetView<HomeController> {
|
||||
)
|
||||
: Container(),
|
||||
controller.explored2.value >= 1 ? firstLeafWidget() : Container(),
|
||||
controller.explored2.value >= 4
|
||||
?LanternWidget(
|
||||
brightCount: controller.exploreCount.value >= 2
|
||||
? controller.exploreDay.value
|
||||
: controller.exploreDay.value - 1,
|
||||
): Container(),
|
||||
Positioned(
|
||||
right: 60.w,
|
||||
top: 346.h,
|
||||
child: AnimatedVisibilityWidget(
|
||||
animationWidgetBuilder: AnimatedVisibilityWidget.fadeAnimationWidgetBuilder,
|
||||
duration: const Duration(milliseconds: 800),
|
||||
isVisible: controller.explored2.value >= 1,
|
||||
child: Visibility(
|
||||
visible: controller.explored2.value >= 1,
|
||||
child: const LanternWidget(
|
||||
brightCount: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 168.w,
|
||||
top: 244.h,
|
||||
|
@ -2,7 +2,6 @@ import 'package:dreampad/app/shared/shared.dart';
|
||||
import 'package:dreampad/app/shared/widgets/touch_hint_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
|
||||
/// 首次dialog的模板
|
||||
@ -30,34 +29,10 @@ class FirstTimeDialog extends StatelessWidget {
|
||||
isTextShown.value = true;
|
||||
},
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 20.h),
|
||||
child: Text(
|
||||
'探梦者,你选择了一个很酷的梦想',
|
||||
style: TextStyles.mediumWhiteShadow26_034,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 20.h),
|
||||
child: Text(
|
||||
'现在在你面前是专属于你的梦之建木',
|
||||
style: TextStyles.mediumWhiteShadow26_034,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 20.h),
|
||||
child: Text(
|
||||
'你将会看到你未来几个关键阶段的重要目标',
|
||||
style: TextStyles.mediumWhiteShadow26_034,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 20.h),
|
||||
child: Text(
|
||||
'准备好了吗?',
|
||||
style: TextStyles.mediumWhiteShadow26_034,
|
||||
),
|
||||
),
|
||||
Images.homeTextDreamTreePageFirstLine,
|
||||
Images.homeTextDreamTreePageSecondLine,
|
||||
Images.homeTextDreamTreePageThirdLine,
|
||||
Images.homeTextDreamTreePageFourthLine,
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -12,39 +12,36 @@ class LanternWidget extends GetView {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Positioned(
|
||||
right: 60.w,
|
||||
top: 346.h,
|
||||
child: ShowUp(
|
||||
child: Container(
|
||||
height: 90.h,
|
||||
width: 180.w,
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: Images.homeLantern,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
brightCount! >= 1
|
||||
? Positioned(
|
||||
left: -9.w,
|
||||
top: 36.h,
|
||||
child: Images.homeLanternBright,
|
||||
)
|
||||
: Container(),
|
||||
brightCount! >= 2
|
||||
? Positioned(
|
||||
left: 18.w,
|
||||
top: 27.h,
|
||||
child: Images.homeLanternBright,
|
||||
)
|
||||
: Container(),
|
||||
],
|
||||
return ShowUp(
|
||||
duration: const Duration(seconds: 2),
|
||||
child: Container(
|
||||
height: 90.h,
|
||||
width: 180.w,
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: Images.homeLantern,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
brightCount! >= 1
|
||||
? Positioned(
|
||||
left: -9.w,
|
||||
top: 36.h,
|
||||
child: Images.homeLanternBright,
|
||||
)
|
||||
: Container(),
|
||||
brightCount! >= 2
|
||||
? Positioned(
|
||||
left: 18.w,
|
||||
top: 27.h,
|
||||
child: Images.homeLanternBright,
|
||||
)
|
||||
: Container(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ class SelectController extends GetxController {
|
||||
enName: 'academician',
|
||||
vImage: 'btn_female_pic_academician',
|
||||
hImage: 'pic_female_academician',
|
||||
enable: false,
|
||||
enable: true,
|
||||
));
|
||||
occupations.add(Occupation(
|
||||
id: 2,
|
||||
@ -218,9 +218,9 @@ class SelectController extends GetxController {
|
||||
}
|
||||
|
||||
Future recommendOccupation(int id) async {
|
||||
confirm.value = true;
|
||||
var occupation = selectOccupations.firstWhere((t) => t.value.id == id);
|
||||
selectOccupation.value = occupation.value;
|
||||
confirm.value = true;
|
||||
for (var occupation in selectOccupations) {
|
||||
occupation.update((val) {
|
||||
val!.selected = false;
|
||||
|
@ -23,33 +23,18 @@ class HelloWidget extends StatelessWidget {
|
||||
child: AnimatedColumnWidget(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 16.h),
|
||||
child: Text(
|
||||
'探梦者你好',
|
||||
style: TextStyles.mediumWhiteShadow26_034,
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 8.h),
|
||||
child: Images.welcomeFirstLine,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 16.h),
|
||||
child: Text(
|
||||
'这里是建木遗迹',
|
||||
style: TextStyles.mediumWhiteShadow26_034,
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 8.h),
|
||||
child: Images.welcomeSecondLine,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 16.h),
|
||||
child: Text(
|
||||
'在探索之前',
|
||||
style: TextStyles.mediumWhiteShadow26_034,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 16.h),
|
||||
child: Text(
|
||||
'请告诉我',
|
||||
style: TextStyles.mediumWhiteShadow26_034,
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 8.h),
|
||||
child: Images.welcomeThirdLine,
|
||||
),
|
||||
Images.welcomeFourthLine,
|
||||
],
|
||||
onDone: () {
|
||||
isTextShown.value = true;
|
||||
|
@ -18,7 +18,7 @@ class SplashView extends StatelessWidget {
|
||||
return Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
top: 228.h,
|
||||
top: 200.h,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: Center(
|
||||
@ -26,15 +26,10 @@ class SplashView extends StatelessWidget {
|
||||
style: TextStyles.mediumWhiteShadowHeight26_034,
|
||||
child: AnimatedColumnWidget(
|
||||
children: [
|
||||
const Text('上古时期,天帝颛顼命重黎绝地天通'),
|
||||
const Text('斩断了连接天界与人间之桥——建木为重生建木'),
|
||||
const Text(
|
||||
'探梦者们踏上了旅途……',
|
||||
),
|
||||
Text(
|
||||
'故事源于《山海经·大荒西经》',
|
||||
style: TextStyles.mediumWhiteShadow16_034,
|
||||
),
|
||||
Images.splashFirstLine,
|
||||
Images.splashSecondLine,
|
||||
Images.splashThirdLine,
|
||||
Images.splashFourthLine,
|
||||
],
|
||||
onDone: () {
|
||||
isStoryShown.value = true;
|
||||
|
@ -157,6 +157,84 @@ class Images {
|
||||
width: 66.w,
|
||||
);
|
||||
|
||||
static Widget splashFirstLine = LoadAssetImage(
|
||||
'splash/text_startup_page_first_line',
|
||||
height: 42.w * 1.5,
|
||||
width: 326.w * 1.5,
|
||||
);
|
||||
|
||||
static Widget splashSecondLine = LoadAssetImage(
|
||||
'splash/text_startup_page_second_line',
|
||||
height: 42.w * 1.5,
|
||||
width: 326.w * 1.5,
|
||||
);
|
||||
|
||||
static Widget splashThirdLine = LoadAssetImage(
|
||||
'splash/text_startup_page_third_line',
|
||||
height: 42.w * 1.5,
|
||||
width: 326.w * 1.5,
|
||||
);
|
||||
|
||||
static Widget splashFourthLine = LoadAssetImage(
|
||||
'splash/text_startup_page_fourth_line',
|
||||
height: 42.w * 1.5,
|
||||
width: 326.w * 1.5,
|
||||
);
|
||||
|
||||
static Widget welcomeFirstLine = LoadAssetImage(
|
||||
'welcome/text_welcome_page_first_line',
|
||||
height: 30.w * 1.5,
|
||||
width: 346.w * 1.5,
|
||||
);
|
||||
|
||||
static Widget welcomeSecondLine = LoadAssetImage(
|
||||
'welcome/text_welcome_page_second_line',
|
||||
height: 30.w * 1.5,
|
||||
width: 346.w * 1.5,
|
||||
);
|
||||
|
||||
static Widget welcomeThirdLine = LoadAssetImage(
|
||||
'welcome/text_welcome_page_third_line',
|
||||
height: 30.w * 1.5,
|
||||
width: 346.w * 1.5,
|
||||
);
|
||||
|
||||
static Widget welcomeFourthLine = LoadAssetImage(
|
||||
'welcome/text_welcome_page_fourth_line',
|
||||
height: 30.w * 1.5,
|
||||
width: 346.w * 1.5,
|
||||
);
|
||||
|
||||
static Widget homeTextDreamTreePageFirstLine = LoadAssetImage(
|
||||
'home/text_dream_tree_page_first_line',
|
||||
height: 42.w * 1.5,
|
||||
width: 346.w * 1.5,
|
||||
);
|
||||
|
||||
static Widget homeTextDreamTreePageSecondLine = LoadAssetImage(
|
||||
'home/text_dream_tree_page_second_line',
|
||||
height: 42.w * 1.5,
|
||||
width: 346.w * 1.5,
|
||||
);
|
||||
|
||||
static Widget homeTextDreamTreePageThirdLine = LoadAssetImage(
|
||||
'home/text_dream_tree_page_third_line',
|
||||
height: 42.w * 1.5,
|
||||
width: 346.w * 1.5,
|
||||
);
|
||||
|
||||
static Widget homeTextDreamTreePageFourthLine = LoadAssetImage(
|
||||
'home/text_dream_tree_page_fourth_line',
|
||||
height: 42.w * 1.5,
|
||||
width: 346.w * 1.5,
|
||||
);
|
||||
|
||||
static Widget homeBtnIconDreamExploration = LoadAssetImage(
|
||||
'home/btn_icon_dream_exploration',
|
||||
height: 34.w * 1.8,
|
||||
width: 32.w * 1.8,
|
||||
);
|
||||
|
||||
static Widget homeExploreCountdown = LoadAssetImage(
|
||||
'home/btn_icon_explore_countdown',
|
||||
height: 66.w,
|
||||
|
@ -5,15 +5,21 @@ class ShowUp extends HookWidget {
|
||||
const ShowUp({
|
||||
super.key,
|
||||
required this.child,
|
||||
this.duration,
|
||||
});
|
||||
|
||||
final Widget child;
|
||||
|
||||
final Duration? duration;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final controller =
|
||||
useAnimationController(duration: const Duration(milliseconds: 300));
|
||||
useMemoized(() {
|
||||
useMemoized(() async {
|
||||
if (duration != null) {
|
||||
await Future.delayed(duration!);
|
||||
}
|
||||
controller.forward();
|
||||
});
|
||||
return FadeTransition(
|
||||
|