
- Tambahkan kontroler untuk manajemen data pengaduan - Buat tampilan PengaduanView untuk menampilkan daftar pengaduan - Perbarui navigasi dengan menambahkan tab dan item baru untuk pengaduan - Tambahkan logika untuk menghitung dan menampilkan jumlah pengaduan yang diproses - Integrasikan fitur pengaduan ke dalam drawer dan bottom navigation bar
84 lines
2.4 KiB
Dart
84 lines
2.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:penyaluran_app/app/routes/app_pages.dart';
|
|
import 'package:penyaluran_app/app/theme/app_theme.dart';
|
|
|
|
class SplashView extends StatefulWidget {
|
|
const SplashView({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<SplashView> createState() => _SplashViewState();
|
|
}
|
|
|
|
class _SplashViewState extends State<SplashView> {
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_navigateToLogin();
|
|
}
|
|
|
|
_navigateToLogin() async {
|
|
await Future.delayed(const Duration(seconds: 2));
|
|
Get.offAllNamed(Routes.login);
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Container(
|
|
decoration: BoxDecoration(
|
|
gradient: AppTheme.primaryGradient,
|
|
),
|
|
child: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Image.asset(
|
|
'assets/images/logo.png',
|
|
width: 120,
|
|
height: 120,
|
|
errorBuilder: (context, error, stackTrace) {
|
|
return Container(
|
|
width: 120,
|
|
height: 120,
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(20),
|
|
),
|
|
child: const Icon(
|
|
Icons.people,
|
|
size: 60,
|
|
color: AppTheme.primaryColor,
|
|
),
|
|
);
|
|
},
|
|
),
|
|
const SizedBox(height: 24),
|
|
const Text(
|
|
'Aplikasi Penyaluran',
|
|
style: TextStyle(
|
|
fontSize: 24,
|
|
fontWeight: FontWeight.bold,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
const SizedBox(height: 8),
|
|
const Text(
|
|
'Bantuan Sosial',
|
|
style: TextStyle(
|
|
fontSize: 18,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
const SizedBox(height: 48),
|
|
const CircularProgressIndicator(
|
|
valueColor: AlwaysStoppedAnimation<Color>(Colors.white),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|