11/1/6
This commit is contained in:
66
lib/splash_screen_page.dart
Normal file
66
lib/splash_screen_page.dart
Normal file
@@ -0,0 +1,66 @@
|
||||
import 'package:animated_text_kit/animated_text_kit.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_stripe/flutter_stripe.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/colors.dart';
|
||||
import 'package:ride/constant/info.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
|
||||
import 'controller/home/splash_screen_controlle.dart';
|
||||
|
||||
class SplashScreen extends StatelessWidget {
|
||||
final SplashScreenController splashScreenController =
|
||||
Get.put(SplashScreenController());
|
||||
|
||||
SplashScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor:
|
||||
AppColor.primaryColor, // 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.png'),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
AnimatedTextKit(animatedTexts: [
|
||||
TypewriterAnimatedText(
|
||||
'Welcome to ${AppInformation.appName}',
|
||||
textStyle:
|
||||
AppStyle.headTitle.copyWith(color: AppColor.greenColor),
|
||||
speed: const Duration(milliseconds: 200),
|
||||
),
|
||||
], isRepeatingAnimation: true),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
AnimatedTextKit(animatedTexts: [
|
||||
TypewriterAnimatedText(
|
||||
'Powered By ${AppInformation.companyName}',
|
||||
textStyle:
|
||||
AppStyle.title.copyWith(color: AppColor.secondaryColor),
|
||||
speed: const Duration(milliseconds: 200),
|
||||
),
|
||||
], isRepeatingAnimation: true)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user