53 lines
1.3 KiB
Dart
53 lines
1.3 KiB
Dart
// lib/page/splash_screen.dart
|
|
import 'package:flutter/material.dart';
|
|
import 'dart:async';
|
|
|
|
class SplashScreen extends StatefulWidget {
|
|
final VoidCallback onInitializationComplete;
|
|
|
|
const SplashScreen({super.key, required this.onInitializationComplete});
|
|
|
|
@override
|
|
State<SplashScreen> createState() => _SplashScreenState();
|
|
}
|
|
|
|
class _SplashScreenState extends State<SplashScreen> {
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_startDelay();
|
|
}
|
|
|
|
void _startDelay() {
|
|
Timer(const Duration(seconds: 3), () {
|
|
widget.onInitializationComplete();
|
|
});
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return const Scaffold(
|
|
backgroundColor: Color(0xFFFFF6F9),
|
|
body: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Icon(Icons.content_cut, size: 100, color: Color(0xFFF06292)),
|
|
SizedBox(height: 20),
|
|
Text(
|
|
'Salon Booking',
|
|
style: TextStyle(
|
|
fontSize: 26,
|
|
fontWeight: FontWeight.bold,
|
|
color: Color(0xFF880E4F),
|
|
),
|
|
),
|
|
SizedBox(height: 10),
|
|
CircularProgressIndicator(color: Color(0xFFF06292)),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|