add rate service
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/localization/app_translations.dart';
|
||||
import 'package:fcs/pages/rates/model/shipment_rate_model.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
import 'package:fcs/pages/widgets/progress.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
@@ -38,11 +39,13 @@ class _ShipmentRatesCalState extends State<ShipmentRatesCal> {
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
leading: new IconButton(
|
||||
icon: new Icon(CupertinoIcons.back),
|
||||
icon: new Icon(CupertinoIcons.back, color: primaryColor),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
title: Text(AppTranslations.of(context).text("rate.cal.title")),
|
||||
backgroundColor: Colors.white,
|
||||
shadowColor: Colors.transparent,
|
||||
title: LocalText(context, 'rate.cal.title',
|
||||
color: primaryColor, fontSize: 20),
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
@@ -60,12 +63,11 @@ class _ShipmentRatesCalState extends State<ShipmentRatesCal> {
|
||||
child: DropdownButtonFormField(
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.white,
|
||||
hintText: shipmentRateModel.rates[0].description,
|
||||
hintText: shipmentRateModel.rate.cargoTypes[0].name,
|
||||
hintStyle: TextStyle(color: Colors.black87)),
|
||||
items: shipmentRateModel.rates
|
||||
items: shipmentRateModel.rate.cargoTypes
|
||||
.map((e) => DropdownMenuItem(
|
||||
child: Text(e.description),
|
||||
value: e.description))
|
||||
child: Text(e.name), value: e.name))
|
||||
.toList(),
|
||||
onChanged: (selected) => {
|
||||
setState(() {
|
||||
|
||||
Reference in New Issue
Block a user