add FCS UI

This commit is contained in:
Thinzar Win
2020-12-01 19:02:21 +06:30
parent a2c9e41f55
commit 230e6f9e66
24 changed files with 2121 additions and 245 deletions

View File

@@ -0,0 +1,36 @@
import 'dart:async';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:fcs/domain/entities/carton_size.dart';
import 'package:fcs/pages/main/model/base_model.dart';
import 'package:logging/logging.dart';
class CartonSizeModel extends BaseModel {
List<CartonSize> cartonSizes = [];
final log = Logger('CartonSizeModel');
StreamSubscription<QuerySnapshot> listener;
void initUser(user) {
super.initUser(user);
cartonSizes = [
CartonSize(
id: "1", name: "FCS Small Box", length: 16, width: 12, height: 12),
CartonSize(
id: "2", name: "FCS Medium Box", length: 22, width: 16, height: 15),
CartonSize(
id: "3", name: "FCS Large Box", length: 28, width: 15, height: 16)
];
}
@override
logout() async {
if (listener != null) await listener.cancel();
cartonSizes = [];
}
Future<void> addCartonSize(CartonSize cartonSize) async {}
Future<void> deleteCartonSize(String id) async {}
}