-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdata.dart
More file actions
25 lines (23 loc) · 705 Bytes
/
Copy pathdata.dart
File metadata and controls
25 lines (23 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import 'package:flutter/material.dart';
import 'package:universe/universe.dart';
class MarkerWithDataMap extends StatelessWidget {
const MarkerWithDataMap({super.key});
@override
Widget build(BuildContext context) {
return U.OpenStreetMap(
center: [51.555158, -0.108343],
zoom: 16,
markers: U.MarkerLayer(
[51.556669, -0.108123],
data: 'Arsenal Football Club',
onTap: (latlng, data) {
ScaffoldMessenger.of(context).hideCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('Data: $data')),
);
},
),
// onReady: () => print('MapBox is ready!'),
);
}
}