Remove loading dialog when getting GPS location
This commit is contained in:
parent
830a22eecd
commit
6468dd6adb
1 changed files with 4 additions and 6 deletions
|
|
@ -135,18 +135,16 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
|
||||||
FutureBuilder(
|
FutureBuilder(
|
||||||
future: futurePosition,
|
future: futurePosition,
|
||||||
builder: (context, asyncSnapshot) {
|
builder: (context, asyncSnapshot) {
|
||||||
|
String myLocation = "";
|
||||||
if (asyncSnapshot.connectionState == ConnectionState.waiting) {
|
if (asyncSnapshot.connectionState == ConnectionState.waiting) {
|
||||||
return const Mihloadingcircle(
|
myLocation = "Getting Your GPS Location Ready";
|
||||||
message: "Getting Your GPS Location Ready",
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
final myLocation = asyncSnapshot.data
|
myLocation = asyncSnapshot.data
|
||||||
.toString()
|
.toString()
|
||||||
.replaceAll("Latitude: ", "")
|
.replaceAll("Latitude: ", "")
|
||||||
.replaceAll("Longitude: ", "");
|
.replaceAll("Longitude: ", "");
|
||||||
print("My Location is : $myLocation");
|
|
||||||
return displaySearchResults(userSearch, myLocation);
|
|
||||||
}
|
}
|
||||||
|
return displaySearchResults(userSearch, myLocation);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue