Commit ad23f1ac69987f63bf1598ea49abba00096479f2

Authored by wdn127929
1 parent 1ad6aabd

地图经纬度带过去

... ... @@ -548,7 +548,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5239;
CURRENT_PROJECT_VERSION = 52394;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -696,7 +696,7 @@
CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5239;
CURRENT_PROJECT_VERSION = 52394;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = debug;
... ... @@ -732,7 +732,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5239;
CURRENT_PROJECT_VERSION = 52394;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ...
... ... @@ -16,6 +16,10 @@ import 'package:permission_handler/permission_handler.dart';
// import 'package:demo/widgets/network_state/page_loading.dart';
class MapChoicePointPage extends StatefulWidget {
final String long;
final String lat;
MapChoicePointPage({Key key, this.long, this.lat}) : super(key: key);
@override
_MapChoicePointPageState createState() => _MapChoicePointPageState();
}
... ... @@ -37,6 +41,13 @@ class _MapChoicePointPageState extends State<MapChoicePointPage> {
void initState() {
super.initState();
if (widget.long != null && widget.long != '') {
longitude = double.parse(widget.long);
}
if (widget.lat != null && widget.lat != '') {
latitude = double.parse(widget.lat);
}
WidgetsBinding.instance.addPostFrameCallback((_) async {
_requestLocationPermission();
});
... ... @@ -96,14 +107,16 @@ class _MapChoicePointPageState extends State<MapChoicePointPage> {
// App.sp.setString("lng", "118.17630045");
} else {
latitude = location.latLng.latitude;
longitude = location.latLng.longitude;
if (_controller != null) {
_controller.setCenterCoordinate(
LatLng(location.latLng.latitude, location.latLng.longitude));
if (widget.long == null || widget.long == '') {
latitude = location.latLng.latitude;
longitude = location.latLng.longitude;
if (_controller != null) {
_controller.setCenterCoordinate(
LatLng(location.latLng.latitude, location.latLng.longitude));
}
setState(() {});
}
setState(() {});
}
});
} else {
... ...
... ... @@ -1885,9 +1885,15 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {
onPressed: () {
Utils.getPickPermission(
context, () async {
//有经纬度带过去
Map temp = await NavigatorUtil
.goMapChoicePointPage(
context);
context,
long: mapAddress[
'lng'].toString(),
lat: mapAddress[
'lat'].toString());
if (temp != null) {
mapAddress = temp;
... ...
... ... @@ -355,9 +355,15 @@ class NavigatorUtil {
}
/// 地图选择页
static Future<dynamic> goMapChoicePointPage(BuildContext context,
{replace = false, String urlStr}) {
return _navigateTo(context, "${Routes.map_choice_point}", replace: replace);
static Future<dynamic> goMapChoicePointPage(
BuildContext context, {
replace = false,
String long,
String lat,
}) {
return _navigateTo(
context, "${Routes.map_choice_point}?long=${long}&lat=${lat}",
replace: replace);
}
/// 店铺名称
... ...
... ... @@ -773,8 +773,10 @@ var mapChoicePointPageHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
// CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode(
// FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first)));
// String urlStr = FluroConvertUtils.fluroCnParamsDecode(params["urlStr"].first);
return MapChoicePointPage();
String long = params['long'].first;
String lat = params['lat'].first;
return MapChoicePointPage(long: long, lat: lat);
});
///店铺名称
... ...