|
|
@@ -150,20 +150,23 @@ class CommonPointSelectAddressPage
|
|
|
onTap: controller.backClick,
|
|
|
child: CommonView.getBackBtnView()),
|
|
|
Spacer(),
|
|
|
- Container(
|
|
|
- width: 50.w,
|
|
|
- height: 28.w,
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: ColorName.white,
|
|
|
- borderRadius: BorderRadius.circular(8.r),
|
|
|
- ),
|
|
|
- child: Center(
|
|
|
- child: Text(StringName.selectAddressDone,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 12.sp,
|
|
|
- color: ColorName.black90,
|
|
|
- fontWeight: FontWeight.bold)),
|
|
|
- )),
|
|
|
+ GestureDetector(
|
|
|
+ onTap: controller.onSelectAddressDone,
|
|
|
+ child: Container(
|
|
|
+ width: 50.w,
|
|
|
+ height: 28.w,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: ColorName.white,
|
|
|
+ borderRadius: BorderRadius.circular(8.r),
|
|
|
+ ),
|
|
|
+ child: Center(
|
|
|
+ child: Text(StringName.selectAddressDone,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.sp,
|
|
|
+ color: ColorName.black90,
|
|
|
+ fontWeight: FontWeight.bold)),
|
|
|
+ )),
|
|
|
+ ),
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
@@ -194,7 +197,7 @@ class CommonPointSelectAddressPage
|
|
|
child: CustomScrollView(
|
|
|
controller: scrollController,
|
|
|
slivers: [
|
|
|
- SliverToBoxAdapter(child: buildCurrentLocationView()),
|
|
|
+ SliverToBoxAdapter(child: buildRangeCenterLocationView()),
|
|
|
Obx(() {
|
|
|
return SliverList.builder(
|
|
|
itemBuilder: (ctx, index) =>
|
|
|
@@ -207,49 +210,46 @@ class CommonPointSelectAddressPage
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget buildCurrentLocationView() {
|
|
|
- return GestureDetector(
|
|
|
- onTap: controller.moveToCurrentLocation,
|
|
|
- child: Container(
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: '#F2F5FE'.color,
|
|
|
- borderRadius: BorderRadius.circular(8.r),
|
|
|
- border: Border.all(
|
|
|
- color: '#D0D9F4'.color,
|
|
|
- width: 0.5.w,
|
|
|
- ),
|
|
|
- ),
|
|
|
- margin: EdgeInsets.only(left: 12.w, right: 12.w, bottom: 8.w, top: 4.w),
|
|
|
- padding: EdgeInsets.symmetric(horizontal: 13.w, vertical: 8.w),
|
|
|
- child: Row(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
- children: [
|
|
|
- Container(
|
|
|
- margin: EdgeInsets.only(top: 3.w),
|
|
|
- child:
|
|
|
- Assets.images.iconSelectCurrentLocation.image(width: 10.w)),
|
|
|
- SizedBox(width: 8.w),
|
|
|
- Column(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
- children: [
|
|
|
- Text(StringName.currentLocation,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 12.sp,
|
|
|
- color: ColorName.black90,
|
|
|
- fontWeight: FontWeight.bold)),
|
|
|
- SizedBox(height: 4.w),
|
|
|
- Obx(() {
|
|
|
- return Text(
|
|
|
- addressCheck(
|
|
|
- controller.mineUserInfo.lastLocation.value?.address),
|
|
|
- style:
|
|
|
- TextStyle(fontSize: 10.sp, color: ColorName.black50));
|
|
|
- })
|
|
|
- ],
|
|
|
- )
|
|
|
- ],
|
|
|
+ Widget buildRangeCenterLocationView() {
|
|
|
+ return Container(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: '#F2F5FE'.color,
|
|
|
+ borderRadius: BorderRadius.circular(8.r),
|
|
|
+ border: Border.all(
|
|
|
+ color: '#D0D9F4'.color,
|
|
|
+ width: 0.5.w,
|
|
|
),
|
|
|
),
|
|
|
+ margin: EdgeInsets.only(left: 12.w, right: 12.w, bottom: 8.w, top: 4.w),
|
|
|
+ padding: EdgeInsets.symmetric(horizontal: 13.w, vertical: 8.w),
|
|
|
+ child: Row(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.only(top: 3.w),
|
|
|
+ child:
|
|
|
+ Assets.images.iconSelectCurrentLocation.image(width: 10.w)),
|
|
|
+ SizedBox(width: 8.w),
|
|
|
+ Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ Text(StringName.currentLocation,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.sp,
|
|
|
+ color: ColorName.black90,
|
|
|
+ fontWeight: FontWeight.bold)),
|
|
|
+ SizedBox(height: 4.w),
|
|
|
+ Obx(() {
|
|
|
+ return Text(
|
|
|
+ controller.currentRangeCenterLocation?.address ??
|
|
|
+ StringName.selectAddressPlease,
|
|
|
+ style:
|
|
|
+ TextStyle(fontSize: 10.sp, color: ColorName.black50));
|
|
|
+ })
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -304,6 +304,7 @@ class CommonPointSelectAddressPage
|
|
|
keyboardType: TextInputType.text,
|
|
|
textAlignVertical: TextAlignVertical.center,
|
|
|
textInputAction: TextInputAction.next,
|
|
|
+ onChanged: (txt) => controller.onSearchTextChange(txt),
|
|
|
decoration: InputDecoration(
|
|
|
hintText:
|
|
|
StringName.selectAddressPleaseEnterPlaceName,
|
|
|
@@ -421,7 +422,9 @@ class CommonPointSelectAddressPage
|
|
|
|
|
|
Widget buildPoiSearchItem(PoiItem item) {
|
|
|
return GestureDetector(
|
|
|
- onTap: controller.onPoiItemClick(item),
|
|
|
+ onTap: () {
|
|
|
+ controller.onPoiItemClick(item);
|
|
|
+ },
|
|
|
child: Container(
|
|
|
margin: EdgeInsets.only(left: 12.w, right: 12.w, bottom: 8.w, top: 4.w),
|
|
|
padding: EdgeInsets.only(left: 13.w, top: 8.w, bottom: 8.w),
|