scan to list working fine
This commit is contained in:
+8
-4
@@ -1,19 +1,23 @@
|
||||
/// Application entry point: a single receipt-capture screen.
|
||||
/// 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(const ReceipityApp());
|
||||
runApp(ReceipityApp());
|
||||
}
|
||||
|
||||
class ReceipityApp extends StatelessWidget {
|
||||
const ReceipityApp({super.key});
|
||||
ReceipityApp({super.key, ProductRepository? repository})
|
||||
: repository = repository ?? ProductRepository();
|
||||
|
||||
final ProductRepository repository;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -22,7 +26,7 @@ class ReceipityApp extends StatelessWidget {
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: AppTheme.light(),
|
||||
darkTheme: AppTheme.dark(),
|
||||
home: const ScanScreen(),
|
||||
home: ScanScreen(repository: repository),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user