diff --git a/lib/config/routes.dart b/lib/config/routes.dart index 10c4d01..728a57d 100644 --- a/lib/config/routes.dart +++ b/lib/config/routes.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:kmobile/features/auth/screens/mpin_screen.dart'; +import 'package:kmobile/features/auth/screens/splash_screen.dart'; import '../app.dart'; import '../features/auth/screens/login_screen.dart'; // import '../features/auth/screens/forgot_password_screen.dart'; diff --git a/lib/features/auth/screens/welcome_screen.dart b/lib/features/auth/screens/splash_screen.dart similarity index 61% rename from lib/features/auth/screens/welcome_screen.dart rename to lib/features/auth/screens/splash_screen.dart index 5b3d5e0..b942963 100644 --- a/lib/features/auth/screens/welcome_screen.dart +++ b/lib/features/auth/screens/splash_screen.dart @@ -1,70 +1,51 @@ import '../../../l10n/app_localizations.dart'; import 'package:flutter/material.dart'; -import 'dart:async'; -class WelcomeScreen extends StatefulWidget { - final VoidCallback onContinue; - - const WelcomeScreen({super.key, required this.onContinue}); +class SplashScreen extends StatefulWidget { + const SplashScreen({super.key}); @override - State createState() => _WelcomeScreenState(); + State createState() => _SplashScreenState(); } -class _WelcomeScreenState extends State { - @override - void initState() { - super.initState(); - - // Automatically go to logizn after 4 seconds - Timer(const Duration(seconds: 4), () { - widget.onContinue(); - }); - } - +class _SplashScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( body: Stack( children: [ - /// 🔹 Background Image Positioned.fill( child: Image.asset( 'assets/images/kconnect2.webp', fit: BoxFit.cover, ), ), - - /// 🔹 Centered Text Overlay Center( child: Column( mainAxisSize: MainAxisSize.min, children: [ Text( AppLocalizations.of(context).kconnect, - style: TextStyle( + style: const TextStyle( fontSize: 36, fontWeight: FontWeight.bold, - color: Theme.of(context).dialogBackgroundColor, - letterSpacing: 1.5, + color: Color(0xFFFFFFFF), ), ), const SizedBox(height: 12), Text( AppLocalizations.of(context).kccBankFull, textAlign: TextAlign.center, - style: TextStyle( + style: const TextStyle( fontSize: 18, - color: Theme.of(context).dialogBackgroundColor, + color: Color(0xFFFFFFFF), letterSpacing: 1.2, ), ), ], ), ), - - /// 🔹 Loading Spinner at Bottom Positioned( bottom: 40, left: 0,