dreampad/lib/app/modules/welcome/views/hello_widget.dart
2023-11-29 20:37:45 +08:00

87 lines
2.6 KiB
Dart

import 'package:dreampad/app/shared/shared.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class HelloWidget extends StatelessWidget {
const HelloWidget({
super.key,
});
@override
Widget build(BuildContext context) {
return HookBuilder(
builder: (context) {
final isTextShown = useState(false);
return Stack(
children: [
Positioned(
left: 0,
top: 180.h,
right: 0,
child: AnimatedColumnWidget(
children: [
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(
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,
),
),
],
onDone: () {
isTextShown.value = true;
},
),
),
Positioned(
left: 0,
right: 0,
bottom: 5.h,
child: Center(
child: AnimatedVisibilityWidget(
animationWidgetBuilder: AnimatedVisibilityWidget.fadeAnimationWidgetBuilder,
isVisible: isTextShown.value,
child: IgnorePointer(
ignoring: !isTextShown.value,
child: SwipeNextPageHandler(
child: Column(
children: [
Images.up,
Images.welcomeBegin,
],
),
),
),
),
),
),
],
);
}
);
}
}