improvements.

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

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

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

Loading…
Cancel
Save