|
|
|
@ -1,15 +1,15 @@
|
|
|
|
|
import 'dart:io'; |
|
|
|
|
import 'dart:ui'; |
|
|
|
|
|
|
|
|
|
import 'package:amap_flutter_location/amap_flutter_location.dart'; |
|
|
|
|
import 'package:amap_flutter_location/amap_location_option.dart'; |
|
|
|
|
import 'package:android_intent_plus/android_intent.dart'; |
|
|
|
|
import 'package:dio/dio.dart'; |
|
|
|
|
import 'package:flutter/cupertino.dart'; |
|
|
|
|
import 'package:flutter/foundation.dart'; |
|
|
|
|
import 'package:flutter/gestures.dart'; |
|
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
|
import 'package:flutter/services.dart'; |
|
|
|
|
import 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart'; |
|
|
|
|
import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart'; |
|
|
|
|
import 'package:flutter_bmflocation/bdmap_location_flutter_plugin.dart'; |
|
|
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
|
import 'package:huixiang/main.dart'; |
|
|
|
@ -21,8 +21,6 @@ import 'package:huixiang/view_widget/classic_header.dart';
|
|
|
|
|
import 'package:huixiang/view_widget/custom_image.dart'; |
|
|
|
|
import 'package:huixiang/view_widget/icon_text.dart'; |
|
|
|
|
import 'package:huixiang/view_widget/item_title.dart'; |
|
|
|
|
import 'package:amap_flutter_base/amap_flutter_base.dart'; |
|
|
|
|
import 'package:amap_flutter_map/amap_flutter_map.dart'; |
|
|
|
|
import 'package:huixiang/view_widget/request_permission.dart'; |
|
|
|
|
import 'package:permission_handler/permission_handler.dart'; |
|
|
|
|
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
|
|
|
@ -30,6 +28,7 @@ import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
|
import 'dart:typed_data'; |
|
|
|
|
import 'package:flutter/rendering.dart'; |
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
|
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; |
|
|
|
|
|
|
|
|
|
class UnionPage extends StatefulWidget { |
|
|
|
|
@override |
|
|
|
@ -40,28 +39,15 @@ class UnionPage extends StatefulWidget {
|
|
|
|
|
|
|
|
|
|
class _UnionPage extends State<UnionPage> |
|
|
|
|
with AutomaticKeepAliveClientMixin, WidgetsBindingObserver { |
|
|
|
|
//默认设置为不使用自定义地图,如果需要直接显示,在初始化是设置为true |
|
|
|
|
CustomStyleOptions _customStyleOptions = CustomStyleOptions(false); |
|
|
|
|
|
|
|
|
|
//加载自定义地图样式 |
|
|
|
|
void _loadCustomData() async { |
|
|
|
|
if (null == _customStyleOptions) { |
|
|
|
|
_customStyleOptions = CustomStyleOptions(false); |
|
|
|
|
} |
|
|
|
|
ByteData styleByteData = |
|
|
|
|
await rootBundle.load('assets/map_style/style.data'); |
|
|
|
|
_customStyleOptions.styleData = styleByteData.buffer.asUint8List(); |
|
|
|
|
ByteData styleExtraByteData = |
|
|
|
|
await rootBundle.load('assets/map_style/style_extra.data'); |
|
|
|
|
_customStyleOptions.styleExtraData = |
|
|
|
|
styleExtraByteData.buffer.asUint8List(); |
|
|
|
|
//如果需要加载完成后直接展示自定义地图,可以通过setState修改CustomStyleOptions的enable为true |
|
|
|
|
setState(() { |
|
|
|
|
_customStyleOptions.enabled = true; |
|
|
|
|
_mapController.setCustomMapStyle('assets/map_style/chatian.sty', 0); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
AMapFlutterLocation aMapFlutterLocation; |
|
|
|
|
LocationFlutterPlugin aMapFlutterLocation; |
|
|
|
|
RefreshController refreshController = |
|
|
|
|
RefreshController(initialRefresh: false); |
|
|
|
|
|
|
|
|
@ -70,7 +56,6 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
super.dispose(); |
|
|
|
|
WidgetsBinding.instance.removeObserver(this); |
|
|
|
|
aMapFlutterLocation.stopLocation(); |
|
|
|
|
aMapFlutterLocation.destroy(); |
|
|
|
|
|
|
|
|
|
refreshController.dispose(); |
|
|
|
|
} |
|
|
|
@ -105,36 +90,38 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
WidgetsBinding.instance.addObserver(this); |
|
|
|
|
|
|
|
|
|
if (aMapFlutterLocation == null) { |
|
|
|
|
AMapFlutterLocation.setApiKey("f39d1daa020a56f208eb2519f63e9534", |
|
|
|
|
"feaae7986201b571cace1b83728be5bb"); |
|
|
|
|
aMapFlutterLocation = AMapFlutterLocation(); |
|
|
|
|
aMapFlutterLocation.onLocationChanged().listen((event) { |
|
|
|
|
aMapFlutterLocation = LocationFlutterPlugin(); |
|
|
|
|
aMapFlutterLocation.onResultCallback().listen((event) { |
|
|
|
|
if (event != null && |
|
|
|
|
event["latitude"] != null && |
|
|
|
|
event["longitude"] != null) { |
|
|
|
|
print("location: $event"); |
|
|
|
|
if (event["latitude"] is String && event["longitude"] is String) { |
|
|
|
|
latLng = LatLng(double.tryParse(event["latitude"]), |
|
|
|
|
latLng = BMFCoordinate(double.tryParse(event["latitude"]), |
|
|
|
|
double.tryParse(event["longitude"])); |
|
|
|
|
} else { |
|
|
|
|
latLng = LatLng(event["latitude"], event["longitude"]); |
|
|
|
|
latLng = BMFCoordinate(event["latitude"], event["longitude"]); |
|
|
|
|
} |
|
|
|
|
BMFCalculateUtils.coordConvert( |
|
|
|
|
coordinate: latLng, |
|
|
|
|
fromType: BMF_COORD_TYPE.COMMON, |
|
|
|
|
toType: BMF_COORD_TYPE.BD09LL).then((value) { |
|
|
|
|
this.latLng = value; |
|
|
|
|
saveLatLng( |
|
|
|
|
latLng, event["province"], event["city"], event["district"]); |
|
|
|
|
value, event["province"], event["city"], event["district"]); |
|
|
|
|
queryStore( |
|
|
|
|
"${event["latitude"]}", |
|
|
|
|
"${event["longitude"]}", |
|
|
|
|
"${value.latitude}", |
|
|
|
|
"${value.longitude}", |
|
|
|
|
event["province"], |
|
|
|
|
event["city"], |
|
|
|
|
event["district"], |
|
|
|
|
editingController.text); |
|
|
|
|
if (_mapController != null) |
|
|
|
|
_mapController.moveCamera( |
|
|
|
|
CameraUpdate.newCameraPosition(CameraPosition( |
|
|
|
|
target: latLng, |
|
|
|
|
zoom: 15.0, |
|
|
|
|
)), |
|
|
|
|
); |
|
|
|
|
_mapController.updateMapOptions(BMFMapOptions( |
|
|
|
|
center: value, |
|
|
|
|
zoomLevel: 15, |
|
|
|
|
)); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -146,15 +133,25 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
aMapFlutterLocation.setLocationOption(AMapLocationOption( |
|
|
|
|
needAddress: true, |
|
|
|
|
onceLocation: true, |
|
|
|
|
locationMode: AMapLocationMode.Hight_Accuracy, |
|
|
|
|
desiredAccuracy: DesiredAccuracy.HundredMeters, |
|
|
|
|
desiredLocationAccuracyAuthorizationMode: |
|
|
|
|
AMapLocationAccuracyAuthorizationMode.FullAndReduceAccuracy, |
|
|
|
|
pausesLocationUpdatesAutomatically: true, |
|
|
|
|
)); |
|
|
|
|
aMapFlutterLocation.prepareLoc({ |
|
|
|
|
"coorType": "bd09ll", |
|
|
|
|
"isNeedAddres": false, |
|
|
|
|
"isNeedAltitude": false, |
|
|
|
|
"isNeedLocationPoiList": false, |
|
|
|
|
"isNeedLocationDescribe": false, |
|
|
|
|
"isNeedNewVersionRgc": false, |
|
|
|
|
"scanspan": 0, |
|
|
|
|
"openGps": true, |
|
|
|
|
"locationMode": 2, |
|
|
|
|
}, { |
|
|
|
|
"locationMode": "kCLLocationAccuracyBest", |
|
|
|
|
"locationTimeout": 10, |
|
|
|
|
"reGeocodeTimeout": 10, |
|
|
|
|
"activityType": "CLActivityTypeAutomotiveNavigation", |
|
|
|
|
"BMKLocationCoordinateType": "BMKLocationCoordinateTypeBMK09LL", |
|
|
|
|
"BMKLocationCoordinateType": "BMKLocationCoordinateTypeBMK09LL", |
|
|
|
|
"isNeedNewVersionRgc": false, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
_loadCustomData(); |
|
|
|
|
|
|
|
|
@ -162,9 +159,9 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
startLocation(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
LatLng latLng; |
|
|
|
|
BMFCoordinate latLng; |
|
|
|
|
|
|
|
|
|
saveLatLng(LatLng latLng, province, city, district) async { |
|
|
|
|
saveLatLng(BMFCoordinate latLng, province, city, district) async { |
|
|
|
|
SharedPreferences prefs = await SharedPreferences.getInstance(); |
|
|
|
|
await prefs.setString("latitude", "${latLng.latitude}"); |
|
|
|
|
await prefs.setString("longitude", "${latLng.longitude}"); |
|
|
|
@ -186,7 +183,7 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
value.containsKey("city") && |
|
|
|
|
value.containsKey("district")) |
|
|
|
|
{ |
|
|
|
|
latLng = LatLng(double.tryParse(value.getString("latitude")), |
|
|
|
|
latLng = BMFCoordinate(double.tryParse(value.getString("latitude")), |
|
|
|
|
double.tryParse(value.getString("longitude"))), |
|
|
|
|
queryStore( |
|
|
|
|
value.getString("latitude"), |
|
|
|
@ -198,14 +195,10 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
), |
|
|
|
|
setState(() { |
|
|
|
|
if (_mapController != null) { |
|
|
|
|
_mapController.moveCamera( |
|
|
|
|
CameraUpdate.newCameraPosition( |
|
|
|
|
CameraPosition( |
|
|
|
|
target: latLng, |
|
|
|
|
zoom: 15.0, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
_mapController.updateMapOptions(BMFMapOptions( |
|
|
|
|
center: latLng, |
|
|
|
|
zoomLevel: 15, |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
@ -235,7 +228,7 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
storeList = (baseData.data as List<dynamic>) |
|
|
|
|
.map((e) => Store.fromJson(e)) |
|
|
|
|
.toList(); |
|
|
|
|
buildMarker(); |
|
|
|
|
// buildMarker(); |
|
|
|
|
refreshController.refreshCompleted(); |
|
|
|
|
if (mounted) setState(() {}); |
|
|
|
|
} else { |
|
|
|
@ -243,34 +236,20 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RepaintBoundary repaintBoundary; |
|
|
|
|
|
|
|
|
|
buildMarker() async { |
|
|
|
|
markers.clear(); |
|
|
|
|
|
|
|
|
|
BitmapDescriptor bitmapDescriptor = await BitmapDescriptor.fromAssetImage( |
|
|
|
|
ImageConfiguration( |
|
|
|
|
bundle: DefaultAssetBundle.of(context), |
|
|
|
|
devicePixelRatio: MediaQuery.of(context)?.devicePixelRatio ?? 1.0, |
|
|
|
|
locale: Localizations.localeOf(context), |
|
|
|
|
textDirection: Directionality.of(context), |
|
|
|
|
size: Size(35.w, 35.h), |
|
|
|
|
platform: defaultTargetPlatform, |
|
|
|
|
), |
|
|
|
|
"assets/image/icon_map_marker.png"); |
|
|
|
|
|
|
|
|
|
markers.addAll(storeList.map((element) => Marker( |
|
|
|
|
position: LatLng(double.tryParse(element.latitude), |
|
|
|
|
double.tryParse(element.longitude)), |
|
|
|
|
anchor: Offset(0.5, 0.9), |
|
|
|
|
clickable: false, |
|
|
|
|
icon: bitmapDescriptor, |
|
|
|
|
infoWindowEnable: true, |
|
|
|
|
))); |
|
|
|
|
if (mounted) setState(() {}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<Marker> markers = []; |
|
|
|
|
// buildMarker() async { |
|
|
|
|
// markers.clear(); |
|
|
|
|
// markers.addAll(storeList.map((element) => BMFMarker( |
|
|
|
|
// position: BMFCoordinate(double.tryParse(element.latitude), |
|
|
|
|
// double.tryParse(element.longitude)), |
|
|
|
|
// centerOffset: BMFPoint(0.5, 0.9), |
|
|
|
|
// enabled: false, |
|
|
|
|
// icon: "assets/image/icon_map_marker.png", |
|
|
|
|
// draggable: false, |
|
|
|
|
// ))); |
|
|
|
|
// if (mounted) setState(() {}); |
|
|
|
|
// } |
|
|
|
|
// |
|
|
|
|
// List<BMFMarker> markers = []; |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Widget build(BuildContext context) { |
|
|
|
@ -306,24 +285,17 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
// headerSliverBuilder: (context, inner) { |
|
|
|
|
// return [ |
|
|
|
|
// SliverOverlapAbsorber( |
|
|
|
|
// sliver: buildSliverAppBar(AMapWidget( |
|
|
|
|
// initialCameraPosition: CameraPosition( |
|
|
|
|
// target: LatLng(30.553111, 114.342366), |
|
|
|
|
// zoom: 12.0, |
|
|
|
|
// sliver: buildSliverAppBar(BMFMapWidget( |
|
|
|
|
// mapOptions: BMFMapOptions( |
|
|
|
|
// center: BMFCoordinate(30.553111, 114.342366), |
|
|
|
|
// zoomLevel: 12, |
|
|
|
|
// ), |
|
|
|
|
// onMapCreated: onMapCreated, |
|
|
|
|
// apiKey: aMapApiKeys, |
|
|
|
|
// touchPoiEnabled: true, |
|
|
|
|
// markers: markers.toSet(), |
|
|
|
|
// scrollGesturesEnabled: true, |
|
|
|
|
// customStyleOptions: _customStyleOptions, |
|
|
|
|
// onPoiTouched: (poiTouch) { |
|
|
|
|
// FocusScope.of(context).requestFocus(FocusNode()); |
|
|
|
|
// }, |
|
|
|
|
// gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>[ |
|
|
|
|
// Factory<OneSequenceGestureRecognizer>( |
|
|
|
|
// () => EagerGestureRecognizer()), |
|
|
|
|
// ].toSet(), |
|
|
|
|
// onBMFMapCreated: onMapCreated, |
|
|
|
|
// // customStyleOptions: _customStyleOptions, |
|
|
|
|
// // gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>[ |
|
|
|
|
// // Factory<OneSequenceGestureRecognizer>( |
|
|
|
|
// // () => EagerGestureRecognizer()), |
|
|
|
|
// // ].toSet(), |
|
|
|
|
// )), |
|
|
|
|
// handle: |
|
|
|
|
// NestedScrollView.sliverOverlapAbsorberHandleFor(context), |
|
|
|
@ -368,7 +340,7 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
itemCount: storeList == null ? 0 : storeList.length, |
|
|
|
|
// padding: EdgeInsets.only(top: 8.h, bottom: 84.h + (375.h - 88.h) + 4.h), |
|
|
|
|
padding: EdgeInsets.only( |
|
|
|
|
top: 17.h, bottom: 84.h /* + (375.h - 88.h) + 4.h*/), |
|
|
|
|
top: 8.h, bottom: 84.h /* + (375.h - 88.h) + 4.h*/), |
|
|
|
|
physics: NeverScrollableScrollPhysics(), |
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
return GestureDetector( |
|
|
|
@ -460,10 +432,10 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
AMapController _mapController; |
|
|
|
|
BMFMapController _mapController; |
|
|
|
|
TextEditingController editingController = TextEditingController(); |
|
|
|
|
|
|
|
|
|
void onMapCreated(AMapController controller) { |
|
|
|
|
void onMapCreated(BMFMapController controller) { |
|
|
|
|
_mapController = controller; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -482,61 +454,8 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
blurRadius: 14, |
|
|
|
|
spreadRadius: 0, |
|
|
|
|
) |
|
|
|
|
]), |
|
|
|
|
child: TextField( |
|
|
|
|
textInputAction: TextInputAction.search, |
|
|
|
|
onEditingComplete: () { |
|
|
|
|
startLocation(); |
|
|
|
|
}, |
|
|
|
|
controller: editingController, |
|
|
|
|
cursorHeight: 30.h, |
|
|
|
|
decoration: InputDecoration( |
|
|
|
|
contentPadding: EdgeInsets.symmetric(vertical: 12.h), |
|
|
|
|
prefixIcon: Icon( |
|
|
|
|
Icons.search, |
|
|
|
|
size: 24, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
suffixIcon: InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
editingController.clear(); |
|
|
|
|
}, |
|
|
|
|
child: Icon( |
|
|
|
|
Icons.close, |
|
|
|
|
size: 19, |
|
|
|
|
color: Colors.grey, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
border: InputBorder.none, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget buildSliverAppBar(AMapWidget map) { |
|
|
|
|
return SliverAppBar( |
|
|
|
|
// 滑上去时搜索隐藏 |
|
|
|
|
// floating: true, |
|
|
|
|
// snap: true, |
|
|
|
|
pinned: true, |
|
|
|
|
backgroundColor: Color(0xFFFAFAFA), |
|
|
|
|
elevation: 0, |
|
|
|
|
automaticallyImplyLeading: false, |
|
|
|
|
title: Container( |
|
|
|
|
height: 36.h, |
|
|
|
|
margin: EdgeInsets.fromLTRB(16.w, 0, 16.w, 0), |
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 6.h, 0, 6.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(4)), |
|
|
|
|
boxShadow: [ |
|
|
|
|
BoxShadow( |
|
|
|
|
color: Colors.black.withAlpha(12), |
|
|
|
|
offset: Offset(0, 3), |
|
|
|
|
blurRadius: 14, |
|
|
|
|
spreadRadius: 0, |
|
|
|
|
) |
|
|
|
|
]), |
|
|
|
|
child: TextField( |
|
|
|
|
textInputAction: TextInputAction.search, |
|
|
|
|
onEditingComplete: () { |
|
|
|
@ -564,30 +483,84 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
border: InputBorder.none, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
flexibleSpace: FlexibleSpaceBar( |
|
|
|
|
background: Container( |
|
|
|
|
child: map, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
expandedHeight: 375.h, |
|
|
|
|
bottom: PreferredSize( |
|
|
|
|
preferredSize: Size(double.infinity, 52.h), |
|
|
|
|
child: Container( |
|
|
|
|
padding: EdgeInsets.only(top: 6.h), |
|
|
|
|
color: Color(0xFFFAFAFA), |
|
|
|
|
child: ItemTitle( |
|
|
|
|
text: S.of(context).jingbilianmenghuiyuandian, |
|
|
|
|
imgPath: "assets/image/icon_union_store.png", |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Widget buildSliverAppBar(BMFMapWidget map) { |
|
|
|
|
// return SliverAppBar( |
|
|
|
|
// // 滑上去时搜索隐藏 |
|
|
|
|
// // floating: true, |
|
|
|
|
// // snap: true, |
|
|
|
|
// pinned: true, |
|
|
|
|
// backgroundColor: Color(0xFFFAFAFA), |
|
|
|
|
// elevation: 0, |
|
|
|
|
// automaticallyImplyLeading: false, |
|
|
|
|
// title: Container( |
|
|
|
|
// height: 36.h, |
|
|
|
|
// margin: EdgeInsets.fromLTRB(16.w, 0, 16.w, 0), |
|
|
|
|
// padding: EdgeInsets.fromLTRB(0, 6.h, 0, 6.h), |
|
|
|
|
// decoration: BoxDecoration( |
|
|
|
|
// color: Colors.white, |
|
|
|
|
// borderRadius: BorderRadius.all(Radius.circular(4)), |
|
|
|
|
// boxShadow: [ |
|
|
|
|
// BoxShadow( |
|
|
|
|
// color: Colors.black.withAlpha(12), |
|
|
|
|
// offset: Offset(0, 3), |
|
|
|
|
// blurRadius: 14, |
|
|
|
|
// spreadRadius: 0, |
|
|
|
|
// ) |
|
|
|
|
// ]), |
|
|
|
|
// child: TextField( |
|
|
|
|
// textInputAction: TextInputAction.search, |
|
|
|
|
// onEditingComplete: () { |
|
|
|
|
// startLocation(); |
|
|
|
|
// }, |
|
|
|
|
// controller: editingController, |
|
|
|
|
// cursorHeight: 30.h, |
|
|
|
|
// decoration: InputDecoration( |
|
|
|
|
// contentPadding: EdgeInsets.symmetric(vertical: 12.h), |
|
|
|
|
// prefixIcon: Icon( |
|
|
|
|
// Icons.search, |
|
|
|
|
// size: 24, |
|
|
|
|
// color: Colors.black, |
|
|
|
|
// ), |
|
|
|
|
// suffixIcon: InkWell( |
|
|
|
|
// onTap: () { |
|
|
|
|
// editingController.clear(); |
|
|
|
|
// }, |
|
|
|
|
// child: Icon( |
|
|
|
|
// Icons.close, |
|
|
|
|
// size: 19, |
|
|
|
|
// color: Colors.grey, |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// border: InputBorder.none, |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// flexibleSpace: FlexibleSpaceBar( |
|
|
|
|
// background: Container( |
|
|
|
|
// child: map, |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// expandedHeight: 375.h, |
|
|
|
|
// bottom: PreferredSize( |
|
|
|
|
// preferredSize: Size(double.infinity, 52.h), |
|
|
|
|
// child: Container( |
|
|
|
|
// padding: EdgeInsets.only(top: 6.h), |
|
|
|
|
// color: Color(0xFFFAFAFA), |
|
|
|
|
// child: ItemTitle( |
|
|
|
|
// text: S.of(context).jingbilianmenghuiyuandian, |
|
|
|
|
// imgPath: "assets/image/icon_union_store.png", |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// ); |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
Widget buildStoreItem(Store store, position) { |
|
|
|
|
return Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 16.h), |
|
|
|
|
margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h), |
|
|
|
|
padding: EdgeInsets.fromLTRB(20.w, 20.h, 20.w, 20.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
@ -651,6 +624,9 @@ class _UnionPage extends State<UnionPage>
|
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 4.h, |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|