refactored code to work with simple popup when marker is clicked

This commit is contained in:
2025-01-28 16:51:30 +01:00
parent 562c85079d
commit 89743886af
3 changed files with 49 additions and 22 deletions

View File

@@ -1,15 +1,18 @@
import 'package:flutter/material.dart';
class CustomMarker extends StatelessWidget {
const CustomMarker({super.key, this.label});
final String? label;
const CustomMarker({super.key, required this.onTap});
final void Function() onTap;
@override
Widget build(BuildContext context) {
return Icon(
Icons.location_on_sharp,
color: Theme.of(context).colorScheme.primary,
size: 30,
return GestureDetector(
onTap: onTap,
child: Icon(
Icons.location_on_sharp,
color: Theme.of(context).colorScheme.primary,
size: 30,
),
);
}
}