add rate service
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import 'package:fcs/domain/constants.dart';
|
||||
import 'package:fcs/domain/entities/box.dart';
|
||||
import 'package:fcs/domain/entities/cargo.dart';
|
||||
import 'package:fcs/domain/entities/cargo_type.dart';
|
||||
import 'package:fcs/domain/entities/package.dart';
|
||||
import 'package:fcs/domain/vo/delivery_address.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/pages/main/model/main_model.dart';
|
||||
import 'package:fcs/pages/main/util.dart';
|
||||
import 'package:fcs/pages/package/model/package_model.dart';
|
||||
import 'package:fcs/pages/rates/model/shipment_rate_model.dart';
|
||||
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
|
||||
import 'package:fcs/pages/widgets/defalut_delivery_address.dart';
|
||||
import 'package:fcs/pages/widgets/display_text.dart';
|
||||
@@ -48,7 +49,7 @@ class _BoxInfoState extends State<BoxInfo> {
|
||||
List<Package> _packages = [];
|
||||
List<Box> _mixBoxes = [];
|
||||
Box _selectedShipmentBox;
|
||||
List<Cargo> _cargoTypes = [];
|
||||
List<CargoType> _cargoTypes = [];
|
||||
DeliveryAddress _deliveryAddress = new DeliveryAddress();
|
||||
TextEditingController _widthController = new TextEditingController();
|
||||
TextEditingController _heightController = new TextEditingController();
|
||||
@@ -83,8 +84,9 @@ class _BoxInfoState extends State<BoxInfo> {
|
||||
});
|
||||
|
||||
//for shipment weight
|
||||
volumetricRatio =
|
||||
Provider.of<MainModel>(context, listen: false).setting.volumetricRatio;
|
||||
volumetricRatio = Provider.of<ShipmentRateModel>(context, listen: false)
|
||||
.rate
|
||||
.volumetricRatio;
|
||||
_lengthController.addListener(_calShipmentWeight);
|
||||
_widthController.addListener(_calShipmentWeight);
|
||||
_heightController.addListener(_calShipmentWeight);
|
||||
@@ -342,7 +344,7 @@ class _BoxInfoState extends State<BoxInfo> {
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: new Text(
|
||||
c.value.type,
|
||||
c.value.name,
|
||||
style: textStyle,
|
||||
)),
|
||||
Container(
|
||||
|
||||
Reference in New Issue
Block a user