Update: 2026-07-11 19:26:05

This commit is contained in:
Hamza-Ayed
2026-07-11 19:26:05 +03:00
parent ce2f3d5675
commit 8353c4cef4
3 changed files with 205 additions and 3 deletions
@@ -13,6 +13,7 @@ import 'rp_favorites.dart';
import 'rp_location_field.dart';
import 'rp_map_pick_overlay.dart';
import 'rp_theme.dart';
import 'rp_search_dialog.dart';
/// The route-planning surface anchored to the bottom of the map.
///
@@ -267,6 +268,15 @@ class _Expanded extends StatelessWidget {
onEmpty: s.clearPlacesStart,
onPickOnMap: RpActions.pickOtherPickupOnMap,
onResultTap: (i) => RpActions.selectStart(s.placesStart[i]),
searchable: false,
onTapField: () {
RpSearchDialog.show(
context: Get.context!,
accent: RP.origin,
hintText: 'Search for a starting point'.tr,
isOrigin: true,
);
},
);
}
// Regular order: origin = current location, changeable on the map.
@@ -276,11 +286,19 @@ class _Expanded extends StatelessWidget {
controller: s.placeStartController,
hintText: s.currentLocationString,
results: const [],
onPickOnMap: RpActions.pickMyStartOnMap,
onResultTap: (_) {},
searchable: false,
onQuery: (_) {},
onEmpty: () {},
onPickOnMap: RpActions.pickMyStartOnMap,
onResultTap: (_) {},
onTapField: () {
RpSearchDialog.show(
context: Get.context!,
accent: RP.origin,
hintText: s.currentLocationString,
isOrigin: true,
);
},
);
}
@@ -303,6 +321,15 @@ class _Expanded extends StatelessWidget {
},
onPickOnMap: RpActions.pickDestinationOnMap,
onResultTap: (i) => RpActions.selectDestination(i, s.placesDestination[i]),
searchable: false,
onTapField: () {
RpSearchDialog.show(
context: Get.context!,
accent: RP.destination,
hintText: s.hintTextDestinationPoint,
isOrigin: false,
);
},
onResultFavorite: (i) {
final res = s.placesDestination[i];
RpActions.addFavorite(