-
Notifications
You must be signed in to change notification settings - Fork 99
/
Copy pathui.dart
104 lines (80 loc) · 2.93 KB
/
ui.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of apple_maps_flutter;
/// Type of map tiles to display.
enum MapType {
/// Normal tiles (traffic and labels, subtle terrain information).
standard,
/// Satellite imaging tiles (aerial photos)
satellite,
/// Hybrid tiles (satellite images with some labels/overlays)
hybrid,
/// Satellite flyover tiles (aerial photos)
satelliteFlyover,
/// Hybrid flyover tiles (satellite images with some labels/overlays)
hybridFlyover,
/// Muted standard tiles (traffic and labels, subtle terrain information)
mutedStandard,
}
enum TrackingMode {
// the user's location is not followed
none,
// the map follows the user's location
follow,
// the map follows the user's location and heading
followWithHeading,
}
/// Bounds for the map camera target.
// Used with [AppleMapOptions] to wrap a [LatLngBounds] value. This allows
// distinguishing between specifying an unbounded target (null `LatLngBounds`)
// from not specifying anything (null `CameraTargetBounds`).
class CameraTargetBounds {
/// Creates a camera target bounds with the specified bounding box, or null
/// to indicate that the camera target is not bounded.
const CameraTargetBounds(this.bounds);
/// The geographical bounding box for the map camera target.
///
/// A null value means the camera target is unbounded.
final LatLngBounds? bounds;
/// Unbounded camera target.
static const CameraTargetBounds unbounded = CameraTargetBounds(null);
@override
bool operator ==(dynamic other) {
if (identical(this, other)) return true;
if (runtimeType != other.runtimeType) return false;
final CameraTargetBounds typedOther = other;
return bounds == typedOther.bounds;
}
@override
int get hashCode => bounds.hashCode;
@override
String toString() {
return 'CameraTargetBounds(bounds: $bounds)';
}
}
class MinMaxZoomPreference {
const MinMaxZoomPreference(this.minZoom, this.maxZoom)
: assert(minZoom == null || maxZoom == null || minZoom <= maxZoom);
/// The preferred minimum zoom level or null, if unbounded from below.
final double? minZoom;
/// The preferred maximum zoom level or null, if unbounded from above.
final double? maxZoom;
/// Unbounded zooming.
static const MinMaxZoomPreference unbounded =
MinMaxZoomPreference(null, null);
dynamic _toJson() => <dynamic>[minZoom, maxZoom];
@override
bool operator ==(dynamic other) {
if (identical(this, other)) return true;
if (runtimeType != other.runtimeType) return false;
final MinMaxZoomPreference typedOther = other;
return minZoom == typedOther.minZoom && maxZoom == typedOther.maxZoom;
}
@override
int get hashCode => hashValues(minZoom, maxZoom);
@override
String toString() {
return 'MinMaxZoomPreference(minZoom: $minZoom, maxZoom: $maxZoom)';
}
}