added lat, lng in signup

dev
Sneha 2 years ago
parent f8f13f1433
commit d1a27f9539

@ -48,6 +48,8 @@ class _SignInState extends State<SignIn> {
String state = '';
String zip = '';
String country = '';
double lat = 0;
double lng = 0;
PickResult? selectedPlace;
@ -324,6 +326,8 @@ class _SignInState extends State<SignIn> {
onPlacePicked: (PickResult result) {
setState(() {
selectedPlace = result;
lat=selectedPlace!.geometry!.location.lat;
lng=selectedPlace!.geometry!.location.lng;
if(selectedPlace!.types!.length==1){
userAddressCapturingController.text =
selectedPlace!.formattedAddress!;
@ -506,7 +510,8 @@ class _SignInState extends State<SignIn> {
payload["zip"] = zip;
payload["country"] = country;
payload["notes"] = '';
payload["latitude"] = lat.toString();
payload["longitude"] = lng.toString();
bool signUpStatus = await AppSettings.signUp(payload);
try {

@ -65,8 +65,15 @@ class _TankersViewState extends State<TankersView> {
updateTankerAlternatePhoneNumberController.text = object.tanker_alterphone;
isDrinkingChecked=object.isDrinking;
isBoreChecked = object.isBore;
if(object.pricetype.length==2){
tankerDrinkingPriceController.text=object.pricetype[0].toString();
tankerBorePriceController.text=object.pricetype[1].toString();
}
else{
tankerDrinkingPriceController.text=object.pricetype[0].toString();
tankerBorePriceController.text='';
}
return showDialog(
context: context,

Loading…
Cancel
Save