叶子显示顺序跳转

This commit is contained in:
yuanjunyao 2023-12-02 10:39:11 +08:00
parent a616102694
commit c6a97771ca
2 changed files with 10 additions and 10 deletions

View File

@ -183,7 +183,7 @@ class HomeView extends GetView<HomeController> {
Widget goalWidget() { Widget goalWidget() {
return Stack( return Stack(
children: [ children: [
controller.explored2.value >= 4 controller.explored2.value >= 1
? Positioned( ? Positioned(
left: 15.w, left: 15.w,
top: 20.h, top: 20.h,
@ -195,7 +195,7 @@ class HomeView extends GetView<HomeController> {
), ),
) )
: Container(), : Container(),
controller.explored2.value >= 3 controller.explored2.value >= 2
? Positioned( ? Positioned(
left: 352.w, left: 352.w,
top: 0.0, top: 0.0,
@ -207,7 +207,7 @@ class HomeView extends GetView<HomeController> {
), ),
) )
: Container(), : Container(),
controller.explored2.value >= 2 controller.explored2.value >= 3
? Positioned( ? Positioned(
left: 363.w, left: 363.w,
top: 180.h, top: 180.h,
@ -476,7 +476,7 @@ class HomeView extends GetView<HomeController> {
), ),
), ),
), ),
controller.explored2.value >= 4 controller.explored2.value >= 1
? Positioned( ? Positioned(
left: 15.w, left: 15.w,
top: 20.h, top: 20.h,
@ -495,7 +495,7 @@ class HomeView extends GetView<HomeController> {
), ),
) )
: Container(), : Container(),
controller.explored2.value >= 3 controller.explored2.value >= 2
? Positioned( ? Positioned(
left: 352.w, left: 352.w,
top: 0.0, top: 0.0,
@ -517,7 +517,7 @@ class HomeView extends GetView<HomeController> {
), ),
) )
: Container(), : Container(),
controller.explored2.value >= 2 controller.explored2.value >= 3
? Positioned( ? Positioned(
left: 363.w, left: 363.w,
top: 180.h, top: 180.h,
@ -536,7 +536,7 @@ class HomeView extends GetView<HomeController> {
), ),
) )
: Container(), : Container(),
controller.explored2.value >= 1 ? firstLeafWidget() : Container(), controller.explored2.value >= 4 ? firstLeafWidget() : Container(),
Positioned( Positioned(
right: 60.w, right: 60.w,
top: 346.h, top: 346.h,
@ -544,9 +544,9 @@ class HomeView extends GetView<HomeController> {
animationWidgetBuilder: animationWidgetBuilder:
AnimatedVisibilityWidget.fadeAnimationWidgetBuilder, AnimatedVisibilityWidget.fadeAnimationWidgetBuilder,
duration: const Duration(milliseconds: 800), duration: const Duration(milliseconds: 800),
isVisible: controller.explored2.value >= 1, isVisible: controller.explored2.value >= 4,
child: Visibility( child: Visibility(
visible: controller.explored2.value >= 1, visible: controller.explored2.value >= 4,
child: const LanternWidget( child: const LanternWidget(
brightCount: 0, brightCount: 0,
), ),

View File

@ -13,7 +13,7 @@ class LanternWidget extends GetView {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ShowUp( return ShowUp(
duration: const Duration(seconds: 2), duration: const Duration(seconds: 1, milliseconds: 500),
child: Container( child: Container(
height: 90.h, height: 90.h,
width: 180.w, width: 180.w,