add FCS UI
This commit is contained in:
36
lib/pages/carton_size/model/carton_size_model.dart
Normal file
36
lib/pages/carton_size/model/carton_size_model.dart
Normal 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 {}
|
||||
}
|
||||
Reference in New Issue
Block a user