add rate service

This commit is contained in:
Sai Naw Wun
2020-10-15 03:06:13 +06:30
parent 7b88658893
commit 47c07a6c88
45 changed files with 870 additions and 496 deletions

View File

@@ -2,8 +2,8 @@ import 'dart:async';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:fcs/domain/constants.dart';
import 'package:fcs/domain/entities/cargo.dart';
import 'package:fcs/domain/entities/pickup.dart';
import 'package:fcs/domain/entities/cargo_type.dart';
import 'package:fcs/domain/entities/shipment.dart';
import 'package:fcs/domain/vo/radio.dart';
import 'package:fcs/pages/main/model/base_model.dart';
import 'package:logging/logging.dart';
@@ -78,9 +78,9 @@ class ShipmentModel extends BaseModel {
isCourier: true,
radioIndex: 2,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200125 - 12 May 2020",
@@ -95,9 +95,9 @@ class ShipmentModel extends BaseModel {
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200441 - 13 Apr 2020",
@@ -113,9 +113,9 @@ class ShipmentModel extends BaseModel {
handlingFee: 50,
radioIndex: 3,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200412 - 12 Apr 2020",
@@ -130,9 +130,9 @@ class ShipmentModel extends BaseModel {
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200125 - 12 May 2020",
@@ -147,9 +147,9 @@ class ShipmentModel extends BaseModel {
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200441 - 13 Apr 2020",
@@ -164,9 +164,9 @@ class ShipmentModel extends BaseModel {
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200441 - 10 Apr 2020",
@@ -181,9 +181,9 @@ class ShipmentModel extends BaseModel {
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200441 - 6 Apr 2020",
@@ -198,9 +198,9 @@ class ShipmentModel extends BaseModel {
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
];
return pickups;
@@ -222,9 +222,9 @@ class ShipmentModel extends BaseModel {
isCourier: true,
radioIndex: 2,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200125 - 12 May 2020",
@@ -239,9 +239,9 @@ class ShipmentModel extends BaseModel {
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200441 - 13 Apr 2020",
@@ -257,9 +257,9 @@ class ShipmentModel extends BaseModel {
handlingFee: 50,
radioIndex: 3,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200412 - 12 Apr 2020",
@@ -274,9 +274,9 @@ class ShipmentModel extends BaseModel {
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200125 - 12 May 2020",
@@ -291,9 +291,9 @@ class ShipmentModel extends BaseModel {
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200441 - 13 Apr 2020",
@@ -308,9 +308,9 @@ class ShipmentModel extends BaseModel {
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200441 - 10 Apr 2020",
@@ -325,9 +325,9 @@ class ShipmentModel extends BaseModel {
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
Shipment(
id: "S200441 - 6 Apr 2020",
@@ -342,9 +342,9 @@ class ShipmentModel extends BaseModel {
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
CargoType(name: 'General Cargo', weight: 25),
CargoType(name: 'Medicine', weight: 20),
CargoType(name: 'Dangerous Cargo', weight: 30)
]),
];