POS Grosir Dutra Store: update kasir/produk/riwayat/pengaturan + offline queue

This commit is contained in:
onie
2026-10-17 06:38:50 +07:00
parent bec02d196c
commit 0121eca8bb
15 changed files with 1202 additions and 524 deletions

View File

@@ -1,3 +1,5 @@
import 'package:uuid/uuid.dart';
class Product {
final String id;
final String name;
@@ -19,6 +21,17 @@ class Product {
this.hargaPokok = 0,
});
factory Product.manual(String name, double price) {
return Product(
id: 'manual-${const Uuid().v4()}',
name: name,
price: price,
stock: 99999,
minStock: 0,
hargaPokok: 0,
);
}
factory Product.fromJson(Map<String, dynamic> json) {
return Product(
id: json['id'] as String,