improvements.

pull/57/head
Sikander Saleem 1 month ago
parent c35c38aeb1
commit 96cc15a441

@ -93,7 +93,9 @@ class _OnboardingScreenState extends State<OnboardingScreen> {
? CustomButton( ? CustomButton(
text: "Skip".needTranslation, text: "Skip".needTranslation,
onPressed: () => goToHomePage(), onPressed: () => goToHomePage(),
width: 86, width: 86.h,
height: 56.h,
borderRadius: 12.h,
backgroundColor: Color(0xffFEE9EA), backgroundColor: Color(0xffFEE9EA),
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
borderWidth: 0, borderWidth: 0,
@ -117,7 +119,10 @@ class _OnboardingScreenState extends State<OnboardingScreen> {
child: selectedIndex == 0 child: selectedIndex == 0
? CustomButton( ? CustomButton(
icon: AppAssets.arrow_forward, icon: AppAssets.arrow_forward,
width: 86, iconSize: 32.h,
width: 86.h,
height: 56.h,
borderRadius: 12.h,
text: "".needTranslation, text: "".needTranslation,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
onPressed: () { onPressed: () {
@ -126,7 +131,9 @@ class _OnboardingScreenState extends State<OnboardingScreen> {
: CustomButton( : CustomButton(
text: "Get Started".needTranslation, text: "Get Started".needTranslation,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: 16, fontSize: 16.h,
height: 56.h,
borderRadius: 16.h,
textOverflow: TextOverflow.ellipsis, textOverflow: TextOverflow.ellipsis,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
onPressed: () => goToHomePage(), onPressed: () => goToHomePage(),
@ -144,17 +151,21 @@ class _OnboardingScreenState extends State<OnboardingScreen> {
Widget onboardingView(String icon, String heading, String body) { Widget onboardingView(String icon, String heading, String body) {
return Column( return Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 12, spacing: 12,
children: [ children: [
Lottie.asset(icon, repeat: true, reverse: false, frameRate: FrameRate(60), width: MediaQuery.sizeOf(context).width - 50, height: MediaQuery.sizeOf(context).width - 50), Align(
12.height, alignment: Alignment.bottomCenter,
child: Lottie.asset(icon, repeat: true, reverse: false, frameRate: FrameRate(60), width: MediaQuery.sizeOf(context).width - 50, height: MediaQuery.sizeOf(context).width - 50))
.expanded,
// 12.height,
Text( Text(
heading, heading,
style: TextStyle(fontSize: 36, fontWeight: FontWeight.w600, color: AppColors.textColor, letterSpacing: -0.4, height: 1), style: TextStyle(fontSize: 36.h, fontWeight: FontWeight.w600, color: AppColors.textColor, letterSpacing: -0.4, height: 1),
), ),
Text( Text(
body, body,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500, color: AppColors.greyTextColor, letterSpacing: 0, height: 26 / 16), style: TextStyle(fontSize: 16.h, fontWeight: FontWeight.w500, color: AppColors.greyTextColor, letterSpacing: 0, height: 26 / 16),
), ),
], ],
).paddingOnly(left: 24, right: 24); ).paddingOnly(left: 24, right: 24);

@ -47,7 +47,7 @@ class _SplashAnimationScreenState extends State<SplashAnimationScreen> with Sing
backgroundColor: AppColors.whiteColor, backgroundColor: AppColors.whiteColor,
body: Stack( body: Stack(
children: [ children: [
Lottie.asset(AppAnimations.splashLaunching, controller: _controller, onLoaded: (composition) { Lottie.asset(AppAnimations.splashLaunching, controller: _controller, width: double.infinity, height: double.infinity, onLoaded: (composition) {
_controller _controller
..duration = composition.duration ..duration = composition.duration
..forward(); // Start the animation ..forward(); // Start the animation
@ -83,11 +83,11 @@ class _AnimatedScreenState extends State<AnimatedScreen> with TickerProviderStat
_controller = AnimationController(vsync: this); _controller = AnimationController(vsync: this);
_controller.addListener(() { _controller.addListener(() {
if (_controller.status == AnimationStatus.completed) { if (_controller.status == AnimationStatus.completed) {
Navigator.of(context).pushReplacement( // Navigator.of(context).pushReplacement(
FadePage( // FadePage(
page: LoginScreen(), // page: LoginScreen(),
), // ),
); // );
} }
}); });
@ -144,60 +144,60 @@ class _AnimatedScreenState extends State<AnimatedScreen> with TickerProviderStat
..forward(); // Start the animation ..forward(); // Start the animation
}, repeat: false, reverse: false, frameRate: FrameRate(60), fit: BoxFit.fill) }, repeat: false, reverse: false, frameRate: FrameRate(60), fit: BoxFit.fill)
.center, .center,
// Lottie.asset(AppAnimations.loadingAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.fill).center, Lottie.asset(AppAnimations.loadingAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.fill).center,
//
// AnimatedContainer( AnimatedContainer(
// duration: Duration(milliseconds: 500), duration: Duration(milliseconds: 500),
// width: screenSize.width, width: screenSize.width,
// height: screenSize.height, height: screenSize.height,
// color: isRipple ? AppColors.primaryRedColor : AppColors.whiteColor, color: isRipple ? AppColors.primaryRedColor : AppColors.whiteColor,
// ), ),
//
// AnimatedBuilder( AnimatedBuilder(
// animation: _moveController, animation: _moveController,
// builder: (context, child) { builder: (context, child) {
// final pos = _positionAnimation.value; final pos = _positionAnimation.value;
// return Positioned( return Positioned(
// left: (screenSize.width * .75) * (pos.dx), left: ((screenSize.width * .75) * (pos.dx)).h,
// top: (screenSize.height * 0.75) * (pos.dy), top: ((screenSize.height * 0.75) * (pos.dy)).h,
// child: Transform.rotate( child: Transform.rotate(
// angle: -120 * 3.1415927 / 150, // convert degrees to radians angle: -120 * 3.1415927 / 150, // convert degrees to radians
// child: Container( child: Container(
// width: 400, width: 400.h,
// height: 653, height: 653.h,
// decoration: BoxDecoration( decoration: BoxDecoration(
// color: Color(0xffED1C2B), color: Color(0xffED1C2B),
// borderRadius: BorderRadius.circular(330), borderRadius: BorderRadius.circular(330.h),
// ), ),
// ), ),
// ), ),
// ); );
// }, },
// ), ),
// // Expanding white circle // Expanding white circle
// AnimatedBuilder( AnimatedBuilder(
// animation: _expandController, animation: _expandController,
// builder: (context, child) { builder: (context, child) {
// return Center( return Center(
// child: Transform.scale( child: Transform.scale(
// scale: _expandAnimation.value, scale: _expandAnimation.value,
// child: Opacity( child: Opacity(
// opacity: 1.0, //- _expandAnimation.value.clamp(0.0, 1.0), opacity: 1.0, //- _expandAnimation.value.clamp(0.0, 1.0),
// child: Container( child: Container(
// decoration: const BoxDecoration( decoration: const BoxDecoration(
// color: Colors.white, color: Colors.white,
// shape: BoxShape.circle, shape: BoxShape.circle,
// // border: Border.fromBorderSide(BorderSide( // border: Border.fromBorderSide(BorderSide(
// // width: 0, // width: 0,
// // color: Color(0xffED1C2B), // color: Color(0xffED1C2B),
// // ) // )
// )), )),
// ), ),
// // ), // ),
// ), ),
// ); );
// }, },
// ), ),
// AnimatedBuilder( // AnimatedBuilder(
// animation: _expandController, // animation: _expandController,
// builder: (context, child) { // builder: (context, child) {

Loading…
Cancel
Save