CMA #67 & #65 fixed

mirza_dev
devmirza121 4 years ago
parent 0aa90578ef
commit b385dccefd

@ -32,8 +32,8 @@ class BranchApiClent {
"branchDescription": branchDescription,
"cityID": cityId,
"address": address,
"latitude": latitude,
"longitude": longitude,
"latitude": latitude.substring(0,9)??0,
"longitude": longitude.substring(0,9)??0,
"isActive": true
};
String t = AppState().getUser.data!.accessToken ?? "";

@ -122,7 +122,7 @@ class _DashboardPageState extends State<DashboardPage> {
if (response.messageStatus == 1) {
Utils.showToast("Image is Deleted");
setState(() {
AppState().getUser.data!.userInfo!.userImageUrl=response.data;
AppState().getUser.data!.userInfo!.userImageUrl = response.data;
});
}
Utils.hideLoading(context);
@ -272,7 +272,7 @@ class _DashboardPageState extends State<DashboardPage> {
Navigator.pop(context);
if (response.messageStatus == 1) {
Utils.showToast("Image is uploaded");
AppState().getUser.data!.userInfo!.userImageUrl=response.data;
AppState().getUser.data!.userInfo!.userImageUrl = response.data;
} else {
Utils.showToast(response.message ?? "");
}
@ -302,7 +302,7 @@ class _DashboardPageState extends State<DashboardPage> {
Navigator.pop(context);
if (response.messageStatus == 1) {
Utils.showToast("Image is uploaded");
AppState().getUser.data!.userInfo!.userImageUrl=response.data;
AppState().getUser.data!.userInfo!.userImageUrl = response.data;
} else {
Utils.showToast(response.message ?? "");
}
@ -311,6 +311,5 @@ class _DashboardPageState extends State<DashboardPage> {
imagePicked = pickedImageFile;
});
}
}
}

@ -109,7 +109,9 @@ class _PickLocationPageState extends State<PickLocationPage> {
latitude = _position.target.latitude;
longitude = _position.target.longitude;
List<Placemark> placemarks = await placemarkFromCoordinates(latitude, longitude);
_counter.value = (placemarks.first.name) ?? "" + " " + (placemarks.first.street ?? "") + " " + (placemarks.first.country ?? "");
_counter.value='${placemarks.first.street}, ${placemarks.first.subLocality}, ${placemarks.first.locality}, ${placemarks.first.postalCode}, ${placemarks.first.country}';
print("Address121: "+_counter.value);
// _counter.value = (placemarks.first.name) ?? "" + " " + (placemarks.first.street ?? "") + " " + (placemarks.first.country ?? "");
}
void _getUserLocation() async {

@ -45,6 +45,10 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
}
fetchCites() async {
print("objectfffffff");
citiesDropList.clear();
cities = null;
cityId = -1;
cities = await UserApiClent().getAllCites(countryId.toString());
setState(() {
cities!.data?.forEach((element) {
@ -84,12 +88,14 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
12.height,
if (countryId != -1)
cities != null
? DropdownField((DropValue value) {
setState(() {
// countryCode = value.subValue;
cityId = value.id;
});
}, list: citiesDropList, hint: "Chosse City")
? citiesDropList.length == 0
? Text("No City Available for this country")
: DropdownField((DropValue value) {
setState(() {
// countryCode = value.subValue;
cityId = value.id;
});
}, list: citiesDropList, hint: "Chosse City")
: CircularProgressIndicator(),
12.height,
if (cityId != -1)

@ -1,5 +1,3 @@
import 'dart:convert';
import 'package:car_provider_app/api/client/user_api_client.dart';
@ -19,8 +17,6 @@ import 'package:car_provider_app/widgets/dialog/otp_dialog.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class EditAccountPage extends StatefulWidget {
@override
State<EditAccountPage> createState() => _EditAccountPageState();
@ -44,7 +40,7 @@ class _EditAccountPageState extends State<EditAccountPage> {
ListTile(
leading: SvgPicture.asset("assets/images/ic_lock.svg"),
title: "Change Password".toText12(),
onTap: (){
onTap: () {
navigateWithName(context, AppRoutes.changePassword);
},
),
@ -56,46 +52,55 @@ class _EditAccountPageState extends State<EditAccountPage> {
"Change Mobile".toText12(),
"Verify".toText12(),
RaisedButton(
onPressed: (){
onPressed: () {
navigateWithName(context, AppRoutes.changeMobilePage);
},
child: Text("Change",
style: TextStyle(fontSize: 14,
fontWeight: FontWeight.w600,),),color:Colors.blue,
child: Text(
"Change",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
),
),
color: Colors.blue,
textColor: Colors.white,
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8)
)
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8))
],
),
20.height,
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Icon(Icons.email, color: Colors.blue,),
Icon(
Icons.email,
color: Colors.blue,
),
"Change Email".toText12(),
InkWell(
child:((AppState().getUser.data!.userInfo!.isEmailVerified??false)?"Verified" :"Verify").toText12(),
onTap:
(AppState().getUser.data!.userInfo!.isEmailVerified??false) ?
null
:(){
verifyEmail(context);
},
InkWell(
child: ((AppState().getUser.data!.userInfo!.isEmailVerified ?? false) ? "Verified" : "Verify").toText12(),
onTap: (AppState().getUser.data!.userInfo!.isEmailVerified ?? false)
? null
: () {
verifyEmail(context);
},
),
RaisedButton(
onPressed: (){
onPressed: () {
navigateWithName(context, AppRoutes.changeEmailPage);
},
child: Text("Change",
style: TextStyle(fontSize: 14,
fontWeight: FontWeight.w600,),),color:Colors.blue,
child: Text(
"Change",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
),
),
color: Colors.blue,
textColor: Colors.white,
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8)
)
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8))
],
)
// ListTile(
// leading: SvgPicture.asset("assets/images/ic_mobile.svg"),
// title: "Change Mobile".toText12(),
@ -128,11 +133,10 @@ class _EditAccountPageState extends State<EditAccountPage> {
MResponse otpCompare = await UserApiClent().EmailVerifyOTPVerify(otpRequest.data!.userToken ?? "", code);
Utils.hideLoading(context);
if (otpCompare.messageStatus == 1) {
AppState().getUser.data!.userInfo!.isEmailVerified=true;
setState(() {
});
AppState().getUser.data!.userInfo!.isEmailVerified = true;
setState(() {});
Utils.showToast("Email is verified successfully");
// Navigator.of(context).pushNamedAndRemoveUntil(AppRoutes.dashboard, (Route<dynamic> route) => false);
// Navigator.of(context).pushNamedAndRemoveUntil(AppRoutes.dashboard, (Route<dynamic> route) => false);
// showMDialog(
// context,
// child: MessageDialog(
@ -151,6 +155,4 @@ class _EditAccountPageState extends State<EditAccountPage> {
Utils.showToast(otpRequest.message ?? "");
}
}
}

@ -45,6 +45,7 @@ dependencies:
fluttertoast: ^8.0.8
shared_preferences: ^2.0.6
file_picker: ^4.4.0
image_picker: ^0.8.4+4
@ -52,7 +53,7 @@ dependencies:
google_maps_flutter: ^2.1.1
geolocator: any
geocoding: ^2.0.2
image_picker: ^0.8.4+4

Loading…
Cancel
Save