33 lines
819 B
Dart
33 lines
819 B
Dart
/// Application entry point: capture a receipt, review line items, save products.
|
|
library;
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'scan_screen.dart';
|
|
import 'services/product_repository.dart';
|
|
import 'utils/app_theme.dart';
|
|
import 'utils/constants.dart';
|
|
|
|
void main() {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
runApp(ReceipityApp());
|
|
}
|
|
|
|
class ReceipityApp extends StatelessWidget {
|
|
ReceipityApp({super.key, ProductRepository? repository})
|
|
: repository = repository ?? ProductRepository();
|
|
|
|
final ProductRepository repository;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: kAppName,
|
|
debugShowCheckedModeBanner: false,
|
|
theme: AppTheme.light(),
|
|
darkTheme: AppTheme.dark(),
|
|
home: ScanScreen(repository: repository),
|
|
);
|
|
}
|
|
}
|