diff --git a/assets/image/2x/icon_by_bike.webp b/assets/image/2x/icon_by_bike.webp new file mode 100644 index 00000000..50ccc0ed Binary files /dev/null and b/assets/image/2x/icon_by_bike.webp differ diff --git a/assets/image/2x/icon_drive.webp b/assets/image/2x/icon_drive.webp new file mode 100644 index 00000000..972be59d Binary files /dev/null and b/assets/image/2x/icon_drive.webp differ diff --git a/assets/image/2x/icon_transit.webp b/assets/image/2x/icon_transit.webp new file mode 100644 index 00000000..523aa8b0 Binary files /dev/null and b/assets/image/2x/icon_transit.webp differ diff --git a/assets/image/2x/icon_walk.webp b/assets/image/2x/icon_walk.webp new file mode 100644 index 00000000..38e49db1 Binary files /dev/null and b/assets/image/2x/icon_walk.webp differ diff --git a/assets/image/2x/position_sort.webp b/assets/image/2x/position_sort.webp new file mode 100644 index 00000000..afb9000e Binary files /dev/null and b/assets/image/2x/position_sort.webp differ diff --git a/assets/image/3x/icon_by_bike.webp b/assets/image/3x/icon_by_bike.webp new file mode 100644 index 00000000..de4e78ae Binary files /dev/null and b/assets/image/3x/icon_by_bike.webp differ diff --git a/assets/image/3x/icon_drive.webp b/assets/image/3x/icon_drive.webp new file mode 100644 index 00000000..098241c2 Binary files /dev/null and b/assets/image/3x/icon_drive.webp differ diff --git a/assets/image/3x/icon_transit.webp b/assets/image/3x/icon_transit.webp new file mode 100644 index 00000000..11283036 Binary files /dev/null and b/assets/image/3x/icon_transit.webp differ diff --git a/assets/image/3x/icon_walk.webp b/assets/image/3x/icon_walk.webp new file mode 100644 index 00000000..98d95216 Binary files /dev/null and b/assets/image/3x/icon_walk.webp differ diff --git a/assets/image/3x/position_sort.webp b/assets/image/3x/position_sort.webp new file mode 100644 index 00000000..b51630af Binary files /dev/null and b/assets/image/3x/position_sort.webp differ diff --git a/assets/image/icon_by_bike.webp b/assets/image/icon_by_bike.webp new file mode 100644 index 00000000..d7871091 Binary files /dev/null and b/assets/image/icon_by_bike.webp differ diff --git a/assets/image/icon_drive.webp b/assets/image/icon_drive.webp new file mode 100644 index 00000000..67dcf346 Binary files /dev/null and b/assets/image/icon_drive.webp differ diff --git a/assets/image/icon_end.png b/assets/image/icon_end.png new file mode 100644 index 00000000..2f288f4c Binary files /dev/null and b/assets/image/icon_end.png differ diff --git a/assets/image/icon_start.png b/assets/image/icon_start.png new file mode 100644 index 00000000..ffc9a673 Binary files /dev/null and b/assets/image/icon_start.png differ diff --git a/assets/image/icon_transit.webp b/assets/image/icon_transit.webp new file mode 100644 index 00000000..844c3f1b Binary files /dev/null and b/assets/image/icon_transit.webp differ diff --git a/assets/image/icon_walk.webp b/assets/image/icon_walk.webp new file mode 100644 index 00000000..1ec11af8 Binary files /dev/null and b/assets/image/icon_walk.webp differ diff --git a/assets/image/position_sort.webp b/assets/image/position_sort.webp new file mode 100644 index 00000000..c0b20055 Binary files /dev/null and b/assets/image/position_sort.webp differ diff --git a/assets/image/traffic_texture_smooth.png b/assets/image/traffic_texture_smooth.png new file mode 100644 index 00000000..e4252dc4 Binary files /dev/null and b/assets/image/traffic_texture_smooth.png differ diff --git a/assets/image/traffic_texture_unknown.png b/assets/image/traffic_texture_unknown.png new file mode 100644 index 00000000..2e84a9cd Binary files /dev/null and b/assets/image/traffic_texture_unknown.png differ diff --git a/lib/address/address_map_page.dart b/lib/address/address_map_page.dart index f885d478..1324b146 100644 --- a/lib/address/address_map_page.dart +++ b/lib/address/address_map_page.dart @@ -80,6 +80,9 @@ class _AddressMapPage extends State { BMFMapOptions( center: latLng, zoomLevel: 15, + showZoomControl: false, + showMapScaleBar: false, + rotateEnabled: false, ), ); } @@ -339,6 +342,9 @@ class _AddressMapPage extends State { double.tryParse(value.getString("longitude")), ), zoomLevel: 15, + showZoomControl: false, + showMapScaleBar: false, + rotateEnabled: false, ), ); } @@ -362,7 +368,10 @@ class _AddressMapPage extends State { child: BMFMapWidget( mapOptions: BMFMapOptions( center: BMFCoordinate(30.553111, 114.342366), - zoomLevel: 12, + zoomLevel: 15, + showZoomControl: false, + showMapScaleBar: false, + rotateEnabled: false, ), onBMFMapCreated: onMapCreated, // onCameraMoveEnd: (cameraPosition) { diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index b18eeb24..be6f7b3e 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -484,6 +484,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { }), ///推广图 + if(activityBannerData.length > 0) spread(), // ///签到 diff --git a/lib/main.dart b/lib/main.dart index 0b9440db..44461e0b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -73,6 +73,7 @@ import 'package:huixiang/settlement/settlement.dart'; import 'package:huixiang/store/store_view/product_meals_sku.dart'; import 'package:huixiang/test_page.dart'; import 'package:huixiang/union/location_map_page.dart'; +import 'package:huixiang/union/location_map_pages.dart'; import 'package:huixiang/union/union_select_city.dart'; import 'package:huixiang/utils/ImgCachePath.dart'; import 'package:huixiang/vip/user_vip_service_page.dart'; diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index b6a7bf09..6bbc3dc7 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -450,7 +450,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { Widget spreadImage() { return Container( width: double.infinity, - // margin: EdgeInsets.symmetric(horizontal:14.w), + margin: EdgeInsets.only(bottom:24.h), height: 85.h, child: activityBannerData != null && activityBannerData.isNotEmpty ? Swiper( diff --git a/lib/mine/mine_view/mine_navbar.dart b/lib/mine/mine_view/mine_navbar.dart index 263332ca..0308eba6 100644 --- a/lib/mine/mine_view/mine_navbar.dart +++ b/lib/mine/mine_view/mine_navbar.dart @@ -175,14 +175,14 @@ class _MineNavbar extends State { Expanded( child: InkWell( onTap: () { - SharedPreferences.getInstance().then((value) { - if (value.getString("token") == null || - value.getString("token") == "") { - LoginTipsDialog().show(context); - return; - } - widget.toIntegralPage(); - }); + // SharedPreferences.getInstance().then((value) { + // if (value.getString("token") == null || + // value.getString("token") == "") { + // LoginTipsDialog().show(context); + // return; + // } + // widget.toIntegralPage(); + // }); }, child: mineBottomItem( widget?.userInfo?.points?? "0", diff --git a/lib/mine/mine_view/mine_view.dart b/lib/mine/mine_view/mine_view.dart index 2c46c8f7..92f153ac 100644 --- a/lib/mine/mine_view/mine_view.dart +++ b/lib/mine/mine_view/mine_view.dart @@ -373,55 +373,56 @@ class _MineView extends State { ), ), ), - widget.userInfo == null - ? Container( - alignment: Alignment.center, - height: 50.h, - child: Icon( - Icons.keyboard_arrow_right, - size: 20, - color: Colors.black, - ), - ) - : Container( - alignment: Alignment.bottomRight, - height: 50.h, - child: GestureDetector( - onTap: () { - widget.toIntegralPage(); - }, - child: Container( - padding: EdgeInsets.only( - top: 4.h, bottom: 4.h, right: 16.w, left: 7.w), - margin: EdgeInsets.only(right: 14.w), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.white), - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Image.asset( - "assets/image/icon_gold_coin.webp", - width: 16, - height: 16, - ), - Text( - S.of(context).tiantianlingjifen, - style: TextStyle( - color: Color(0xFF32A060), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - ), - ), - // Icon( - // Icons.keyboard_arrow_right, - // size: 16, - // color: Colors.black, - // ) - ], - ), - )), - ), + ///应运营需求暂时关闭积分板块 + // widget.userInfo == null + // ? Container( + // alignment: Alignment.center, + // height: 50.h, + // child: Icon( + // Icons.keyboard_arrow_right, + // size: 20, + // color: Colors.black, + // ), + // ) + // : Container( + // alignment: Alignment.bottomRight, + // height: 50.h, + // child: GestureDetector( + // onTap: () { + // widget.toIntegralPage(); + // }, + // child: Container( + // padding: EdgeInsets.only( + // top: 4.h, bottom: 4.h, right: 16.w, left: 7.w), + // margin: EdgeInsets.only(right: 14.w), + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(12), + // color: Colors.white), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // Image.asset( + // "assets/image/icon_gold_coin.webp", + // width: 16, + // height: 16, + // ), + // Text( + // S.of(context).tiantianlingjifen, + // style: TextStyle( + // color: Color(0xFF32A060), + // fontSize: 12.sp, + // fontWeight: MyFontWeight.regular, + // ), + // ), + // // Icon( + // // Icons.keyboard_arrow_right, + // // size: 16, + // // color: Colors.black, + // // ) + // ], + // ), + // )), + // ), ], ), ); diff --git a/lib/retrofit/data/ip_data.dart b/lib/retrofit/data/ip_data.dart index 6c35e6ee..532f1804 100644 --- a/lib/retrofit/data/ip_data.dart +++ b/lib/retrofit/data/ip_data.dart @@ -1,42 +1,104 @@ -/// id : 1887 /// ip : "27.18.151.119" -/// dz : "中国 湖北省 武汉市" -/// wl : "电信" +/// pro : "湖北省" +/// proCode : "420000" +/// city : "武汉市" +/// cityCode : "420100" +/// region : "" +/// regionCode : "0" +/// addr : "湖北省武汉市 电信" +/// regionNames : "" +/// err : "" class IpData { IpData({ - int id, String ip, - String dz, - String wl,}){ - _id = id; + String pro, + String proCode, + String city, + String cityCode, + String region, + String regionCode, + String addr, + String regionNames, + String err,}){ _ip = ip; - _dz = dz; - _wl = wl; + _pro = pro; + _proCode = proCode; + _city = city; + _cityCode = cityCode; + _region = region; + _regionCode = regionCode; + _addr = addr; + _regionNames = regionNames; + _err = err; } IpData.fromJson(dynamic json) { - _id = json['id']; _ip = json['ip']; - _dz = json['dz']; - _wl = json['wl']; + _pro = json['pro']; + _proCode = json['proCode']; + _city = json['city']; + _cityCode = json['cityCode']; + _region = json['region']; + _regionCode = json['regionCode']; + _addr = json['addr']; + _regionNames = json['regionNames']; + _err = json['err']; } - int _id; String _ip; - String _dz; - String _wl; - - int get id => _id; + String _pro; + String _proCode; + String _city; + String _cityCode; + String _region; + String _regionCode; + String _addr; + String _regionNames; + String _err; +IpData copyWith({ String ip, + String pro, + String proCode, + String city, + String cityCode, + String region, + String regionCode, + String addr, + String regionNames, + String err, +}) => IpData( ip: ip ?? _ip, + pro: pro ?? _pro, + proCode: proCode ?? _proCode, + city: city ?? _city, + cityCode: cityCode ?? _cityCode, + region: region ?? _region, + regionCode: regionCode ?? _regionCode, + addr: addr ?? _addr, + regionNames: regionNames ?? _regionNames, + err: err ?? _err, +); String get ip => _ip; - String get dz => _dz; - String get wl => _wl; + String get pro => _pro; + String get proCode => _proCode; + String get city => _city; + String get cityCode => _cityCode; + String get region => _region; + String get regionCode => _regionCode; + String get addr => _addr; + String get regionNames => _regionNames; + String get err => _err; Map toJson() { final map = {}; - map['id'] = _id; map['ip'] = _ip; - map['dz'] = _dz; - map['wl'] = _wl; + map['pro'] = _pro; + map['proCode'] = _proCode; + map['city'] = _city; + map['cityCode'] = _cityCode; + map['region'] = _region; + map['regionCode'] = _regionCode; + map['addr'] = _addr; + map['regionNames'] = _regionNames; + map['err'] = _err; return map; } diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index f780186c..8a795c75 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -27,9 +27,9 @@ import 'data/shopping_home_config.dart'; part 'min_api.g.dart'; -const localBaseUrl = "http://app-api.test.yixinhuixiang.com/app/";///本地 -// const localBaseUrl = "http://pos-test.api.lotus-wallet.com/app/";///测试 -const serviceBaseUrl = "http://app-api.test.yixinhuixiang.com/app/";///线上 +// const localBaseUrl = "http://app-api.test.yixinhuixiang.com/app/";///本地 +const localBaseUrl = "http://pos-test.api.lotus-wallet.com/app/";///测试 +const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线上 ///调用小程序的接口 diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 03864b03..1ef0eab4 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -6,6 +6,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; +import 'package:gbk2utf8/gbk2utf8.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/activity.dart'; import 'package:huixiang/retrofit/data/article.dart'; @@ -17,6 +18,7 @@ import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart'; import 'package:retrofit/retrofit.dart'; +import '../utils/flutter_utils.dart'; import 'data/achievement_detail_list.dart'; import 'data/activity_pos.dart'; import 'data/address.dart'; @@ -63,11 +65,15 @@ import 'data/wx_pay.dart'; part 'retrofit_api.g.dart'; -const localBaseUrl = "http://platform-api.test.yixinhuixiang.com/app/";///本地 -// const localBaseUrl = "http://platform.test.api.lotus-wallet.com/app/";///测试 -const serviceBaseUrl = "http://platform-api.test.yixinhuixiang.com/app/";///线上 +// const localBaseUrl = "http://platform-api.test.yixinhuixiang.com/app/";///本地 +const localBaseUrl = "http://platform.test.api.lotus-wallet.com/app/";///测试 +const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/"; -const ipBaseUrl = "https://api.asilu.com";///ip +///线上 + +const ipBaseUrl = "http://whois.pconline.com.cn"; + +///ip @RestApi(baseUrl: localBaseUrl) abstract class ApiService { @@ -85,8 +91,7 @@ abstract class ApiService { if (pay) { headers["Environment"] = "app"; } - if (kReleaseMode) - baseUrl = serviceBaseUrl; + if (kReleaseMode) baseUrl = serviceBaseUrl; if (isIp) baseUrl = ipBaseUrl; dio.options = BaseOptions( connectTimeout: 60000, @@ -96,21 +101,26 @@ abstract class ApiService { ); dio.interceptors.add( InterceptorsWrapper(onRequest: (RequestOptions options) { + try { debugPrint("\n======================= 请求数据 ======================="); debugPrint("method = ${options.method.toString()}"); debugPrint("url = ${options.uri.toString()}"); debugPrint("headers = ${options.headers}"); if (showLoading && !EasyLoading.isShow) { //是否显示loading - EasyLoading.show(status: S.of(context).zhengzaijiazai,maskType: EasyLoadingMaskType.black); + EasyLoading.show( + status: S.of(context).zhengzaijiazai, + maskType: EasyLoadingMaskType.black); } if (options.data is FormData) { debugPrint("params data = FormData"); } else { - debugPrint("params data = ${jsonEncode(options.data)}"); + debugPrint("params data = ${jsonEncode(options.data)}"); } debugPrint("params queryParameters = ${options.queryParameters}"); + } catch (e1) {} }, onResponse: (Response response) { + try { debugPrint("\n======================= 响应数据开始 ======================="); if (showLoading && EasyLoading.isShow) { EasyLoading.dismiss(); @@ -118,7 +128,7 @@ abstract class ApiService { debugPrint("code = ${response.statusCode}"); if (response.request.path != "/creditGoods/list") - p(jsonEncode(response.data)); + p(jsonEncode(response.data)); // debugPrint(jsonEncode(response.data), wrapWidth: response.data.toString().length * 10); @@ -136,6 +146,7 @@ abstract class ApiService { // SmartDialog.showToast(map["msg"], alignment: Alignment.center); } debugPrint("======================= 响应数据结束 =======================\n"); + } catch (e2) {} }, onError: (DioError e) { if (EasyLoading.isShow) { EasyLoading.dismiss(); @@ -225,7 +236,8 @@ abstract class ApiService { ///充值活动列表 @GET("/wallet/rechargeActList?tenantCode={tenantCode}") - Future> rechargeActList(@Path("tenantCode") String tenantCode); + Future> rechargeActList( + @Path("tenantCode") String tenantCode); ///领取优惠券 @GET("/coupon/receive?couponId={couponId}") @@ -584,6 +596,6 @@ abstract class ApiService { @Path("creditGoodsId") String creditGoodsId); ///获取APP门店推广渠道 - @GET("/ip/") + @GET("/ipJson.jsp") Future getIpInfo(); } diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 6a8f5b98..ebab27b3 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -17,21 +17,18 @@ class _ApiService implements ApiService { String baseUrl; @override - Future> upload(data, folderId,bool isVideo) async { + Future> upload(data, folderId, bool isVideo) async { ArgumentError.checkNotNull(data, 'data'); ArgumentError.checkNotNull(folderId, 'folderId'); const _extra = {}; final queryParameters = {}; final _data = FormData(); String fileName = data.path.split(Platform.pathSeparator).last; - if(!isVideo && !fileName.contains(".jpeg") && !fileName.contains(".png")) + if (!isVideo && !fileName.contains(".jpeg") && !fileName.contains(".png")) fileName += ".jpeg"; - else if(isVideo && !fileName.contains(".mp4")) - fileName += ".mp4"; + else if (isVideo && !fileName.contains(".mp4")) fileName += ".mp4"; _data.files.add(MapEntry( - 'file', - MultipartFile.fromFileSync(data.path, - filename: fileName))); + 'file', MultipartFile.fromFileSync(data.path, filename: fileName))); print("filename:$fileName"); if (folderId != null) { _data.fields.add(MapEntry('folderId', folderId.toString())); @@ -93,7 +90,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json==null?null:json, + (json) => json == null ? null : json, ); return value; } @@ -114,13 +111,13 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => ChannelsList.fromJson(json), + (json) => ChannelsList.fromJson(json), ); return value; } @override - Future> sendVerify(areaCode,mobile) async { + Future> sendVerify(areaCode, mobile) async { ArgumentError.checkNotNull(mobile, 'mobile'); ArgumentError.checkNotNull(areaCode, 'areaCode'); const _extra = {}; @@ -337,7 +334,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => RechargeActLists.fromJson(json), + (json) => RechargeActLists.fromJson(json), ); return value; } @@ -359,7 +356,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json == null ? null :json as dynamic, + (json) => json == null ? null : json as dynamic, ); return value; } @@ -592,9 +589,11 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => ((json??"") == "")?null:(json as List) - .map((i) => Store.fromJson(i as Map)) - .toList()); + (json) => ((json ?? "") == "") + ? null + : (json as List) + .map((i) => Store.fromJson(i as Map)) + .toList()); return value; } @@ -885,10 +884,12 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => ((json??"") == "")?null:PageInfo.fromJson( - json, - (json) => OrderInfo.fromJson(json), - ), + (json) => ((json ?? "") == "") + ? null + : PageInfo.fromJson( + json, + (json) => OrderInfo.fromJson(json), + ), ); return value; } @@ -1272,7 +1273,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json==null?null:(json as String), + (json) => json == null ? null : (json as String), ); return value; } @@ -1295,7 +1296,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => (json??"")=="" ? null :(json as bool), + (json) => (json ?? "") == "" ? null : (json as bool), ); return value; } @@ -1881,7 +1882,8 @@ class _ApiService implements ApiService { const _extra = {}; final queryParameters = {}; final _data = {}; - final _result = await _dio.request>('coupon/detail/$memberCouponId', + final _result = await _dio.request>( + 'coupon/detail/$memberCouponId', queryParameters: queryParameters, options: RequestOptions( method: 'GET', @@ -2018,7 +2020,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => HomeRank.fromJson(json), + (json) => HomeRank.fromJson(json), ); return value; } @@ -2039,7 +2041,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as dynamic, ); return value; } @@ -2051,7 +2053,8 @@ class _ApiService implements ApiService { final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); - final _result = await _dio.request>('/member/updatePayPwd', + final _result = await _dio.request>( + '/member/updatePayPwd', queryParameters: queryParameters, options: RequestOptions( method: 'POST', @@ -2061,7 +2064,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as dynamic, ); return value; } @@ -2073,7 +2076,8 @@ class _ApiService implements ApiService { final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); - final _result = await _dio.request>('/member/verifyByUpdatePayPwd', + final _result = await _dio.request>( + '/member/verifyByUpdatePayPwd', queryParameters: queryParameters, options: RequestOptions( method: 'POST', @@ -2083,7 +2087,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as dynamic, ); return value; } @@ -2093,8 +2097,7 @@ class _ApiService implements ApiService { const _extra = {}; final queryParameters = {}; final _data = {}; - final _result = await _dio.request>( - '/vipCard/index', + final _result = await _dio.request>('/vipCard/index', queryParameters: queryParameters, options: RequestOptions( method: 'GET', @@ -2104,7 +2107,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => VipCardHome.fromJson(json), + (json) => VipCardHome.fromJson(json), ); return value; } @@ -2114,18 +2117,14 @@ class _ApiService implements ApiService { const _extra = {}; final queryParameters = {}; final _data = {}; - final _result = await _dio.request>( - '/ip/', + final _result = await _dio.request>('/ipJson.jsp', queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), + options: RequestOptions(method: 'GET', extra: _extra, baseUrl: baseUrl,responseType: ResponseType.bytes), data: _data); - final value = IpData.fromJson( - _result.data, - ); + var ts = gbk.decode(_result.data); + final value = IpData.fromJson(jsonDecode(ts + .substring(ts.indexOf("{\"ip\":\"")) + .replaceAll(");}", ""))); return value; } @@ -2136,7 +2135,8 @@ class _ApiService implements ApiService { final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); - final _result = await _dio.request>('/vipCard/orderVip', + final _result = await _dio.request>( + '/vipCard/orderVip', queryParameters: queryParameters, options: RequestOptions( method: 'POST', @@ -2146,7 +2146,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as dynamic, ); return value; } @@ -2156,8 +2156,7 @@ class _ApiService implements ApiService { const _extra = {}; final queryParameters = {}; final _data = {}; - final _result = await _dio.request>( - '/raise/products', + final _result = await _dio.request>('/raise/products', queryParameters: queryParameters, options: RequestOptions( method: 'GET', @@ -2167,7 +2166,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) + (json) => (json as List) .map( (i) => FarmersList.fromJson(i as Map)) .toList()); @@ -2181,7 +2180,8 @@ class _ApiService implements ApiService { final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); - final _result = await _dio.request>('/auth/changePhone', + final _result = await _dio.request>( + '/auth/changePhone', queryParameters: queryParameters, options: RequestOptions( method: 'POST', @@ -2191,7 +2191,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as dynamic, ); return value; } @@ -2213,7 +2213,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json as dynamic, ); return value; } @@ -2235,9 +2235,8 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) - .map( - (i) => Store.fromJson(i as Map)) + (json) => (json as List) + .map((i) => Store.fromJson(i as Map)) .toList()); return value; } diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 357649ce..0dae970d 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -327,7 +327,7 @@ class _StoreOrderPage extends State CrossAxisAlignment.start, children: [ ///门店信息 - StoreInfoView(storeInfo), + StoreInfoView(storeInfo,widget.arguments["distance"],), // Padding(padding:EdgeInsets.only(left: 14.w), // child: Text( // S.of(context).diandan, @@ -657,7 +657,6 @@ class _StoreOrderPage extends State "distance": widget.arguments["distance"], "vipLevelName": memberVo?.memberRankVo?.rankName ??"", "isVips": memberVo?.isVip ?? false, - "distance": widget.arguments["distance"], "subscribeParam": miNiDetail?.subscribeParam, }, ); diff --git a/lib/store/store_view/store_header.dart b/lib/store/store_view/store_header.dart index baebe3d0..79214b12 100644 --- a/lib/store/store_view/store_header.dart +++ b/lib/store/store_view/store_header.dart @@ -43,7 +43,7 @@ class StoreHeader extends SliverPersistentHeaderDelegate { child: Column( children: [ ///门店信息 - StoreInfoView(storeInfo), + StoreInfoView(storeInfo,0), ///门店对应优惠券 if (storeInfo != null && storeInfo.couponVOList != null) diff --git a/lib/store/store_view/store_info.dart b/lib/store/store_view/store_info.dart index 2f274a37..afcbc336 100644 --- a/lib/store/store_view/store_info.dart +++ b/lib/store/store_view/store_info.dart @@ -11,8 +11,9 @@ import 'package:url_launcher/url_launcher.dart'; class StoreInfoView extends StatefulWidget { final StoreInfo storeInfo; + final double distance; - StoreInfoView(this.storeInfo); + StoreInfoView(this.storeInfo,this.distance); @override State createState() { @@ -172,13 +173,14 @@ class _StoreInfoView extends State { arguments: { "lat": widget.storeInfo.latitude, "lng": widget.storeInfo.longitude, - "storeName": widget.storeInfo.storeName, + "storeInfo":widget.storeInfo, + "distance":widget.distance }, ); }, child:Container( color: Colors.transparent, - padding:EdgeInsets.only(right: 8.w) , + padding:EdgeInsets.only(right: 8.w,bottom: 16.h) , child: Image.asset( "assets/image/icon_union_location.webp", width: 20, @@ -196,34 +198,36 @@ class _StoreInfoView extends State { arguments: { "lat": widget.storeInfo.latitude, "lng": widget.storeInfo.longitude, - "storeName": widget.storeInfo.storeName, + "storeInfo":widget.storeInfo, + "distance":widget.distance }, ); }else{ return; } }, - child: Text( - "${S.of(context).dizhi}:${widget.storeInfo != null ? widget.storeInfo.address : ""}", - maxLines: 2, - textAlign: TextAlign.justify, - style: TextStyle( - color: Color(0xFF353535), - fontWeight: MyFontWeight.regular, - fontSize: 12.sp, + child:Padding(padding: EdgeInsets.only(bottom: 16.h,), + child: Text( + "${S.of(context).dizhi}:${widget.storeInfo != null ? widget.storeInfo.address : ""}", + maxLines: 2, + textAlign: TextAlign.justify, + style: TextStyle( + color: Color(0xFF353535), + fontWeight: MyFontWeight.regular, + fontSize: 12.sp, + ), ), ), ), ), - if((widget?.storeInfo?.tel ?? "") != "") GestureDetector( - behavior: HitTestBehavior.translucent, + behavior: HitTestBehavior.opaque, onTap: () { showCallMobile(); }, child: Container( - padding:EdgeInsets.only(left: 16.w,right: 8.w) , + padding:EdgeInsets.only(left: 16.w,right: 8.w,bottom: 16.h) , child: Image.asset( "assets/image/icon_union_call.webp", width: 24, @@ -237,7 +241,6 @@ class _StoreInfoView extends State { width: double.infinity, height: 1, color: Color(0xFFF4F5F2), - margin: EdgeInsets.only(top: 16), ) ], ), diff --git a/lib/union/location_map_page.dart b/lib/union/location_map_page.dart index d63e223c..92bd5339 100644 --- a/lib/union/location_map_page.dart +++ b/lib/union/location_map_page.dart @@ -1,15 +1,27 @@ +import 'dart:convert'; import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; import 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart'; +import 'package:flutter_baidu_mapapi_search/flutter_baidu_mapapi_search.dart'; +import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart'; import 'package:flutter_bmflocation/flutter_bmflocation.dart'; +import 'package:flutter_easyloading/flutter_easyloading.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/utils/flutter_utils.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/location.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:permission_handler/permission_handler.dart'; + +import '../generated/l10n.dart'; +import '../retrofit/data/store_info.dart'; +import '../view_widget/custom_image.dart'; +import '../view_widget/round_button.dart'; class LocationMap extends StatefulWidget { - final Map arguments; + final Map arguments; LocationMap({this.arguments}); @@ -20,26 +32,67 @@ class LocationMap extends StatefulWidget { } class _LocationMap extends State { + StoreInfo storeInfo; + int navigationState = 0; + double distance; + int navigationType = 0; + bool positionSorta = false; + String myAddress; + String myCity; + String hours; + String minutes; + String polylineId; + @override void initState() { super.initState(); - - startLocation(); + storeInfo = widget.arguments["storeInfo"]; + distance = widget.arguments["distance"]; + getLocation(); } - void startLocation() { - Location.getInstance().startLocation(context, (BaiduLocation result) { - if (result != null && - result.latitude != null && - result.longitude != null) { - print("location: $result"); - myLatLng = BMFCoordinate(result.latitude, result.longitude); - AppUtils.coordConvert(myLatLng).then((value) { - this.myLatLng = value; - locationShow(); - }); + void getLocation() async { + bool powerFlag = false; + try { + Future.delayed(Duration(seconds: 5), () { + Location.getInstance().stopLocation(); + }); + powerFlag = await Location.getInstance().startLocation(context, + (BaiduLocation result) { + if (result != null && + result.latitude != null && + result.longitude != null) { + print("location: $result"); + myLatLng = BMFCoordinate(result.latitude, result.longitude); + myAddress = result.locationDetail; + myCity = result.city; + if(distance == null) + calculate(); + AppUtils.coordConvert(myLatLng).then((value) { + this.myLatLng = value; + locationShow(); + }); + Location.getInstance().stopLocation(); + } + }); + } finally { + if (!powerFlag) { + if (await Permission.locationWhenInUse.status.isGranted) { + getLocation(); + } else { + SmartDialog.showToast("您定位服务未开启,请前往系统设置中开启定位服务", + alignment: Alignment.center); + } } - }); + } + } + + calculate() async { + BMFCoordinate bmfCoordinate = BMFCoordinate( + double.tryParse(storeInfo.latitude), + double.tryParse(storeInfo.longitude), + ); + distance = double.tryParse(await AppUtils.calculateDistance(bmfCoordinate, myLatLng,isMi:true)); } locationShow() { @@ -68,31 +121,931 @@ class _LocationMap extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: MyAppBar( - background: Color(0xFFF7F7F7), - title: widget.arguments["storeName"], - titleColor: Colors.black87, - titleSize: 18.sp, - leadingColor: Colors.black, + // appBar: MyAppBar( + // background: Color(0xFFF7F7F7), + // title: widget.arguments["storeName"], + // titleColor: Colors.black87, + // titleSize: 18.sp, + // leadingColor: Colors.black, + // ), + body: Stack( + children: [ + Column( + children: [ + Expanded( + child: Container( + //BMFMapWidget 组件会自动默认沾满全屏,并且挡住所有遮盖物 ,BMFTextureMapWidget不会强制遮盖其他控件。 + child: BMFTextureMapWidget( + mapOptions: BMFMapOptions( + center: BMFCoordinate( + double.tryParse(widget.arguments["lat"]), + double.tryParse(widget.arguments["lng"]), + ), + showZoomControl: false, + showMapScaleBar: false, + rotateEnabled: false, + zoomLevel: 15, + ), + onBMFMapCreated: onMapCreated, + )), + flex: 3, + ), + navigationState == 0 + ? Container( + height: 253.h, + padding: + EdgeInsets.only(top: 16.h, left: 16.w, right: 28.w), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x08213303), + offset: Offset(0, 2), + blurRadius: 4, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.vertical( + top: Radius.circular(8), + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Row( + children: [ + Expanded( + child: Column( + children: [ + Text( + storeInfo?.storeName ?? "", + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 20.sp, + color: Color(0xFF0D0D0D), + fontWeight: MyFontWeight.medium, + ), + ), + Row( + children: [ + Text( + S.of(context).ren( + storeInfo != null + ? storeInfo + .perCapitaConsumption + : "", + ), + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF4D4D4D), + ), + ), + SizedBox( + width: 20.w, + ), + ]..addAll(itemServer(storeInfo != null + ? storeInfo.businessService + : "")), + ), + Text( + S.of(context).yingyeshijian(storeInfo == + null + ? "" + : (storeInfo.openStartTime == + null && + storeInfo.openEndTime == + null) + ? S.of(context).quantian + : "${storeInfo.openStartTime.substring(0, storeInfo.openStartTime.lastIndexOf(":"))} " + "- ${storeInfo.openEndTime.substring(0, storeInfo.openEndTime.lastIndexOf(":"))}"), + style: TextStyle( + color: Color(0xFF4D4D4D), + fontWeight: MyFontWeight.medium, + fontSize: 12.sp, + ), + ), + ], + mainAxisAlignment: + MainAxisAlignment.spaceAround, + crossAxisAlignment: + CrossAxisAlignment.start, + ), + ), + MImage( + storeInfo != null ? storeInfo.logo : "", + width: 72.h, + height: 72.h, + fit: BoxFit.cover, + errorSrc: "assets/image/default_1.webp", + fadeSrc: "assets/image/default_1.webp", + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(bottom: 32.h), + child: Text( + "${storeInfo != null ? storeInfo.address : ""}", + maxLines: 2, + textAlign: TextAlign.justify, + style: TextStyle( + color: Color(0xFF353535), + fontWeight: MyFontWeight.regular, + fontSize: 12.sp, + ), + ), + ), + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + if (myCity == null) { + getLocation(); + } else { + navigationState = 1; + if ((distance ?? 0) < 500) + navigationType = 1; + else if ((distance ?? 0) < 1500) + navigationType = 2; + else navigationType = 4; + navigationPosition(); + } + }, + child: Container( + alignment: Alignment.center, + width: double.infinity, + padding: EdgeInsets.symmetric(vertical: 10.h), + margin: EdgeInsets.only(bottom: 30.h), + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(23), + ), + child: Text( + "到这去", + style: TextStyle( + fontSize: 20.sp, + color: Colors.white, + fontWeight: MyFontWeight.medium, + ), + ), + ), + ) + ], + ), + ) + : navigationDistance(), + ], + ), + navigationState == 0 + ? GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + Navigator.of(context).pop(); + }, + child: Container( + height: 56.h, + margin: EdgeInsets.only( + top: MediaQuery.of(context).padding.top + 16.h, + left: 14.w, + right: 14.w), + padding: EdgeInsets.only(left: 12.w, right: 21.w), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x08213303), + offset: Offset(0, 2), + blurRadius: 4, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.circular(6), + ), + child: Row( + children: [ + Icon( + Icons.arrow_back_ios, + color: Color(0xFF353535), + size: 24, + ), + Expanded( + child: Text( + storeInfo?.storeName ?? "", + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color(0xFF0D0D0D), + fontSize: 18.sp, + fontWeight: MyFontWeight.regular, + ), + )) + ], + ), + ), + ) + : navigationBox(), + ], + ), + ); + } + + //調取百度地圖APP + void onOpenBaiduMapRoute() async { + // 我的位置 + BMFCoordinate startCoord = BMFCoordinate( + positionSorta == false + ? myLatLng.latitude + : double.tryParse(widget.arguments["lat"]), + positionSorta == false + ? myLatLng.longitude + : double.tryParse(widget.arguments["lng"])); + String startName = ((positionSorta == false) ? "我的位置" : "终点"); + // 去的位置 + String endName = ((positionSorta == false) ? "终点" : "我的位置"); + BMFCoordinate endCoord = BMFCoordinate( + positionSorta == false + ? double.tryParse(widget.arguments["lat"]) + : myLatLng.latitude, + positionSorta == false + ? double.tryParse(widget.arguments["lng"]) + : myLatLng.longitude); + BMFOpenRouteOption routeOption = BMFOpenRouteOption( + startCoord: startCoord, + startName: startName, + endCoord: endCoord, + endName: endName, + routeType: navigationType == 1 + ? BMFOpenRouteType.WalkingRoute + : navigationType == 2 + ? BMFOpenRouteType.WalkingRoute + : navigationType == 3 + ? BMFOpenRouteType.TransitRoute + : BMFOpenRouteType.DrivingRoute, + appScheme: 'baidumapsdk_flutter://mapsdk.baidu.com', + // 指定返回自定义scheme + isSupportWeb: true); + BMFOpenErrorCode flag = + await BMFOpenMapUtils.openBaiduMapRoute(routeOption); + print('open - route - errorCode = $flag'); + } + + updateMapLine(List coordinates, int needHours, int needMinutes, + double needDistance) { + try { + //刪除之前的創建的點和綫 + _mapController.cleanAllMarkers(); + if (polylineId != null) _mapController.removeOverlay(polylineId); + + BMFCoordinate startLocation = + BMFCoordinate(coordinates.first.latitude, coordinates.first.longitude); + + BMFCoordinate endLocation = + BMFCoordinate(coordinates.last.latitude, coordinates.last.longitude); + + /// 创建polyline + BMFPolyline colorsPolyline = BMFPolyline( + // id: polylineOptions.hashCode.toString(), + coordinates: coordinates, + indexs: [0], + textures: [ + navigationType != 4 + ? 'assets/image/traffic_texture_unknown.png' + : 'assets/image/traffic_texture_smooth.png' + ], + width: 16, + lineDashType: BMFLineDashType.LineDashTypeNone, + lineCapType: BMFLineCapType.LineCapButt, + lineJoinType: BMFLineJoinType.LineJoinRound); + polylineId = colorsPolyline.id; + + /// 添加polyline + _mapController.addPolyline(colorsPolyline); + var startBmfMarker = BMFMarker.icon( + position: startLocation, + centerOffset: BMFPoint(0.5, 0.7), + enabled: false, + icon: "assets/image/icon_start.png", + draggable: false, + ); + _mapController.addMarker(startBmfMarker); + + var terminalBmfMarker = BMFMarker.icon( + position: endLocation, + centerOffset: BMFPoint(0.5, 0.7), + enabled: false, + icon: "assets/image/icon_end.png", + draggable: false, + ); + _mapController.addMarker(terminalBmfMarker); + _mapController.setVisibleMapRectWithPadding( + visibleMapBounds: BMFCoordinateBounds( + northeast: startLocation, southwest: endLocation), + animated: true, + insets: EdgeInsets.only( + top: 500, bottom: 200, left: 200, right: 200)); + + hours = needHours == 0 ? "" : "$needHours小时"; + minutes = needMinutes == 0 ? "" : "$needMinutes分钟"; + distance = needDistance; + }finally{ + setState(() {}); + EasyLoading.dismiss(); + } + } + + navigationPosition() async { + EasyLoading.show( + status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); + BMFPlanNode from = BMFPlanNode( + cityName: positionSorta == false ? myCity : (storeInfo?.city ?? ""), + name: positionSorta == false ? myAddress : storeInfo?.address ?? "", + pt: positionSorta == false + ? BMFCoordinate(myLatLng?.latitude ?? 0, myLatLng?.longitude ?? 0) + : latLng); + BMFPlanNode to = BMFPlanNode( + cityName: positionSorta == false ? (storeInfo?.city ?? "") : myCity, + name: positionSorta == false ? (storeInfo?.address ?? "") : myAddress, + pt: positionSorta == false + ? latLng + : BMFCoordinate(myLatLng?.latitude ?? 0, myLatLng?.longitude ?? 0)); + if (navigationType == 1) { + //步行 + BMFWalkingRoutePlanOption walkingRoutePlanOption = + BMFWalkingRoutePlanOption(from: from, to: to); + // 检索实例 + BMFWalkingRouteSearch walkingRouteSearch = BMFWalkingRouteSearch(); + // 检索回调 + walkingRouteSearch.onGetWalkingRouteSearchResult(callback: + (BMFWalkingRouteResult result, BMFSearchErrorCode errorCode) async { + if (errorCode == BMFSearchErrorCode.RESULT_NOT_FOUND) { + SmartDialog.showToast("该方案暂无可用的规划路线", alignment: Alignment.center); + EasyLoading.dismiss(); + return; + } else if (errorCode != BMFSearchErrorCode.NO_ERROR) { + SmartDialog.showToast("获取路线规划失败,请稍后再试", alignment: Alignment.center); + EasyLoading.dismiss(); + return; + } + print( + '`步行检索回调 errorCode = ${errorCode} \n result = ${result?.toMap()}'); + + /// 坐标点 + List coordinates = []; + result.routes.first.steps.forEach((e1) { + e1.points.forEach((e2) { + coordinates.add(BMFCoordinate(e2.latitude, e2.longitude)); + }); + }); + updateMapLine( + coordinates, + result.routes.first.duration.hours, + result.routes.first.duration.minutes, + result.routes.first.distance.toDouble()); + }); + bool flag = + await walkingRouteSearch.walkingRouteSearch(walkingRoutePlanOption); + } else if (navigationType == 2) { + //骑行 + BMFRidingRoutePlanOption ridingRoutePlanOption = + BMFRidingRoutePlanOption(from: from, to: to); + BMFRidingRouteSearch ridingRouteSearch = BMFRidingRouteSearch(); + ridingRouteSearch.onGetRidingRouteSearchResult(callback: + (BMFRidingRouteResult result, BMFSearchErrorCode errorCode) { + if (errorCode == BMFSearchErrorCode.RESULT_NOT_FOUND) { + SmartDialog.showToast("该方案暂无可用的规划路线", alignment: Alignment.center); + EasyLoading.dismiss(); + return; + } else if (errorCode != BMFSearchErrorCode.NO_ERROR) { + SmartDialog.showToast("获取路线规划失败,请稍后再试", alignment: Alignment.center); + EasyLoading.dismiss(); + return; + } + print( + '`骑行检索回调 errorCode = ${errorCode} \n result = ${result?.toMap()}'); + + /// 坐标点 + List coordinates = []; + result.routes.first.steps.forEach((e1) { + e1.points.forEach((e2) { + coordinates.add(BMFCoordinate(e2.latitude, e2.longitude)); + }); + }); + updateMapLine( + coordinates, + result.routes.first.duration.hours, + result.routes.first.duration.minutes, + result.routes.first.distance.toDouble()); + }); +// 发起检索 + bool flag = + await ridingRouteSearch.ridingRouteSearch(ridingRoutePlanOption); + } else if (navigationType == 3) { + //公交 + BMFTransitRoutePlanOption transitRoutePlanOption = + BMFTransitRoutePlanOption(from: from, to: to, city: '武汉市'); + BMFTransitRouteSearch transitRouteSearch = BMFTransitRouteSearch(); + transitRouteSearch.onGetTransitRouteSearchResult(callback: + (BMFTransitRouteResult result, BMFSearchErrorCode errorCode) { + if (errorCode == BMFSearchErrorCode.RESULT_NOT_FOUND) { + SmartDialog.showToast("该方案暂无可用的规划路线", alignment: Alignment.center); + EasyLoading.dismiss(); + return; + } else if (errorCode != BMFSearchErrorCode.NO_ERROR) { + SmartDialog.showToast("获取路线规划失败,请稍后再试", alignment: Alignment.center); + EasyLoading.dismiss(); + return; + } + print( + '`市内公交检索回调 errorCode = ${errorCode} \n result = ${result?.toMap()}'); + + /// 坐标点 + List coordinates = []; + result.routes.first.steps.forEach((e1) { + e1.points.forEach((e2) { + coordinates.add(BMFCoordinate(e2.latitude, e2.longitude)); + }); + }); + updateMapLine( + coordinates, + result.routes.first.duration.hours, + result.routes.first.duration.minutes, + result.routes.first.distance.toDouble()); + }); +// 发起检索 + bool flag = + await transitRouteSearch.transitRouteSearch(transitRoutePlanOption); + } else { + //驾车 + BMFDrivingRoutePlanOption drivingRoutePlanOption = + BMFDrivingRoutePlanOption(from: from, to: to); + BMFDrivingRouteSearch drivingRouteSearch = BMFDrivingRouteSearch(); + drivingRouteSearch.onGetDrivingRouteSearchResult(callback: + (BMFDrivingRouteResult result, BMFSearchErrorCode errorCode) { + if (errorCode == BMFSearchErrorCode.RESULT_NOT_FOUND) { + SmartDialog.showToast("该方案暂无可用的规划路线", alignment: Alignment.center); + EasyLoading.dismiss(); + return; + } else if (errorCode != BMFSearchErrorCode.NO_ERROR) { + SmartDialog.showToast("获取路线规划失败,请稍后再试", alignment: Alignment.center); + EasyLoading.dismiss(); + return; + } + print( + '驾车检索回调 errorCode = ${errorCode} \n result = ${result?.toMap()}'); + + /// 坐标点 + List coordinates = []; + result.routes.first.steps.forEach((e1) { + e1.points.forEach((e2) { + coordinates.add(BMFCoordinate(e2.latitude, e2.longitude)); + }); + }); + updateMapLine( + coordinates, + result.routes.first.duration.hours, + result.routes.first.duration.minutes, + result.routes.first.distance.toDouble()); + }); +// 发起检索 + bool flag = + await drivingRouteSearch.dringRouteSearch(drivingRoutePlanOption); + } + } + + Widget navigationBox() { + return Container( + height: 132.h, + margin: EdgeInsets.only( + top: MediaQuery.of(context).padding.top + 16.h, + left: 14.w, + right: 14.w), + padding: EdgeInsets.only(left: 12.w, right: 18.w, top: 8.h), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x08213303), + offset: Offset(0, 2), + blurRadius: 4, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.circular(6), ), - body: Container( - //BMFMapWidget 组件会自动默认沾满全屏,并且挡住所有遮盖物 ,BMFTextureMapWidget不会强制遮盖其他控件。 - child:BMFMapWidget( - mapOptions: BMFMapOptions( - center: BMFCoordinate( - double.tryParse(widget.arguments["lat"]), - double.tryParse(widget.arguments["lng"]), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + navigationState = 0; + }); + }, + child: Padding( + padding: EdgeInsets.only(top: 10.h, right: 10.w), + child: Icon( + Icons.arrow_back_ios, + color: Color(0xFF353535), + size: 24, + ), ), - showZoomControl: false, - showMapScaleBar: false, - zoomLevel: 12, ), - onBMFMapCreated: onMapCreated, - ) + Expanded( + child: Column( + children: [ + Container( + width: double.infinity, + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + borderRadius: BorderRadius.circular(6), + ), + padding: EdgeInsets.only( + top: 12.h, + bottom: 12.h, + left: 15.w, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + bottom: 14.h, + ), + child: Row( + children: [ + Container( + width: 4.h, + height: 4.h, + margin: EdgeInsets.only(right: 20.w), + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(6), + ), + ), + Expanded( + child: Text( + positionSorta == false + ? "我的位置" + : (storeInfo?.storeName ?? ""), + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color(0xFF0D0D0D), + fontSize: 14.sp, + fontWeight: MyFontWeight.semi_bold, + ), + )) + ], + ), + ), + Row( + children: [ + Container( + width: 4.h, + height: 4.h, + margin: EdgeInsets.only(right: 20.w), + decoration: BoxDecoration( + color: Color(0xFFFA5151), + borderRadius: BorderRadius.circular(6), + ), + ), + Expanded( + child: Text( + positionSorta == false + ? (storeInfo?.storeName ?? "") + : "我的位置", + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color(0xFF0D0D0D), + fontSize: 14.sp, + fontWeight: MyFontWeight.semi_bold, + ), + )) + ], + ) + ], + )), + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + positionSorta = !positionSorta; + navigationPosition(); + }, + child: Container( + padding: EdgeInsets.only(right: 24.w), + child: Image.asset( + "assets/image/position_sort.webp", + fit: BoxFit.fill, + height: 16.h, + width: 14.w, + ), + ), + ) + ], + ), + ), + SizedBox( + height: 12.h, + ), + Row( + children: [ + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + navigationType = 4; + navigationPosition(); + }, + child: Container( + decoration: BoxDecoration( + color: navigationType == 4 + ? Color(0xFFE8FFF2) + : Colors.transparent, + borderRadius: BorderRadius.circular(23), + ), + padding: + EdgeInsets.symmetric(vertical: 5.h, horizontal: 13.w), + child: Row( + children: [ + if (navigationType == 4) + Image.asset( + "assets/image/icon_drive.webp", + fit: BoxFit.fill, + height: 16.h, + width: 14.w, + ), + Padding( + padding: EdgeInsets.only(left: 2.w), + child: Text( + "驾车", + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: navigationType == 4 + ? Color(0xFF32A060) + : Colors.black, + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + ), + ), + ) + ], + ), + ), + )), + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + navigationType = 3; + navigationPosition(); + }, + child: Container( + decoration: BoxDecoration( + color: navigationType == 3 + ? Color(0xFFE8FFF2) + : Colors.transparent, + borderRadius: BorderRadius.circular(23), + ), + padding: EdgeInsets.symmetric( + vertical: 5.h, horizontal: 13.w), + child: Row( + children: [ + if (navigationType == 3) + Image.asset( + "assets/image/icon_transit.webp", + fit: BoxFit.fill, + height: 16.h, + width: 14.w, + ), + Padding( + padding: EdgeInsets.only(left: 2.w), + child: Text( + "公交", + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: navigationType == 3 + ? Color(0xFF32A060) + : Colors.black, + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + ), + ), + ) + ], + ), + ))), + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + navigationType = 2; + navigationPosition(); + }, + child: Container( + decoration: BoxDecoration( + color: navigationType == 2 + ? Color(0xFFE8FFF2) + : Colors.transparent, + borderRadius: BorderRadius.circular(23), + ), + padding: EdgeInsets.symmetric( + vertical: 5.h, horizontal: 13.w), + child: Row( + children: [ + if (navigationType == 2) + Image.asset( + "assets/image/icon_by_bike.webp", + fit: BoxFit.fill, + height: 16.h, + width: 14.w, + ), + Padding( + padding: EdgeInsets.only(left: 2.w), + child: Text( + "骑行", + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: navigationType == 2 + ? Color(0xFF32A060) + : Colors.black, + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + ), + ), + ) + ], + ), + ))), + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + navigationType = 1; + navigationPosition(); + }, + child: Container( + decoration: BoxDecoration( + color: navigationType == 1 + ? Color(0xFFE8FFF2) + : Colors.transparent, + borderRadius: BorderRadius.circular(23), + ), + padding: EdgeInsets.symmetric( + vertical: 5.h, horizontal: 13.w), + child: Row( + children: [ + if (navigationType == 1) + Image.asset( + "assets/image/icon_walk.webp", + fit: BoxFit.fill, + height: 16.h, + width: 14.w, + ), + Padding( + padding: EdgeInsets.only(left: 2.w), + child: Text( + "步行", + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: navigationType == 1 + ? Color(0xFF32A060) + : Colors.black, + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + ), + ), + ) + ], + ), + ))), + ], + ) + ], + )) + ], ), ); } + Widget navigationDistance() { + return Container( + height: 173.h, + padding: EdgeInsets.only(top: 16.h, left: 16.w, right: 16.w), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x08213303), + offset: Offset(0, 2), + blurRadius: 4, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.vertical( + top: Radius.circular(8), + ), + ), + child: Column( + // mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "${navigationType == 1 ? "步行" : navigationType == 2 ? "骑行" : navigationType == 3 ? "公交" : "驾车"}${(hours ?? "") + (minutes ?? "")}", + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 20.sp, + color: Color(0xFF0D0D0D), + fontWeight: MyFontWeight.bold, + ), + ), + Padding( + padding: EdgeInsets.only(left: 40.w), + child: Text( + (distance ?? 0) > 1000 + ? S.of(context).gongli( + ((distance ?? 0) / 1000 * 100).toInt() / 100.0) + : S + .of(context) + .mi(((distance ?? 0) * 100).toInt() / 100.0), + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 20.sp, + color: Color(0xFF0D0D0D), + fontWeight: MyFontWeight.bold, + ), + ), + ), + ], + ), + ), + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + navigationState = 1; + onOpenBaiduMapRoute(); + }); + }, + child: Container( + alignment: Alignment.center, + width: double.infinity, + padding: EdgeInsets.symmetric(vertical: 10.h), + margin: EdgeInsets.only(bottom: 30.h), + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(23), + ), + child: Text( + navigationType == 1 + ? "步行导航" + : navigationType == 2 + ? "骑行导航" + : navigationType == 3 + ? "公交导航" + : "驾车导航", + style: TextStyle( + fontSize: 20.sp, + color: Colors.white, + fontWeight: MyFontWeight.medium, + ), + ), + ), + ) + ], + ), + ); + } + + List itemServer(String businessService) { + if (businessService == null || businessService == "") return []; + var list = businessService.split(","); + return list + .map((e) => Container( + margin: EdgeInsets.only(right: 8.w), + child: RoundButton( + height: 17.h * AppUtils.textScale(context), + text: "$e", + backgroup: Color(0xFFFF7A1A), + padding: EdgeInsets.only( + left: 2.w, + right: 2.w, + ), + fontSize: 10.sp, + textColor: Colors.white, + ), + )) + .toList(); + } + BMFMapController _mapController; BMFCoordinate latLng; BMFCoordinate myLatLng; @@ -111,7 +1064,7 @@ class _LocationMap extends State { isAccuracyCircleShow: true, locationViewImage: 'assets/image/icon_my_location.webp', locationViewHierarchy: - BMFLocationViewHierarchy.LOCATION_VIEW_HIERARCHY_BOTTOM, + BMFLocationViewHierarchy.LOCATION_VIEW_HIERARCHY_BOTTOM, ); _mapController.updateLocationViewWithParam(displayParam); addMarker(); @@ -125,7 +1078,7 @@ class _LocationMap extends State { double.tryParse(widget.arguments["lng"])); if (bmfMarker == null && _mapController != null) { - bmfMarker = BMFMarker( + bmfMarker = BMFMarker.icon( position: latLng, centerOffset: BMFPoint(0.5, 0.7), enabled: false, @@ -134,11 +1087,6 @@ class _LocationMap extends State { ); _mapController.addMarker(bmfMarker); } - _mapController.updateMapOptions( - BMFMapOptions( - center: latLng, - zoomLevel: 15, - ), - ); + _mapController.setCenterCoordinate(latLng, true); } } diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index bf3a0217..95631d64 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -55,13 +55,8 @@ class UnionPageState extends State super.dispose(); WidgetsBinding.instance.removeObserver(this); if (Location.getInstance() != null && - Location - .getInstance() - .aMapFlutterLocation != null) - Location - .getInstance() - .aMapFlutterLocation - .stopLocation(); + Location.getInstance().aMapFlutterLocation != null) + Location.getInstance().aMapFlutterLocation.stopLocation(); } @override @@ -69,14 +64,8 @@ class UnionPageState extends State super.didChangeMetrics(); WidgetsBinding.instance.addPostFrameCallback((_) { setState(() { - print("object: ${MediaQuery - .of(context) - .viewInsets - .bottom}"); - if (MediaQuery - .of(context) - .viewInsets - .bottom == 0) { + print("object: ${MediaQuery.of(context).viewInsets.bottom}"); + if (MediaQuery.of(context).viewInsets.bottom == 0) { if (isKeyBoardShow) { isKeyBoardShow = false; //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 @@ -101,39 +90,46 @@ class UnionPageState extends State } }); queryIpInfo(); + // loadFinish(showLoading: false); } startLocation() async { bool powerFlag = false; - try { - powerFlag = await Location.getInstance().startLocation(context, - (BaiduLocation result) async { - if (result != null && - result.latitude != null && - result.longitude != null) { - print("location: $result"); - latLng = BMFCoordinate(result.latitude, result.longitude); - latLng = await BMFCalculateUtils.coordConvert( - coordinate: latLng, - fromType: BMF_COORD_TYPE.BD09LL, - toType: BMF_COORD_TYPE.COMMON); - await saveLatLng( - latLng, result.province, result.city, result.district); - print("union: Location result ${latLng.latitude} " - "${latLng.longitude}"); - Location.getInstance().stopLocation(); - } else { - await getLatLng(); - } - loadFinish(showLoading: false); - }); - } finally { - if (!powerFlag) { - if (await Permission.locationWhenInUse.status.isGranted) { - startLocation(); - } else + // bool finallyFlag = false; + try { + Future.delayed(Duration(seconds: 5), () { + // if (!finallyFlag) + Location.getInstance().stopLocation(); + }); + powerFlag = await Location.getInstance().startLocation(context, + (BaiduLocation result) async { + if (result != null && + result.latitude != null && + result.longitude != null) { + print("location: $result"); + latLng = BMFCoordinate(result.latitude, result.longitude); + latLng = await BMFCalculateUtils.coordConvert( + coordinate: latLng, + fromType: BMF_COORD_TYPE.BD09LL, + toType: BMF_COORD_TYPE.COMMON); + await saveLatLng( + latLng, result.province, result.city, result.district); + print("union: Location result ${latLng.latitude} " + "${latLng.longitude}"); + Location.getInstance().stopLocation(); + } else { + await getLatLng(); + } loadFinish(showLoading: false); - } + }); + } finally { + // finallyFlag = true; + if (!powerFlag) { + if (await Permission.locationWhenInUse.status.isGranted) { + startLocation(); + } else + loadFinish(showLoading: false); + } } } @@ -159,17 +155,24 @@ class UnionPageState extends State } queryIpInfo() async { - EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); - ApiService apiIpService = ApiService(Dio(), context: context, isIp: true); - IpData baseData = await apiIpService.getIpInfo().catchError((onError) {}); - if (baseData?.dz != null) { - areaName = baseData.dz.substring(baseData.dz.lastIndexOf(" ") +1).replaceAll("市", ""); + EasyLoading.show( + status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); + try { + ApiService apiIpService = ApiService(Dio(), context: context, isIp: true); + IpData baseData = await apiIpService.getIpInfo().catchError((onError) {}); + if (baseData?.city != null) { + areaName = baseData.city.replaceAll("市", ""); + } + } finally { + startLocation(); } - startLocation(); } loadFinish({bool showLoading = true}) { - if (showLoading) EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); + if (showLoading) + EasyLoading.show( + status: S.current.zhengzaijiazai, + maskType: EasyLoadingMaskType.black); _allKey = [GlobalKey(), GlobalKey(), GlobalKey(), GlobalKey()]; setState(() {}); } @@ -245,51 +248,40 @@ class UnionPageState extends State indicatorSize: TabBarIndicatorSize.label, //指示器与文字等宽 tabs: [ - MyTab(text: S - .of(context) - .quanbu), - MyTab(text: S - .of(context) - .chi), - MyTab(text: S - .of(context) - .he), - MyTab(text: S - .of(context) - .wan), + MyTab(text: S.of(context).quanbu), + MyTab(text: S.of(context).chi), + MyTab(text: S.of(context).he), + MyTab(text: S.of(context).wan), ], ), ), _allKey.isEmpty ? NoDataView( - src: "assets/image/di_zhi.webp", - isShowBtn: false, - text: "暂无店铺列表~", - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h), - ) + src: "assets/image/di_zhi.webp", + isShowBtn: false, + text: "暂无店铺列表~", + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h), + ) : Expanded( - child: TabBarView( - controller: tabController, - children: [ - UnionList(_allKey[0], "", latLng, - editingController.text, areaName), - UnionList(_allKey[1], "EATSTORE", latLng, - editingController.text, areaName), - UnionList(_allKey[2], "DRINKSTORE", latLng, - editingController.text, areaName), - UnionList(_allKey[3], "HAPPYSTORE", latLng, - editingController.text, areaName), - ], - ), - ) + child: TabBarView( + controller: tabController, + children: [ + UnionList(_allKey[0], "", latLng, + editingController.text, areaName), + UnionList(_allKey[1], "EATSTORE", latLng, + editingController.text, areaName), + UnionList(_allKey[2], "DRINKSTORE", latLng, + editingController.text, areaName), + UnionList(_allKey[3], "HAPPYSTORE", latLng, + editingController.text, areaName), + ], + ), + ) ], ), padding: - EdgeInsets.only(top: MediaQuery - .of(context) - .padding - .top + 17.h), + EdgeInsets.only(top: MediaQuery.of(context).padding.top + 17.h), decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, @@ -344,11 +336,14 @@ class UnionPageState extends State color: Color(0xFFB3B3B3), ), isCollapsed: true, - prefixIcon:Padding(padding: EdgeInsets.only(left: 5.w,right: 5.w),child: Image.asset( - "assets/image/icon_search.webp", - width: 16.h, - height: 16.h, - ),), + prefixIcon: Padding( + padding: EdgeInsets.only(left: 5.w, right: 5.w), + child: Image.asset( + "assets/image/icon_search.webp", + width: 16.h, + height: 16.h, + ), + ), prefixIconConstraints: BoxConstraints(), border: InputBorder.none, ), diff --git a/lib/union/union_select_city.dart b/lib/union/union_select_city.dart index e0d6d4bb..5856b5b4 100644 --- a/lib/union/union_select_city.dart +++ b/lib/union/union_select_city.dart @@ -67,8 +67,8 @@ class _UnionSelectCity extends State { isIp: true ); IpData baseData = await apiIpService.getIpInfo().catchError((onError) {}); - if (baseData?.dz != null) { - ipName = baseData.dz.substring(baseData.dz.lastIndexOf(" ")+1).replaceAll("市", ""); + if (baseData?.city != null) { + ipName = baseData.city.replaceAll("市", ""); if(ipName != widget.arguments["cityName"] ){ ipState=2; setState((){}); diff --git a/lib/utils/flutter_utils.dart b/lib/utils/flutter_utils.dart index 2811d185..4e53bdb5 100644 --- a/lib/utils/flutter_utils.dart +++ b/lib/utils/flutter_utils.dart @@ -1,3 +1,4 @@ +import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; @@ -10,11 +11,11 @@ import 'package:path_provider/path_provider.dart'; class AppUtils { ///计算距离(当前位置到店位置直线距离) static Future calculateDistance( - BMFCoordinate bmfCoordinate, BMFCoordinate myLatLng) async { + BMFCoordinate bmfCoordinate, BMFCoordinate myLatLng, {bool isMi = false}) async { double mi = await BMFCalculateUtils.getLocationDistance(bmfCoordinate, myLatLng); NumberFormat numberFormat = NumberFormat("#.#"); - return "${numberFormat.format(mi / 1000)}"; + return "${numberFormat.format(mi / (isMi ? 1 :1000))}"; } diff --git a/lib/view_widget/new_people_reward.dart b/lib/view_widget/new_people_reward.dart index ad29fd59..691c7708 100644 --- a/lib/view_widget/new_people_reward.dart +++ b/lib/view_widget/new_people_reward.dart @@ -27,7 +27,7 @@ class _NewPeopleReward extends State { width: double.infinity, height: 500.h, padding: EdgeInsets.only(top: 210.h), - margin: EdgeInsets.only(top: 20.h, left: 20, right: 20), + margin: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w), decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.fill, @@ -58,7 +58,7 @@ class _NewPeopleReward extends State { borderRadius: BorderRadius.circular(22.5), ), width: MediaQuery.of(context).size.width, - height: 40, + height: 40.h, alignment: Alignment.center, child: Text( S.of(context).lijilingqu, @@ -73,7 +73,7 @@ class _NewPeopleReward extends State { ], ), ), - SizedBox(height: 35), + SizedBox(height: 35.h), GestureDetector( onTap: () { setState(() { @@ -82,8 +82,8 @@ class _NewPeopleReward extends State { }, child: Image.asset( "assets/image/yq_qx.webp", - width: 34, - height: 34, + width: 34.h, + height: 34.h, ), ) ], @@ -117,7 +117,7 @@ class _NewPeopleReward extends State { image: AssetImage("assets/image/xin_rq.webp"), ), ), - margin: EdgeInsets.symmetric(horizontal: 60, vertical: 5), + margin: EdgeInsets.symmetric(horizontal: 50.w, vertical: 5.h), padding: EdgeInsets.only(left: 16.w, right: 25.w), child: Row( crossAxisAlignment: CrossAxisAlignment.center, @@ -150,13 +150,13 @@ class _NewPeopleReward extends State { ), ), Expanded(child:Padding( - padding: EdgeInsets.only(top: 4, bottom: 4,left:30), + padding: EdgeInsets.only(top: 4.h, bottom: 4.h,left:30.w), child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - firstLoginCouponList.storeName, + firstLoginCouponList.couponName, overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -166,7 +166,7 @@ class _NewPeopleReward extends State { ), ), Text( - firstLoginCouponList.couponName, + firstLoginCouponList.storeName, overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( diff --git a/pubspec.lock b/pubspec.lock index b3e4736d..3fa22321 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,161 +5,161 @@ packages: dependency: "direct main" description: name: ai_decimal_accuracy - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" android_intent_plus: dependency: "direct main" description: name: android_intent_plus - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.2" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.8.2" barcode: dependency: transitive description: name: barcode - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" barcode_widget: dependency: "direct main" description: name: barcode_widget - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.1" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" bubble_tab_indicator: dependency: "direct main" description: name: bubble_tab_indicator - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.1.6" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.1" chewie: dependency: transitive description: name: chewie - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.3" chewie_audio: dependency: "direct main" description: name: chewie_audio - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.4.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.16.0" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2" csslib: dependency: transitive description: name: csslib - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.17.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.5" dio: dependency: "direct main" description: name: dio - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.10" emoji_picker_flutter: dependency: "direct main" description: name: emoji_picker_flutter - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.4.1" event_bus: dependency: "direct main" description: name: event_bus - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "6.1.4" flare_flutter: dependency: "direct main" description: name: flare_flutter - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2" flutter: @@ -171,63 +171,63 @@ packages: dependency: "direct main" description: name: flutter_baidu_mapapi_base - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.2.0" flutter_baidu_mapapi_map: dependency: "direct main" description: name: flutter_baidu_mapapi_map - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.2.1" flutter_baidu_mapapi_search: dependency: "direct main" description: name: flutter_baidu_mapapi_search - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.2.0" flutter_baidu_mapapi_utils: dependency: "direct main" description: name: flutter_baidu_mapapi_utils - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.2.0" flutter_bmflocation: dependency: "direct main" description: name: flutter_bmflocation - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.2.1" flutter_datetime_picker: dependency: "direct main" description: name: flutter_datetime_picker - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.5.1" flutter_easyloading: dependency: "direct main" description: name: flutter_easyloading - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.5" + version: "3.0.0" flutter_html: dependency: "direct main" description: name: flutter_html - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.2.1" flutter_layout_grid: dependency: transitive description: name: flutter_layout_grid - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.6" flutter_localizations: @@ -239,70 +239,70 @@ packages: dependency: transitive description: name: flutter_math_fork - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.4.2+2" flutter_page_indicator: dependency: transitive description: name: flutter_page_indicator - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.0.3" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.14" flutter_screenutil: dependency: "direct main" description: name: flutter_screenutil - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "5.0.0+1" flutter_slidable: dependency: "direct main" description: name: flutter_slidable - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.2" + version: "1.3.0" flutter_smart_dialog: dependency: "direct main" description: name: flutter_smart_dialog - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "3.5.0" + version: "3.0.6" flutter_spinkit: dependency: "direct main" description: name: flutter_spinkit - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "5.2.0" + version: "5.0.0" flutter_staggered_grid_view: dependency: "direct main" description: name: flutter_staggered_grid_view - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.1" + version: "0.4.0" flutter_svg: dependency: "direct main" description: name: flutter_svg - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.22.0" flutter_swiper: dependency: "direct main" description: name: flutter_swiper - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.6" flutter_test: @@ -319,392 +319,399 @@ packages: dependency: "direct main" description: name: fluwx - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.9.0+2" font_awesome_flutter: dependency: "direct main" description: name: font_awesome_flutter - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" + source: hosted + version: "9.1.0" + gbk2utf8: + dependency: "direct main" + description: + name: gbk2utf8 + url: "https://pub.flutter-io.cn" source: hosted - version: "9.2.0" + version: "1.0.1" gradient_widgets: dependency: "direct main" description: name: gradient_widgets - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.6.0" graphs: dependency: transitive description: name: graphs - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.0" html: dependency: transitive description: name: html - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.15.3" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.4" image_pickers: dependency: "direct main" description: name: image_pickers - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.4+1" + version: "2.0.0" intl: dependency: "direct main" description: name: intl - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.17.0" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.6.4" json_annotation: dependency: "direct main" description: name: json_annotation - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.1" keframe: dependency: "direct main" description: name: keframe - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0" like_button: dependency: "direct main" description: name: like_button - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.5" + version: "2.0.2" logger: dependency: "direct main" description: name: logger - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.4.0" + version: "1.0.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.12.11" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.1.4" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.7.0" mqtt_client: dependency: "direct main" description: name: mqtt_client - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "9.6.8" nested: dependency: transitive description: name: nested - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" network_to_file_image: dependency: "direct main" description: name: network_to_file_image - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "4.0.1" number_precision: dependency: "direct main" description: name: number_precision - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2+1" numerus: dependency: transitive description: name: numerus - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.1" package_info: dependency: "direct main" description: name: package_info - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.8.1" path_drawing: dependency: transitive description: name: path_drawing - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.5.1+1" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.1" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.10" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.6" permission_handler: dependency: "direct main" description: name: permission_handler - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "5.1.0+2" + version: "5.0.1+1" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "5.0.0" photo_view: dependency: "direct main" description: name: photo_view - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.13.0" pin_input_text_field: dependency: "direct main" description: name: pin_input_text_field - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "4.4.1" + version: "4.1.2" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.3" process: dependency: transitive description: name: process - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "4.2.4" provider: dependency: transitive description: name: provider - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "6.0.5" pull_to_refresh: dependency: "direct main" description: name: pull_to_refresh - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" qr: dependency: transitive description: name: qr - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" qr_flutter: dependency: "direct main" description: name: qr_flutter - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "4.0.0" quiver: dependency: transitive description: name: quiver - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.2.1" retrofit: dependency: "direct main" description: name: retrofit - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.4+1" rive: dependency: "direct main" description: name: rive - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.6.8" rxdart: dependency: "direct main" description: name: rxdart - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.26.0" scan: dependency: "direct main" description: name: scan - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.6.0" + version: "1.5.0" shared_preferences: dependency: "direct main" description: name: shared_preferences - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.20" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.17" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.5" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.5" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.6" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.5" sharesdk_plugin: dependency: "direct main" description: name: sharesdk_plugin - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.10" + version: "1.3.4" shimmer: dependency: "direct main" description: name: shimmer - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0" simple_gesture_detector: dependency: transitive description: name: simple_gesture_detector - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.1.6" sky_engine: @@ -716,65 +723,65 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.8.2" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" table_calendar: dependency: "direct main" description: name: table_calendar - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.3.3" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.4.9" thumbnails: dependency: "direct main" description: name: thumbnails - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.1" tobias: dependency: "direct main" description: name: tobias - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.4.2" + version: "2.4.1" tpns_flutter_plugin: dependency: "direct main" description: @@ -788,175 +795,140 @@ packages: dependency: transitive description: name: transformer_page_view - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.1.6" tuple: dependency: transitive description: name: tuple - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.2" umeng_common_sdk: dependency: "direct main" description: name: umeng_common_sdk - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.6" + version: "1.2.3" url_launcher: dependency: "direct main" description: name: url_launcher - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "5.7.10" - url_launcher_linux: - dependency: transitive - description: - name: url_launcher_linux - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+4" - url_launcher_macos: - dependency: transitive - description: - name: url_launcher_macos - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+9" - url_launcher_platform_interface: - dependency: transitive - description: - name: url_launcher_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.9" - url_launcher_web: - dependency: transitive - description: - name: url_launcher_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.5+3" - url_launcher_windows: - dependency: transitive - description: - name: url_launcher_windows - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+3" + version: "5.0.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.2" video_player: dependency: "direct main" description: name: video_player - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.2.19" video_player_android: dependency: transitive description: name: video_player_android - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.3.4" video_player_avfoundation: dependency: transitive description: name: video_player_avfoundation - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.3.9" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "4.2.0" video_player_web: dependency: transitive description: name: video_player_web - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.15" wakelock: dependency: transitive description: name: wakelock - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.6.2" wakelock_macos: dependency: transitive description: name: wakelock_macos - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.4.0" wakelock_platform_interface: dependency: transitive description: name: wakelock_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.3.0" wakelock_web: dependency: transitive description: name: wakelock_web - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.4.0" wakelock_windows: dependency: transitive description: name: wakelock_windows - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.1" webview_flutter: dependency: transitive description: name: webview_flutter - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.14" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.4" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "5.4.1" sdks: diff --git a/pubspec.yaml b/pubspec.yaml index 6f52ab0b..c3ac0772 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: 一心回乡. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 3.2.16+60 +version: 3.2.20+63 environment: sdk: ">=2.7.0 <3.0.0" @@ -13,9 +13,9 @@ dependencies: sdk: flutter flutter_localizations: sdk: flutter - fluwx: ^3.9.0+2 + fluwx: 3.9.0+2 - tobias: ^2.4.1 + tobias: 2.4.1 gradient_widgets: ^0.6.0 @@ -38,11 +38,11 @@ dependencies: permission_handler: ^5.0.1+1 - flutter_bmflocation: ^3.2.1 - flutter_baidu_mapapi_base: ^3.2.0 - flutter_baidu_mapapi_map: ^3.2.1 - flutter_baidu_mapapi_search: ^3.2.0 - flutter_baidu_mapapi_utils: ^3.2.0 + flutter_bmflocation: 3.2.1 + flutter_baidu_mapapi_base: 3.2.0 + flutter_baidu_mapapi_map: 3.2.1 + flutter_baidu_mapapi_search: 3.2.0 + flutter_baidu_mapapi_utils: 3.2.0 dio: ^3.0.10 rxdart: ^0.26.0 @@ -52,9 +52,11 @@ dependencies: pin_input_text_field: ^4.1.2 android_intent_plus: ^1.0.2 - flutter_screenutil: ^5.0.0+1 + flutter_screenutil: 5.0.0+1 bubble_tab_indicator: ^0.1.6 + gbk2utf8: ^1.0.1 + event_bus: ^2.0.0 intl: ^0.17.0 shared_preferences: ^2.0.6