
- Tambahkan tema aplikasi di AppTheme - Ganti font default dengan DM Sans dari aset - Buat komponen kustom seperti StatisticCard, NavigationButton, dan StatusPill - Perbarui desain drawer, bottom navigation, dan elemen dashboard - Gunakan gradient dan warna tema yang konsisten - Sederhanakan struktur kode dan styling
37 lines
952 B
Dart
37 lines
952 B
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/services/supabase_service.dart';
|
|
import 'package:penyaluran_app/app/theme/app_theme.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
// Inisialisasi Supabase
|
|
await initServices();
|
|
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
// Inisialisasi service
|
|
Future<void> initServices() async {
|
|
await Get.putAsync(() => SupabaseService().init());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GetMaterialApp(
|
|
title: 'Penyaluran App',
|
|
theme: AppTheme.lightTheme,
|
|
darkTheme: AppTheme.darkTheme,
|
|
themeMode: ThemeMode.light, // Default ke tema terang
|
|
debugShowCheckedModeBanner: false,
|
|
initialRoute: AppPages.initial,
|
|
getPages: AppPages.routes,
|
|
);
|
|
}
|
|
}
|