This commit is contained in:
Mohamed Nouffer
2022-07-27 19:43:12 +05:30
parent 3e001cc485
commit 16cf0e1434
3 changed files with 68 additions and 80 deletions

View File

@ -87,26 +87,55 @@ class _DestinationMapPageState extends State<DestinationMapPage> {
List<Marker> pts = [];
for(Destination d in destinationController.destinations){
//print("-----lat ${lat}, ----- lon ${lan}");
Marker m = Marker(point: LatLng(d.lat!, d.lon!), builder:(cts){
Marker m = Marker(
point: LatLng(d.lat!, d.lon!),
anchorPos: AnchorPos.align(AnchorAlign.center),
builder:(cts){
return Container(
color: Colors.transparent,
child: new Container(
decoration: new BoxDecoration(
color: Colors.red,
borderRadius: new BorderRadius.only(
topLeft: const Radius.circular(40.0),
topRight: const Radius.circular(40.0),
)
),
child: new Center(
child: new Text("Hi modal sheet"),
)
));
//return Icon(Icons.pin_drop);
return IconButton(
onPressed: ()async {
Destination? fs = await destinationController.getDEstinationForLatLong(d.lat!, d.lon!);
print("-- Destination is --- ${fs!.name} ------");
if(fs != null){
if(indexController.currentDestinationFeature.length > 0) {
indexController.currentDestinationFeature.clear();
}
indexController.currentDestinationFeature.add(fs);
//indexController.getAction();
// return IconButton(
// onPressed: ()async {
// Destination? fs = await destinationController.getDEstinationForLatLong(d.lat!, d.lon!);
// print("-- Destination is --- ${fs!.name} ------");
// if(fs != null){
// if(indexController.currentDestinationFeature.length > 0) {
// indexController.currentDestinationFeature.clear();
// }
// indexController.currentDestinationFeature.add(fs);
// //indexController.getAction();
showModalBottomSheet(context: context, isScrollControlled: true,
//builder:((context) => BottomSheetWidget())
builder:((context) => BottomSheetNew())
);
}
},
icon: Icon(Icons.pin_drop));
// showModalBottomSheet(context: context, isScrollControlled: true,
// //builder:((context) => BottomSheetWidget())
// builder:((context) => BottomSheetNew())
// );
// }
// },
// icon: Container(
// width: 60,
// height: 60,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(d.checkin_radious ?? 0),
// color: Colors.transparent,
// border: BoxBorder()
// ),
// child: Icon(Icons.pin_drop)
// )
// );
});