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的模板 class FirstTimeDialog extends StatelessWidget { const FirstTimeDialog({ super.key, }); @override Widget build(BuildContext context) { return HookBuilder( builder: (context) { final isTextShown = useState(false); return GestureDetector( behavior: HitTestBehavior.translucent, onTap: isTextShown.value ? () { SmartDialog.dismiss(result: true); }: null, child: Stack( children: [ Center( child: AnimatedColumnWidget( mainAxisSize: MainAxisSize.min, onDone: () { 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, ), ), ], ), ), Positioned( bottom: 32, left: 0, right: 0, child: AnimatedVisibilityWidget( animationWidgetBuilder: AnimatedVisibilityWidget.fadeAnimationWidgetBuilder, isVisible: isTextShown.value, child: const Center( child: TouchHintWidget(), ), ), ), ], ), ); } ); } }