refactored code to work with simple popup when marker is clicked
This commit is contained in:
@@ -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,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user