修复一些问题
This commit is contained in:
parent
5748046c60
commit
925673afa2
@ -71,12 +71,6 @@ 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();
|
||||
@ -100,6 +94,11 @@ class HomeController extends GetxController {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (account.isEmpty) {
|
||||
SchedulerBinding.instance.addPostFrameCallback((timeStamp) {
|
||||
Get.offAllNamed(Routes.WELCOME);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
@ -117,8 +116,8 @@ class HomeController extends GetxController {
|
||||
|
||||
Future explorePress() async {
|
||||
if (explored.value) {
|
||||
availableApp.value = true;
|
||||
if (exploreTimer == null) {
|
||||
availableApp.value = true;
|
||||
exploreTimer = Timer.periodic(repeatPeriod, (timer) {
|
||||
if (countTime <= 0) {
|
||||
explored.value = false;
|
||||
@ -148,6 +147,7 @@ class HomeController extends GetxController {
|
||||
remainTime.value = countTime;
|
||||
});
|
||||
} else {
|
||||
availableApp.value = false;
|
||||
exploreTimer!.cancel();
|
||||
exploreTimer = null;
|
||||
}
|
||||
@ -223,7 +223,7 @@ class HomeController extends GetxController {
|
||||
4.月亮的相位:
|
||||
• 观察月亮如何在一个月内从新月变为满月再回到新月。这些变化是由月亮围绕地球旋转,我们从地球上看到的月亮被太阳照亮的部分发生变化造成的。'''));
|
||||
knowledgePoints.add(KnowledgePoint(
|
||||
id: 2, right: 751.0, top: 198.0, title: '中国历史:炎帝和皇帝', leared: false)
|
||||
id: 2, right: 751.0, top: 198.0, title: '中国历史:炎帝和黄帝', leared: false)
|
||||
.obs);
|
||||
knowledgePointDialogues.add(KnowledgePointDialogue(
|
||||
kpId: 2, id: 0, isGpt: true, text: '''让我们来了解一下炎帝和黄帝,这两位是中国历史上非常重要的传说人物。
|
||||
|
@ -32,17 +32,11 @@ class HomeView extends GetView<HomeController> {
|
||||
child: Obx(
|
||||
() => Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
child: KeyedSubtree(
|
||||
key: ValueKey(controller.create.value),
|
||||
child: controller.create.value
|
||||
? Center(
|
||||
child: Images.homeCreate,
|
||||
)
|
||||
: buildBody(context),
|
||||
),
|
||||
),
|
||||
body: controller.create.value
|
||||
? Center(
|
||||
child: Images.homeCreate,
|
||||
)
|
||||
: buildBody(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -332,7 +326,7 @@ class HomeView extends GetView<HomeController> {
|
||||
child: Text(
|
||||
'科学竞赛参与',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyles.boldWhiteShadow12_111,
|
||||
style: TextStyles.whiteShadow12_111,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -346,7 +340,7 @@ class HomeView extends GetView<HomeController> {
|
||||
child: Text(
|
||||
'英语能力加强',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyles.boldWhiteShadow12_111,
|
||||
style: TextStyles.whiteShadow12_111,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -360,7 +354,7 @@ class HomeView extends GetView<HomeController> {
|
||||
child: Text(
|
||||
'拓展科学知识',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyles.boldWhiteShadow12_111,
|
||||
style: TextStyles.whiteShadow12_111,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -400,7 +394,7 @@ class HomeView extends GetView<HomeController> {
|
||||
child: Text(
|
||||
'课外阅读提升',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyles.boldWhiteShadow12_111,
|
||||
style: TextStyles.whiteShadow12_111,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -414,7 +408,7 @@ class HomeView extends GetView<HomeController> {
|
||||
child: Text(
|
||||
'科学兴趣培养',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyles.boldWhiteShadow12_111,
|
||||
style: TextStyles.whiteShadow12_111,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -428,7 +422,7 @@ class HomeView extends GetView<HomeController> {
|
||||
child: Text(
|
||||
'基础教学能力',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyles.boldWhiteShadow12_111,
|
||||
style: TextStyles.whiteShadow12_111,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -547,7 +541,8 @@ class HomeView extends GetView<HomeController> {
|
||||
right: 60.w,
|
||||
top: 346.h,
|
||||
child: AnimatedVisibilityWidget(
|
||||
animationWidgetBuilder: AnimatedVisibilityWidget.fadeAnimationWidgetBuilder,
|
||||
animationWidgetBuilder:
|
||||
AnimatedVisibilityWidget.fadeAnimationWidgetBuilder,
|
||||
duration: const Duration(milliseconds: 800),
|
||||
isVisible: controller.explored2.value >= 1,
|
||||
child: Visibility(
|
||||
@ -736,6 +731,7 @@ class HomeView extends GetView<HomeController> {
|
||||
}
|
||||
|
||||
Widget exploreAppWidget(ExploreApp app) {
|
||||
final imageId = 'home/${controller.availableApp.value ? app.icon : app.grayIcon}';
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
if (controller.availableApp.value) {}
|
||||
@ -743,11 +739,17 @@ class HomeView extends GetView<HomeController> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
LoadAssetImage(
|
||||
'home/${controller.availableApp.value ? app.icon : app.grayIcon}',
|
||||
height: 74.w,
|
||||
width: 74.w,
|
||||
fit: BoxFit.fill,
|
||||
AnimatedSwitcher(
|
||||
duration: kThemeAnimationDuration * 2,
|
||||
child: KeyedSubtree(
|
||||
key: ValueKey(imageId),
|
||||
child: LoadAssetImage(
|
||||
imageId,
|
||||
height: 74.w,
|
||||
width: 74.w,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
),
|
||||
const RSizedBox(height: 2),
|
||||
Text(
|
||||
|
@ -281,6 +281,12 @@ class TextStyles {
|
||||
shadows: [Shadows.txtShadow111],
|
||||
);
|
||||
|
||||
static TextStyle whiteShadow12_111 = TextStyle(
|
||||
fontSize: Dimens.font_sp12.sp,
|
||||
color: Colors.white,
|
||||
shadows: [Shadows.txtShadow111],
|
||||
);
|
||||
|
||||
static TextStyle boldWhiteShadow12_111 = TextStyle(
|
||||
fontSize: Dimens.font_sp12.sp,
|
||||
color: Colors.white,
|
||||
@ -319,6 +325,8 @@ class TextStyles {
|
||||
static TextStyle mediumWhiteShadow12_111 = TextStyle(
|
||||
fontSize: Dimens.font_sp12.sp,
|
||||
color: Colors.white,
|
||||
fontFamily: 'alph-b',
|
||||
fontWeight: FontWeight.bold,
|
||||
shadows: [Shadows.txtShadow111],
|
||||
);
|
||||
static TextStyle mediumWhite21_024 = TextStyle(
|
||||
|
Loading…
Reference in New Issue
Block a user