Skip to content

Commit

Permalink
chore: upgrade to flutter_map 4.0.0 (#4752)
Browse files Browse the repository at this point in the history
Impacted files:
* `knowledge_panel_world_map_card.dart`: recoded with flutter_map 4.0.0 syntax
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded to flutter_map 4.0.0
  • Loading branch information
monsieurtanuki authored Nov 1, 2023
1 parent 9f713f5 commit b3f73c0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,48 +30,27 @@ class KnowledgePanelWorldMapCard extends StatelessWidget {
),
zoom: 6.0,
),
layers: <LayerOptions>[
TileLayerOptions(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
),
MarkerLayerOptions(
markers: getMarkers(mapElement.pointers),
),
],
nonRotatedChildren: <Widget>[
AttributionWidget(
attributionBuilder: (BuildContext context) {
return Align(
alignment: AlignmentDirectional.bottomEnd,
child: ColoredBox(
color: const Color(0xCCFFFFFF),
child: GestureDetector(
onTap: () => LaunchUrlHelper.launchURL(
'https://www.openstreetmap.org/copyright',
false,
),
child: Padding(
padding: const EdgeInsets.all(3),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
'© OpenStreetMap contributors',
style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(
color: Colors.blue,
),
),
],
),
),
),
RichAttributionWidget(
popupInitialDisplayDuration: const Duration(seconds: 5),
animationConfig: const ScaleRAWA(),
attributions: <SourceAttribution>[
TextSourceAttribution(
'OpenStreetMap contributors',
onTap: () => LaunchUrlHelper.launchURL(
'https://www.openstreetmap.org/copyright',
false,
),
);
},
)
),
],
),
],
children: <Widget>[
TileLayer(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
userAgentPackageName: 'org.openfoodfacts.app',
),
MarkerLayer(markers: getMarkers(mapElement.pointers)),
],
),
),
Expand Down
12 changes: 2 additions & 10 deletions packages/smooth_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -622,10 +622,10 @@ packages:
dependency: "direct main"
description:
name: flutter_map
sha256: "09010e452bcd8c57ade1b936b79643c4fd599f93b00d1696630f0b919b6f374a"
sha256: "52c65a977daae42f9aae6748418dd1535eaf27186e9bac9bf431843082bc75a3"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "4.0.0"
flutter_native_splash:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1264,14 +1264,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.1"
positioned_tap_detector_2:
dependency: transitive
description:
name: positioned_tap_detector_2
sha256: "52e06863ad3e1f82b058fd05054fc8c9caeeb3b47d5cea7a24bd9320746059c1"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
process:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
cupertino_icons: 1.0.5
device_preview: 1.1.0
flutter_svg: 2.0.8
flutter_map: 2.2.0
flutter_map: 4.0.0
flutter_widget_from_html_core: 0.8.3+1
fwfh_selectable_text: 0.8.3+1
flutter_secure_storage: 8.0.0
Expand Down

0 comments on commit b3f73c0

Please sign in to comment.