|
|
@ -35,8 +35,14 @@ class _AddAddressPageState extends State<AddAddressPage> {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
_getCurrentLocation();
|
|
|
|
_getCurrentLocation();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_getCurrentLocation() async {
|
|
|
|
_getCurrentLocation() async {
|
|
|
|
await Geolocator.getLastKnownPosition().then((value) {
|
|
|
|
await Geolocator.getLastKnownPosition().then((value) {
|
|
|
|
_latitude = value.latitude;
|
|
|
|
_latitude = value.latitude;
|
|
|
@ -44,9 +50,12 @@ class _AddAddressPageState extends State<AddAddressPage> {
|
|
|
|
}).catchError((e) {
|
|
|
|
}).catchError((e) {
|
|
|
|
_longitude = 0;
|
|
|
|
_longitude = 0;
|
|
|
|
_latitude = 0;
|
|
|
|
_latitude = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final mediaQuery = MediaQuery.of(context);
|
|
|
|
final mediaQuery = MediaQuery.of(context);
|
|
|
@ -63,8 +72,8 @@ class _AddAddressPageState extends State<AddAddressPage> {
|
|
|
|
body: Container(
|
|
|
|
body: Container(
|
|
|
|
height: height * 1,
|
|
|
|
height: height * 1,
|
|
|
|
child: PickupLocationFromMap(
|
|
|
|
child: PickupLocationFromMap(
|
|
|
|
latitude: _latitude,
|
|
|
|
latitude: _latitude??0,
|
|
|
|
longitude: _longitude,
|
|
|
|
longitude: _longitude??0,
|
|
|
|
isWithAppBar: false,
|
|
|
|
isWithAppBar: false,
|
|
|
|
buttonColor: Color(0xFF5AB145),
|
|
|
|
buttonColor: Color(0xFF5AB145),
|
|
|
|
buttonLabel: TranslationBase.of(context).save,
|
|
|
|
buttonLabel: TranslationBase.of(context).save,
|
|
|
|