refactored welcome string to splash screen
This commit is contained in:
@@ -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';
|
||||
|
@@ -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<WelcomeScreen> createState() => _WelcomeScreenState();
|
||||
State<SplashScreen> createState() => _SplashScreenState();
|
||||
}
|
||||
|
||||
class _WelcomeScreenState extends State<WelcomeScreen> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
// Automatically go to logizn after 4 seconds
|
||||
Timer(const Duration(seconds: 4), () {
|
||||
widget.onContinue();
|
||||
});
|
||||
}
|
||||
|
||||
class _SplashScreenState extends State<SplashScreen> {
|
||||
@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,
|
Reference in New Issue
Block a user