Skip to content

Commit

Permalink
Improve map default parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
wangwillian0 committed May 22, 2023
1 parent 200f755 commit 6bee212
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
6 changes: 3 additions & 3 deletions lib/accessory/accessory_registry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ class AccessoryRegistry extends ChangeNotifier {
Accessory(hashedPublicKey: 'TrnHrAM0ZrFSDeq1NN7ppmh0zYJotYiO09alVVF1mPI=',
id: '-5952179461995674635', name: 'Raspberry Pi', color: Colors.green,
datePublished: DateTime.fromMillisecondsSinceEpoch(1636390931651),
icon: 'gift.fill', lastLocation: LatLng(49.874739, 8.656280)),
icon: 'gift.fill', lastLocation: LatLng(-23.559389, -46.731839)),
Accessory(hashedPublicKey: 'TrnHrAM0ZrFSDeq1NN7ppmh0zYJotYiO09alVVF1mPI=',
id: '-5952179461995674635', name: 'My Bag', color: Colors.blue,
datePublished: DateTime.fromMillisecondsSinceEpoch(1636390931651),
icon: 'case.fill', lastLocation: LatLng(49.874739, 8.656280)),
icon: 'case.fill', lastLocation: LatLng(-23.559389, -46.731839)),
Accessory(hashedPublicKey: 'TrnHrAM0ZrFSDeq1NN7ppmh0zYJotYiO09alVVF1mPI=',
id: '-5952179461995674635', name: 'Car', color: Colors.red,
datePublished: DateTime.fromMillisecondsSinceEpoch(1636390931651),
icon: 'car.fill', lastLocation: LatLng(49.874739, 8.656280)),
icon: 'car.fill', lastLocation: LatLng(-23.559389, -46.731839)),
];
_accessories = demoAccessories;

Expand Down
7 changes: 2 additions & 5 deletions lib/history/accessory_history.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,10 @@ class _AccessoryHistoryState extends State<AccessoryHistory> {
mapController: _mapController,
options: MapOptions(
onMapReady: _onMapReady,
center: LatLng(49.874739, 8.656280),
center: LatLng(-23.559389, -46.731839),
zoom: 13.0,
maxZoom: 18.0,
interactiveFlags:
InteractiveFlag.pinchZoom | InteractiveFlag.drag |
InteractiveFlag.doubleTapZoom | InteractiveFlag.flingAnimation |
InteractiveFlag.pinchMove,
interactiveFlags:InteractiveFlag.all,
onTap: (_, __) {
setState(() {
showPopup = false;
Expand Down
7 changes: 2 additions & 5 deletions lib/map/map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,10 @@ class _AccessoryMapState extends State<AccessoryMap> {
return FlutterMap(
mapController: _mapController,
options: MapOptions(
center: locationModel.here ?? LatLng(49.874739, 8.656280),
center: locationModel.here ?? LatLng(-23.559389, -46.731839),
zoom: 13.0,
maxZoom: 18.0,
interactiveFlags:
InteractiveFlag.pinchZoom | InteractiveFlag.drag |
InteractiveFlag.doubleTapZoom | InteractiveFlag.flingAnimation |
InteractiveFlag.pinchMove,
interactiveFlags: InteractiveFlag.all,
),
nonRotatedChildren: const [
Align(
Expand Down

0 comments on commit 6bee212

Please sign in to comment.