87 lines
2.9 KiB
Dart
87 lines
2.9 KiB
Dart
import 'package:SEFER/constant/box_name.dart';
|
|
import 'package:animated_text_kit/animated_text_kit.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:SEFER/constant/colors.dart';
|
|
import 'package:SEFER/constant/info.dart';
|
|
import 'package:SEFER/constant/style.dart';
|
|
|
|
import 'controller/home/splash_screen_controlle.dart';
|
|
import 'main.dart';
|
|
|
|
class SplashScreen extends StatelessWidget {
|
|
final SplashScreenController splashScreenController =
|
|
Get.put(SplashScreenController());
|
|
|
|
SplashScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
// Get.put(LocationBackgroundController());
|
|
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.5
|
|
? splashScreenController.zoomInAnimation.value
|
|
: splashScreenController.zoomOutAnimation.value,
|
|
child: Image.asset(
|
|
'assets/images/logo.gif',
|
|
width: Get.width * .5,
|
|
),
|
|
);
|
|
},
|
|
);
|
|
},
|
|
),
|
|
const SizedBox(
|
|
height: 30,
|
|
),
|
|
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}',
|
|
textStyle:
|
|
AppStyle.title.copyWith(color: AppColor.primaryColor),
|
|
speed: const Duration(milliseconds: 200),
|
|
),
|
|
], isRepeatingAnimation: true),
|
|
const SizedBox(
|
|
height: 100,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
bottomNavigationBar: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Text(
|
|
box.read(BoxName.packagInfo) ?? '1.4.54',
|
|
style: AppStyle.subtitle,
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|