115 lines
3.9 KiB
Dart
115 lines
3.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../../routes/app_routes.dart';
|
|
|
|
class WelcomeScreen extends StatelessWidget {
|
|
const WelcomeScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: const Color(0xFF2F5BEA),
|
|
body: SafeArea(
|
|
child: Center(
|
|
child: SingleChildScrollView(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
// --- 1. LOGO POLIJE ---
|
|
Container(
|
|
decoration: const BoxDecoration(color: Colors.transparent),
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(10),
|
|
child: Image.asset(
|
|
'assets/images/logopolije.png',
|
|
height: 140,
|
|
width: 140,
|
|
fit: BoxFit.contain,
|
|
filterQuality: FilterQuality.high,
|
|
errorBuilder: (context, error, stackTrace) {
|
|
return const Icon(
|
|
Icons.school,
|
|
size: 80,
|
|
color: Colors.white,
|
|
);
|
|
},
|
|
),
|
|
),
|
|
),
|
|
|
|
const SizedBox(height: 30),
|
|
|
|
const Text(
|
|
'Welcome',
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 34,
|
|
fontWeight: FontWeight.bold,
|
|
letterSpacing: 1.2,
|
|
),
|
|
),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
const Text(
|
|
'Sistem Keamanan Patroli Polije',
|
|
style: TextStyle(color: Colors.white70, fontSize: 16),
|
|
),
|
|
|
|
const SizedBox(height: 50),
|
|
|
|
// --- LOGIN BUTTON ---
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 40),
|
|
child: ElevatedButton(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: Colors.white,
|
|
foregroundColor: const Color(0xFF2F5BEA),
|
|
minimumSize: const Size(double.infinity, 55),
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(30),
|
|
),
|
|
),
|
|
onPressed:
|
|
() => Navigator.pushNamed(context, AppRoutes.login),
|
|
child: const Text(
|
|
'LOGIN',
|
|
style: TextStyle(fontWeight: FontWeight.bold),
|
|
),
|
|
),
|
|
),
|
|
|
|
const SizedBox(height: 15),
|
|
|
|
// --- SIGN UP BUTTON ---
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 40),
|
|
child: OutlinedButton(
|
|
style: OutlinedButton.styleFrom(
|
|
foregroundColor: Colors.white,
|
|
side: const BorderSide(color: Colors.white, width: 2),
|
|
minimumSize: const Size(double.infinity, 55),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(30),
|
|
),
|
|
),
|
|
onPressed:
|
|
() => Navigator.pushNamed(context, AppRoutes.register),
|
|
child: const Text(
|
|
'SIGN UP',
|
|
style: TextStyle(fontWeight: FontWeight.bold),
|
|
),
|
|
),
|
|
),
|
|
|
|
// Jarak bawah agar posisi tombol tidak terlalu mepet ke ujung layar
|
|
const SizedBox(height: 20),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|