diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index bf3066c..ae67253 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index bb99b14..625aeb2 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index d556134..eda3079 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index ead4172..ff6f0da 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 755e8fa..be668f6 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/images/appbgsuplier.png b/images/appbgsuplier.png index 0a54516..fc15e07 100644 Binary files a/images/appbgsuplier.png and b/images/appbgsuplier.png differ diff --git a/images/appiconn.png b/images/appiconn.png index bc865cd..55fa562 100644 Binary files a/images/appiconn.png and b/images/appiconn.png differ diff --git a/images/no_data.png b/images/no_data.png index 4665755..27c28a4 100644 Binary files a/images/no_data.png and b/images/no_data.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index eeec2df..1a6bf7b 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index 1b999f8..f7c6aea 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 9f478c7..d2b58c1 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index 32f6714..2f790a4 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index d7b00b5..3c34c2c 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index 7805055..1462d8f 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index 22a0652..9842996 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 9f478c7..d2b58c1 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index f2ea83d..b86365d 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index f0c2d1f..346de13 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png index 11be394..217e835 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png index cd2afd2..98e4bb4 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png index 63964a7..972b7f4 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png index 7da2130..e7c7941 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index f0c2d1f..346de13 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index c5a3a30..6d1449a 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png index 0ac287d..e803194 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png index bcc0b0f..fc29f2a 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index 8ece260..e765612 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 3189776..bdaca89 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index 1751457..55f283d 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/lib/addtankers.dart b/lib/addtankers.dart index f781606..baf884c 100644 --- a/lib/addtankers.dart +++ b/lib/addtankers.dart @@ -21,6 +21,8 @@ class _AddTankersState extends State { TextEditingController tankerDrinkingPriceController = TextEditingController(); TextEditingController tankerBorePriceController = TextEditingController(); TextEditingController tankerCapacityController = TextEditingController(); + TextEditingController tankerPriceController = TextEditingController(); + bool isCapacityText = false; @@ -48,16 +50,16 @@ class _AddTankersState extends State { bool isPriceDrinking = false; bool isPriceBore = false;*/ - List waterTypes = []; List waterPrice = []; List updateWaterTypes = []; late TabController _controller; - String dropdownTypeOfWater = 'Bore water'; + String dropdownTypeOfWaterForUpadetBore = 'Bore water'; String dropdownTypeOfWaterForTanker = 'Drinking'; + String dropdownTypeOfWater = 'Bore water'; var typeOfWaterItems = [ 'Bore water', 'Drinking Water', @@ -236,40 +238,94 @@ class _AddTankersState extends State { SizedBox( height: 5, ), - Visibility( - visible: false, //isCapacityText - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - TextButton( - child: const Text( - 'Add Capacity', - style: TextStyle( - fontSize: 15, - decoration: TextDecoration.underline, - color: primaryColor), - ), - onPressed: () { - // showCapacityDialog(); - }, + + + + + Container( + padding: const EdgeInsets.fromLTRB(10, 10, 10, 0), + child: DropdownButtonFormField( + // Initial Value + value: dropdownTypeOfWater, + isExpanded: true, + decoration: const InputDecoration( + prefixIcon: Icon( + Icons.water, + color: greyColor, ), - /* Text('Add Capacity'), - IconButton( - iconSize: 20, - icon: const Icon( - Icons.add, - color: primaryColor, - ), - onPressed: () { - showCapacityDialog(); - }, - ),*/ - ], + border: OutlineInputBorder( + borderSide: BorderSide(color: greyColor)), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: greyColor), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: greyColor), + ), + labelText: 'Type of water storage', + labelStyle: TextStyle( + color: greyColor, //<-- SEE HERE + ), + ), + + hint: Text('Select Type of water'), + // Down Arrow Icon + icon: const Icon(Icons.keyboard_arrow_down), + + // Array list of items + items: typeOfWaterItems.map((String items) { + return DropdownMenuItem( + value: items, + child: Text(items), + ); + }).toList(), + // After selecting the desired option,it will + // change button value to selected value + onChanged: (String? newValue) { + setState(() { + dropdownTypeOfWater = newValue!; + }); + }, ), ), - SizedBox( + const SizedBox( + height: 30, + ), + + + + + Container( + padding: const EdgeInsets.all(10), + child: TextFormField( + cursorColor: greyColor, + controller:tankerPriceController, + keyboardType: TextInputType.number, + maxLength: 10, + decoration: const InputDecoration( + prefixIcon: Icon( + Icons.currency_rupee, + color: greyColor, + ), + border: OutlineInputBorder( + borderSide: BorderSide(color: greyColor)), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: greyColor), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: greyColor), + ), + labelText: 'Enter Price', + labelStyle: TextStyle( + color: greyColor, //<-- SEE HERE + ), + ), + ), + ), //alternative phone number + const SizedBox( height: 5, ), + +/* Container( padding: EdgeInsets.fromLTRB(20, 0, 20, 0), child: Visibility( @@ -322,9 +378,9 @@ class _AddTankersState extends State { cursorColor: greyColor, controller: tankerDrinkingPriceController, keyboardType: TextInputType.number, - /*onSaved: (v){ + *//*onSaved: (v){ waterPrice.add({'price': v.toString()}); - },*/ + },*//* decoration: const InputDecoration( prefixIcon: Icon( Icons.currency_rupee, @@ -419,7 +475,7 @@ class _AddTankersState extends State { ), SizedBox( height: 20, - ), + ),*/ Container( width: MediaQuery.of(context).size.width * .99, height: 50, @@ -435,30 +491,32 @@ class _AddTankersState extends State { tankerPhoneNumberController.text != '' && tankerAlternativePhoneNumberController.text != '' && tankerCapacityController.text != '' && - waterTypes.isNotEmpty) { - waterPrice=[]; + tankerPriceController.text != '') { + /* waterPrice=[]; if(isDrinkingChecked){ waterPrice.add({'price': tankerDrinkingPriceController.text.toString()}); } - /*else{ + *//*else{ waterTypes.removeWhere((e) => e['price'].toString() == tankerDrinkingPriceController.text.toString()); - }*/ + }*//* else if(isBoreChecked){ waterPrice.add({'price': tankerBorePriceController.text.toString()}); } - /*else{ + *//*else{ waterTypes.removeWhere((e) => e['price'].toString() == tankerBorePriceController.text.toString()); - }*/ - + }*//* +*/ var payload = new Map(); payload["tankerName"] = tankerNameController.text.toString(); payload["phoneNumber"] = tankerPhoneNumberController.text.toString(); payload["alternative_phoneNumber"] = tankerAlternativePhoneNumberController.text.toString(); payload["capacity"] = tankerCapacityController.text.toString(); - payload["typeofwater"] = waterTypes; - payload["price"] = waterPrice; + // payload["typeofwater"] = waterTypes; + payload["typeofwater"] =dropdownTypeOfWater.toString(); + //payload["price"] = waterPrice; + payload["price"] = tankerPriceController.text.toString(); payload["supplier_address"] = AppSettings.supplierAddress; payload["supplier_name"] = AppSettings.suppliername; @@ -472,8 +530,9 @@ class _AddTankersState extends State { tankerPhoneNumberController.text = ''; tankerCapacityController.text = ''; tankerAlternativePhoneNumberController.text=''; - tankerDrinkingPriceController.text=''; - tankerBorePriceController.text=''; + tankerPriceController.text=''; + //tankerDrinkingPriceController.text=''; + //tankerBorePriceController.text=''; waterPrice=[]; waterTypes=[]; isDrinkingChecked=false; diff --git a/lib/models/tankersview_model.dart b/lib/models/tankersview_model.dart index 8dfcc4f..32b560c 100644 --- a/lib/models/tankersview_model.dart +++ b/lib/models/tankersview_model.dart @@ -6,8 +6,12 @@ class GetTanksDetailsModel { String tanker_phone = ''; String tanker_alterphone = ''; String capacity=''; + String waterprice=''; + Color cardColor=Colors.white; + String type_of_water=''; + - List type_of_water=[]; + /*List type_of_water=[]; List showTypeofWater=[]; String water_type=''; @@ -20,7 +24,7 @@ class GetTanksDetailsModel { bool isDrinking=false; bool isBore=false; List updatedWaterTypes=[]; - List updatePrice=[]; + List updatePrice=[];*/ GetTanksDetailsModel(); @@ -31,15 +35,12 @@ class GetTanksDetailsModel { rtvm.tanker_phone = json['phoneNumber'] ?? ''; rtvm.tanker_alterphone = json['alternative_phoneNumber'] ?? ''; rtvm.capacity = json['capacity'] ??''; + rtvm.waterprice = json['price'] ??''; + rtvm.type_of_water = json['typeofwater'] ??""; - - rtvm.type_of_water = json['typeofwater'] ??[]; - rtvm.type_of_water.forEach((element) { + /* rtvm.type_of_water.forEach((element) { rtvm.showTypeofWater.add(element['typeofwater']); rtvm.water_type=rtvm.showTypeofWater.join(","); - - - if(element['typeofwater'].toString().toLowerCase()=='drinking water'){ rtvm.isDrinking=true; rtvm.updatedWaterTypes.add({'typeofwater': 'Drinking Water'}); @@ -49,20 +50,16 @@ class GetTanksDetailsModel { rtvm.updatedWaterTypes.add({'typeofwater': 'Bore Water'}); } + });*/ - }); - - rtvm.price = json['price'] ?? []; + /* rtvm.price = json['price'] ?? []; rtvm.price.forEach((element) { rtvm.pricetype.add(element['price']); rtvm.price_ui=rtvm.pricetype.join(","); }); - - - - +*/ return rtvm; } diff --git a/lib/settings.dart b/lib/settings.dart index 3e1ecf7..6eecdcb 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -61,6 +61,7 @@ class AppSettings { static String suppliername = ''; static String email = ''; static String phoneNumber = ''; + static String description = ''; static String accessToken = ''; static String customerId = ''; static String supplierId = ''; @@ -324,6 +325,7 @@ class AppSettings { suppliername = _response['suppliername']; phoneNumber = _response['phone']; email = _response['emails'][0]['email']; + description = _response['description']; return true; } else { diff --git a/lib/tankersview.dart b/lib/tankersview.dart index e8a66c9..1597e8f 100644 --- a/lib/tankersview.dart +++ b/lib/tankersview.dart @@ -27,14 +27,20 @@ class _TankersViewState extends State { TextEditingController updateTankerPhoneNumberController = TextEditingController(); TextEditingController updateTankerAlternatePhoneNumberController = TextEditingController(); TextEditingController updateTankerCapacityController = TextEditingController(); + TextEditingController updateTankerpriceController = TextEditingController(); TextEditingController tankerBorePriceController = TextEditingController(); TextEditingController tankerDrinkingPriceController = TextEditingController(); bool isLoading=false; - bool isDrinkingChecked = false; + /*bool isDrinkingChecked = false; bool isBoreChecked = false; List waterTypes = []; - List waterPrice = []; + List waterPrice = [];*/ + String dropdownTypeOfWater = 'bore water'; + var typeOfWaterItems = [ + 'bore water', + 'drinking water', + ]; List updateWaterTypes = []; @@ -62,8 +68,14 @@ class _TankersViewState extends State { updateTankerDescriptionController.text = ''; updateTankerPhoneNumberController.text = object.tanker_phone; updateTankerCapacityController.text=object.capacity; + updateTankerpriceController.text=object.waterprice; updateTankerAlternatePhoneNumberController.text = object.tanker_alterphone; - isDrinkingChecked=object.isDrinking; + setState(() { + dropdownTypeOfWater=object.type_of_water.toString().toLowerCase()??''; + }); + + + /* isDrinkingChecked=object.isDrinking; isBoreChecked = object.isBore; if(object.pricetype.length==2){ tankerDrinkingPriceController.text=object.pricetype[0].toString(); @@ -72,7 +84,7 @@ class _TankersViewState extends State { else{ tankerDrinkingPriceController.text=object.pricetype[0].toString(); tankerBorePriceController.text=''; - } + }*/ return showDialog( @@ -219,7 +231,97 @@ class _TankersViewState extends State { const SizedBox( height: 30, ), + + Container( + child: DropdownButtonFormField( + // Initial Value + value: dropdownTypeOfWater, + isExpanded: true, + decoration: const InputDecoration( + prefixIcon: Icon( + Icons.water, + color: greyColor, + ), + border: OutlineInputBorder( + borderSide: BorderSide(color: greyColor)), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: greyColor), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: greyColor), + ), + labelText: 'Type of water storage', + labelStyle: TextStyle( + color: greyColor, //<-- SEE HERE + ), + ), + + hint: Text('Select Type of water'), + // Down Arrow Icon + icon: const Icon(Icons.keyboard_arrow_down), + + // Array list of items + items: typeOfWaterItems.map((String items) { + return DropdownMenuItem( + value: items, + child: Text(items), + ); + }).toList(), + // After selecting the desired option,it will + // change button value to selected value + onChanged: (String? newValue) { + setState(() { + dropdownTypeOfWater = newValue!; + }); + }, + ), + ), + const SizedBox( + height: 30, + ), + Container( + //padding: const EdgeInsets.fromLTRB(10, 10, 10, 0), + child: TextFormField( + cursorColor: greyColor, + controller: updateTankerpriceController, + textCapitalization: TextCapitalization.characters, + decoration: const InputDecoration( + prefixIcon: Icon( + Icons.currency_rupee, + color: greyColor, + ), + border: OutlineInputBorder( + borderSide: BorderSide(color: greyColor)), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: greyColor), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: greyColor), + ), + labelText: 'Enter update price', + labelStyle: TextStyle( + color: greyColor, //<-- SEE HERE + ), + ), + ), //tanker name + ), + + + + + + + + + + + + + + + + /*Container( padding: EdgeInsets.fromLTRB(20, 0, 20, 0), child: Visibility( visible: true, @@ -362,7 +464,7 @@ class _TankersViewState extends State { ) ], )) - ), + ),*/ ], ), ), @@ -377,9 +479,8 @@ class _TankersViewState extends State { child: Text('Update', style: textButtonStyle()), onPressed: () async { if (updateTankerNameController.text != '' && - updateTankerPhoneNumberController.text != '' && - object.updatedWaterTypes.isNotEmpty ) { - + updateTankerPhoneNumberController.text != '') { +/* waterPrice=[]; if(isDrinkingChecked){ waterPrice.add({'price': tankerDrinkingPriceController.text.toString()}); @@ -387,7 +488,7 @@ class _TankersViewState extends State { if(isBoreChecked){ waterPrice.add({'price': tankerBorePriceController.text.toString()}); - } + }*/ AppSettings.preLoaderDialog(context); @@ -397,8 +498,9 @@ class _TankersViewState extends State { payload["phoneNumber"] = updateTankerPhoneNumberController.text.toString(); payload["alternative_phoneNumber"] = updateTankerAlternatePhoneNumberController.text.toString(); payload["capacity"] = updateTankerCapacityController.text.toString(); - payload["typeofwater"] = object.updatedWaterTypes; - payload["price"] = waterPrice; + // payload["typeofwater"] = object.updatedWaterTypes; + payload["typeofwater"] = dropdownTypeOfWater.toString(); + payload["price"] = updateTankerpriceController.text.toString(); payload["supplier_address"] = AppSettings.supplierAddress; payload["supplier_name"] = AppSettings.suppliername; @@ -413,6 +515,7 @@ class _TankersViewState extends State { updateTankerPhoneNumberController.text = ''; updateTankerAlternatePhoneNumberController.text=''; updateTankerCapacityController.text=''; + updateTankerpriceController.text=''; Navigator.of(context).pop(); await readJson(); } else { @@ -490,8 +593,8 @@ class _TankersViewState extends State { Text(modelTanksViewList[index].tanker_phone,style: valuesTextStyle()), Text(modelTanksViewList[index].tanker_alterphone,style: valuesTextStyle()), Text(modelTanksViewList[index].capacity+' Ltrs',style: valuesTextStyle()), - Text(modelTanksViewList[index].water_type,style: valuesTextStyle()), - Text(modelTanksViewList[index].price_ui,style: valuesTextStyle()), + Text(modelTanksViewList[index].type_of_water,style: valuesTextStyle()), + Text(modelTanksViewList[index].waterprice,style: valuesTextStyle()), ], ), diff --git a/lib/updateprofile.dart b/lib/updateprofile.dart index f8d4794..510e9f8 100644 --- a/lib/updateprofile.dart +++ b/lib/updateprofile.dart @@ -35,7 +35,9 @@ class _UpdateprofileState extends State { nameController.text=AppSettings.suppliername; mobileNumberController.text=AppSettings.phoneNumber; emailController.text=AppSettings.email; - // descriptionController.text=AppSettings.suppliername; + descriptionController.text=AppSettings.description; + + // descriptionController.text=AppSettings.suppliername; super.initState(); @@ -296,6 +298,9 @@ class _UpdateprofileState extends State { payload["suppliername"] = nameController.text.toString(); payload["phone"] = mobileNumberController.text.toString(); payload["emails"] = [{"email":emailController.text.toString()}]; + payload["description"] = descriptionController.text.toString(); + payload["status"] = "active"; + bool signUpStatus = await AppSettings.updateProfile(payload); try{ if (signUpStatus) {