2023-11-28 10:44:58 +08:00
|
|
|
import 'package:dreampad/app/shared/shared.dart';
|
2023-11-29 20:37:45 +08:00
|
|
|
import 'package:dreampad/app/shared/widgets/touch_hint_widget.dart';
|
2023-11-28 10:44:58 +08:00
|
|
|
import 'package:flutter/material.dart';
|
2023-11-29 20:37:45 +08:00
|
|
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
2023-11-28 10:44:58 +08:00
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
2023-11-29 20:37:45 +08:00
|
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
2023-11-28 10:44:58 +08:00
|
|
|
|
|
|
|
/// 首次dialog的模板
|
|
|
|
class FirstTimeDialog extends StatelessWidget {
|
|
|
|
const FirstTimeDialog({
|
|
|
|
super.key,
|
|
|
|
});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2023-11-29 20:37:45 +08:00
|
|
|
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(
|
|
|
|
isVisible: isTextShown.value,
|
|
|
|
child: const Center(
|
|
|
|
child: TouchHintWidget(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
2023-11-28 10:44:58 +08:00
|
|
|
),
|
2023-11-29 20:37:45 +08:00
|
|
|
);
|
|
|
|
}
|
2023-11-28 10:44:58 +08:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|