dreampad/lib/app/modules/welcome/views/hello_widget.dart

72 lines
2.1 KiB
Dart
Raw Permalink Normal View History

2023-11-29 20:37:45 +08:00
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(
2023-11-30 16:36:14 +08:00
padding: EdgeInsets.only(bottom: 8.h),
child: Images.welcomeFirstLine,
2023-11-29 20:37:45 +08:00
),
Padding(
2023-11-30 16:36:14 +08:00
padding: EdgeInsets.only(bottom: 8.h),
child: Images.welcomeSecondLine,
2023-11-29 20:37:45 +08:00
),
Padding(
2023-11-30 16:36:14 +08:00
padding: EdgeInsets.only(bottom: 8.h),
child: Images.welcomeThirdLine,
2023-11-29 20:37:45 +08:00
),
2023-11-30 16:36:14 +08:00
Images.welcomeFourthLine,
2023-11-29 20:37:45 +08:00
],
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,
],
),
),
),
),
),
),
],
);
}
);
}
}