This commit is contained in:
Hamza-Ayed
2024-12-24 17:35:15 +03:00
parent 1e0e4a5b48
commit 1cbf0183d1
56 changed files with 3081 additions and 2560 deletions

View File

@@ -18,65 +18,195 @@ class SplashScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor:
AppColor.secondaryColor, // Set your desired background color
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GetBuilder<SplashScreenController>(
builder: (_) {
return AnimatedBuilder(
animation: splashScreenController.animationController,
builder: (BuildContext context, Widget? child) {
return Transform.scale(
scale:
splashScreenController.animationController.value < 0.2
? splashScreenController.zoomInAnimation.value
: splashScreenController.zoomOutAnimation.value,
child: Image.asset(
'assets/images/logo.gif',
width: Get.width * .5,
body: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
AppColor.primaryColor,
// AppColor.primaryColor,
AppColor.secondaryColor,
AppColor.secondaryColor,
],
),
),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GetBuilder<SplashScreenController>(
builder: (_) {
return ScaleTransition(
scale: splashScreenController.animation,
child: FadeTransition(
opacity: splashScreenController.animation,
child: Column(
children: [
DefaultTextStyle(
style: AppStyle.headTitle.copyWith(
color: AppColor.primaryColor,
fontSize: 48,
fontWeight: FontWeight.bold,
),
child: AnimatedTextKit(
animatedTexts: [
WavyAnimatedText(
AppInformation.appName,
speed: const Duration(milliseconds: 200),
),
],
isRepeatingAnimation: false,
onFinished: () {
// Trigger any additional animations here
},
),
),
const SizedBox(height: 20),
DefaultTextStyle(
style: AppStyle.title.copyWith(
color: AppColor.writeColor.withOpacity(0.8),
fontSize: 18,
),
child: AnimatedTextKit(
animatedTexts: [
TyperAnimatedText(
'Your Journey Begins Here'.tr,
speed: const Duration(milliseconds: 100),
),
],
isRepeatingAnimation: false,
),
),
],
),
);
},
);
},
),
AnimatedTextKit(animatedTexts: [
TypewriterAnimatedText(
'Welcome to ${AppInformation.appName}',
textStyle:
AppStyle.headTitle2.copyWith(color: AppColor.writeColor),
speed: const Duration(milliseconds: 200),
),
);
},
),
], isRepeatingAnimation: true),
const SizedBox(
height: 20,
),
AnimatedTextKit(animatedTexts: [
TypewriterAnimatedText(
'Powered By ${AppInformation.appName} LLC',
textStyle:
AppStyle.title.copyWith(color: AppColor.primaryColor),
speed: const Duration(milliseconds: 200),
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 40, vertical: 20),
child: Column(
children: [
Obx(() => LinearProgressIndicator(
value: splashScreenController.progress.value,
backgroundColor: AppColor.writeColor.withOpacity(0.2),
valueColor: AlwaysStoppedAnimation<Color>(
AppColor.primaryColor),
minHeight: 3,
)),
const SizedBox(height: 16),
Text(
'Version: ${box.read(BoxName.packagInfo) ?? '1.0.0'}',
style: AppStyle.subtitle.copyWith(
color: AppColor.writeColor.withOpacity(0.6),
),
),
const SizedBox(height: 20),
],
),
),
], isRepeatingAnimation: false),
const SizedBox(
height: 100,
),
],
],
),
),
),
bottomNavigationBar: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
box.read(BoxName.packagInfo) ?? '1.4.61',
style: AppStyle.subtitle,
bottomNavigationBar: Padding(
padding: const EdgeInsets.only(bottom: 16.0),
child: Text(
'Version: ${box.read(BoxName.packagInfo) ?? '1.0.0'}',
style: AppStyle.subtitle.copyWith(
color: AppColor.writeColor.withOpacity(0.6),
),
],
textAlign: TextAlign.center,
),
),
);
}
}
// class SplashScreen extends StatelessWidget {
// final SplashScreenController splashScreenController =
// Get.put(SplashScreenController());
// SplashScreen({super.key});
// @override
// Widget build(BuildContext context) {
// return Scaffold(
// // Using a Container with BoxDecoration for gradient background
// body: Container(
// decoration: const BoxDecoration(
// gradient: LinearGradient(
// begin: Alignment.topCenter,
// end: Alignment.bottomCenter,
// colors: [
// AppColor.primaryColor,
// AppColor.secondaryColor,
// ],
// ),
// ),
// child: Center(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// GetBuilder<SplashScreenController>(
// builder: (_) {
// return ScaleTransition(
// scale: splashScreenController.animation,
// child: FadeTransition(
// opacity: splashScreenController.animation,
// child: Image.asset(
// 'assets/images/logo.gif',
// width: Get.width * 0.4, // Slightly smaller logo
// ),
// ),
// );
// },
// ),
// const SizedBox(height: 20),
// DefaultTextStyle(
// style: AppStyle.headTitle2.copyWith(color: AppColor.writeColor),
// textAlign: TextAlign.center,
// child: AnimatedTextKit(
// animatedTexts: [
// FadeAnimatedText(AppInformation.appName,
// duration: const Duration(milliseconds: 1000)),
// ],
// isRepeatingAnimation: false, // Only animate once
// pause: const Duration(milliseconds: 500),
// ),
// ),
// const SizedBox(height: 8),
// DefaultTextStyle(
// style: AppStyle.title
// .copyWith(color: AppColor.writeColor.withOpacity(0.8)),
// textAlign: TextAlign.center,
// child: AnimatedTextKit(
// animatedTexts: [
// FadeAnimatedText('Powered By ${AppInformation.appName}',
// duration: const Duration(milliseconds: 1000)),
// ],
// isRepeatingAnimation: false, // Only animate once
// pause: const Duration(milliseconds: 500),
// ),
// ),
// ],
// ),
// ),
// ),
// bottomNavigationBar: Padding(
// padding: const EdgeInsets.only(bottom: 16.0),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Text(
// 'Version: ${box.read(BoxName.packagInfo) ?? '1.0.0'}', // More descriptive label
// style: AppStyle.subtitle
// .copyWith(color: AppColor.writeColor.withOpacity(0.6)),
// ),
// ],
// ),
// ),
// );
// }
// }