| | |
| | | if (deleteAd && expressAd == null) { |
| | | return; |
| | | } |
| | | Widget ad = CSJAdUtil.loadExpress( |
| | | "947239180", MediaQuery.of(context).size.width - 20, 190, |
| | | (success, msg) { |
| | | Widget? ad = AdUtil.loadExpress( |
| | | await AdUtil.getAdInfo(AdPosition.searchExpress), |
| | | MediaQuery.of(context).size.width - 20, |
| | | 190, (success, msg) { |
| | | setState(() { |
| | | expressAd = null; |
| | | deleteAd = true; |
| | |
| | | //banner广告 |
| | | Widget? _banner; |
| | | |
| | | loadBanner() { |
| | | loadBanner() async { |
| | | if (_banner != null) { |
| | | return; |
| | | } |
| | | Widget ad = CSJAdUtil.loadBanner( |
| | | "947242084", |
| | | Widget? ad = AdUtil.loadBanner( |
| | | await AdUtil.getAdInfo(AdPosition.searchResultBanner), |
| | | MediaQuery.of(context).size.width, |
| | | MediaQuery.of(context).size.width / 4, (success, msg) { |
| | | setState(() { |
| | |
| | | double? distance; |
| | | if (Global.currentPosition != null) { |
| | | distance = await MapUtil.getDistance( |
| | | Global.currentPosition!, BMFCoordinate.fromMap(info!.pt!.toMap())); |
| | | Global.currentPosition!, BMFCoordinate.fromMap(info.pt!.toMap())); |
| | | } |
| | | distance ??= 0; |
| | | info.distance = distance.toInt(); |