36 lines
1.0 KiB
Dart
36 lines
1.0 KiB
Dart
import 'package:cashumit/screens/config_screen.dart';
|
|
import 'package:cashumit/screens/transaction_screen.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:cashumit/screens/receipt_screen.dart';
|
|
import 'package:cashumit/utils/store_logo_utils.dart';
|
|
|
|
void main() async {
|
|
// Ensure WidgetsFlutterBinding is initialized for async operations
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
// Initialize the store logo from asset
|
|
await copyAndSaveStoreLogoFromAsset('assets/images/store_logo.png');
|
|
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'Cashumit',
|
|
theme: ThemeData(
|
|
primarySwatch: Colors.blue,
|
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
|
),
|
|
initialRoute: '/',
|
|
routes: {
|
|
'/': (context) => const ReceiptScreen(),
|
|
'/transaction': (context) => const TransactionScreen(),
|
|
'/config': (context) => const ConfigScreen(),
|
|
},
|
|
);
|
|
}
|
|
} |