-
Notifications
You must be signed in to change notification settings - Fork 8
/
multistyles.dart
42 lines (40 loc) · 1.09 KB
/
multistyles.dart
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import 'package:flutter/material.dart';
import 'package:universe/universe.dart';
class MultiPolylineStylesMap extends StatelessWidget {
const MultiPolylineStylesMap({super.key});
@override
Widget build(BuildContext context) {
return U.OpenStreetMap(
center: [51.555015, -0.108331],
zoom: 16,
// multiple polylines with different styles
polylines: U.PolylineLayer(
[
U.Polyline(
[
[51.556650, -0.108170],
[51.554508, -0.109983],
[51.553968, -0.109650],
[51.554081, -0.107097],
[51.556203, -0.107762],
],
strokeColor: Colors.red,
strokeOpacity: 0.8,
isDotted: true,
),
U.Polyline(
[
[51.555856, -0.108363],
[51.555069, -0.109414],
[51.554228, -0.108481],
[51.555035, -0.107311],
[51.555062, -0.108363],
],
strokeColor: Colors.lightBlue,
strokeWidth: 4,
),
],
),
);
}
}