diff --git a/packages/smooth_app/lib/helpers/analytics_helper.dart b/packages/smooth_app/lib/helpers/analytics_helper.dart index 1deac42c831..6d77dcede67 100644 --- a/packages/smooth_app/lib/helpers/analytics_helper.dart +++ b/packages/smooth_app/lib/helpers/analytics_helper.dart @@ -79,10 +79,8 @@ class AnalyticsHelper { siteId: 2, visitorId: uuid, ); - MatomoTracker.instance.visitor = Visitor( - id: uuid, - userId: OpenFoodAPIConfiguration.globalUser?.userId, - ); + MatomoTracker.instance + .setVisitorUserId(OpenFoodAPIConfiguration.globalUser?.userId); } catch (err) { // With Hot Reload, this may trigger a late field already initialized } diff --git a/packages/smooth_app/lib/knowledge_panel/knowledge_panels/knowledge_panel_world_map_card.dart b/packages/smooth_app/lib/knowledge_panel/knowledge_panels/knowledge_panel_world_map_card.dart index 129f3eb3605..67dff568ec2 100644 --- a/packages/smooth_app/lib/knowledge_panel/knowledge_panels/knowledge_panel_world_map_card.dart +++ b/packages/smooth_app/lib/knowledge_panel/knowledge_panels/knowledge_panel_world_map_card.dart @@ -3,6 +3,7 @@ import 'package:flutter_map/flutter_map.dart'; import 'package:latlong2/latlong.dart'; import 'package:openfoodfacts/model/KnowledgePanelElement.dart'; import 'package:smooth_app/generic_lib/design_constants.dart'; +import 'package:smooth_app/helpers/launch_url_helper.dart'; class KnowledgePanelWorldMapCard extends StatelessWidget { const KnowledgePanelWorldMapCard(this.mapElement); @@ -38,6 +39,41 @@ class KnowledgePanelWorldMapCard extends StatelessWidget { markers: getMarkers(mapElement.pointers), ), ], + nonRotatedChildren: [ + AttributionWidget( + attributionBuilder: (BuildContext context) { + return Align( + alignment: Alignment.bottomRight, + 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: [ + Text( + '© OpenStreetMap contributors', + style: Theme.of(context) + .textTheme + .bodyText2! + .copyWith( + color: Colors.blue, + ), + ), + ], + ), + ), + ), + ), + ); + }, + ) + ], ), ), ); diff --git a/packages/smooth_app/pubspec.lock b/packages/smooth_app/pubspec.lock index 3671dfc705b..b1a0d8e9590 100644 --- a/packages/smooth_app/pubspec.lock +++ b/packages/smooth_app/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "41.0.0" + version: "44.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "4.2.0" + version: "4.4.0" archive: dependency: transitive description: @@ -133,13 +133,13 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "8.3.3" + version: "8.4.0" camera: dependency: "direct main" description: path: "packages/camera/camera" ref: smooth_camera - resolved-ref: d85e1a0df41547cb48c912afc48915dc81a6370a + resolved-ref: bc474ef0647d9f865857198e8af000702c72aeb4 url: "https://github.com/g123k/plugins.git" source: git version: "0.9.6" @@ -148,7 +148,7 @@ packages: description: path: "packages/camera/camera_platform_interface" ref: smooth_camera - resolved-ref: d85e1a0df41547cb48c912afc48915dc81a6370a + resolved-ref: bc474ef0647d9f865857198e8af000702c72aeb4 url: "https://github.com/g123k/plugins.git" source: git version: "2.1.6" @@ -157,7 +157,7 @@ packages: description: path: "packages/camera/camera_web" ref: smooth_camera - resolved-ref: d85e1a0df41547cb48c912afc48915dc81a6370a + resolved-ref: bc474ef0647d9f865857198e8af000702c72aeb4 url: "https://github.com/g123k/plugins.git" source: git version: "0.2.1+6" @@ -195,7 +195,7 @@ packages: name: code_builder url: "https://pub.dartlang.org" source: hosted - version: "4.1.0" + version: "4.2.0" collection: dependency: "direct main" description: @@ -272,7 +272,7 @@ packages: name: device_info_plus url: "https://pub.dartlang.org" source: hosted - version: "3.2.4" + version: "4.0.1" device_info_plus_linux: dependency: transitive description: @@ -307,7 +307,7 @@ packages: name: device_info_plus_windows url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "3.0.1" device_preview: dependency: "direct main" description: @@ -328,7 +328,7 @@ packages: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "2.0.1" file: dependency: transitive description: @@ -406,35 +406,35 @@ packages: name: flutter_native_splash url: "https://pub.dartlang.org" source: hosted - version: "2.2.3+1" + version: "2.2.7" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.7" flutter_secure_storage: dependency: "direct main" description: name: flutter_secure_storage url: "https://pub.dartlang.org" source: hosted - version: "5.0.2" + version: "5.1.0" flutter_secure_storage_linux: dependency: transitive description: name: flutter_secure_storage_linux url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" flutter_secure_storage_macos: dependency: transitive description: name: flutter_secure_storage_macos url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" flutter_secure_storage_platform_interface: dependency: transitive description: @@ -462,7 +462,7 @@ packages: name: flutter_svg url: "https://pub.dartlang.org" source: hosted - version: "1.1.1+1" + version: "1.1.3" flutter_test: dependency: "direct dev" description: flutter @@ -486,7 +486,7 @@ packages: name: freezed_annotation url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.1.0" fuchsia_remote_debug_protocol: dependency: transitive description: flutter @@ -505,7 +505,7 @@ packages: name: fwfh_text_style url: "https://pub.dartlang.org" source: hosted - version: "2.7.3+2" + version: "2.22.08" glob: dependency: transitive description: @@ -554,7 +554,7 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.13.4" + version: "0.13.5" http_parser: dependency: transitive description: @@ -603,7 +603,7 @@ packages: name: image_picker_android url: "https://pub.dartlang.org" source: hosted - version: "0.8.5+1" + version: "0.8.5+2" image_picker_for_web: dependency: transitive description: @@ -617,14 +617,14 @@ packages: name: image_picker_ios url: "https://pub.dartlang.org" source: hosted - version: "0.8.5+5" + version: "0.8.5+6" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.6.1" integration_test: dependency: "direct dev" description: flutter @@ -657,7 +657,7 @@ packages: name: json_annotation url: "https://pub.dartlang.org" source: hosted - version: "4.5.0" + version: "4.6.0" latlong2: dependency: "direct main" description: @@ -671,7 +671,7 @@ packages: name: lint url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.10.0" lints: dependency: transitive description: @@ -710,12 +710,10 @@ packages: matomo_tracker: dependency: "direct main" description: - path: "." - ref: fix-event-sending - resolved-ref: "8de93595eff55be1c1df4f9fd53bbb79b11c5745" - url: "https://github.com/M123-dev/matomo-tracker.git" - source: git - version: "1.1.1" + name: matomo_tracker + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" meta: dependency: "direct overridden" description: @@ -743,7 +741,7 @@ packages: name: mockito url: "https://pub.dartlang.org" source: hosted - version: "5.2.0" + version: "5.3.0" modal_bottom_sheet: dependency: "direct main" description: @@ -764,7 +762,7 @@ packages: name: openfoodfacts url: "https://pub.dartlang.org" source: hosted - version: "1.22.0" + version: "1.23.0" openfoodfacts_flutter_lints: dependency: "direct dev" description: @@ -787,7 +785,7 @@ packages: name: package_info_plus url: "https://pub.dartlang.org" source: hosted - version: "1.4.2" + version: "1.4.3" package_info_plus_linux: dependency: transitive description: @@ -822,7 +820,7 @@ packages: name: package_info_plus_windows url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "2.0.0" path: dependency: "direct main" description: @@ -836,14 +834,14 @@ packages: name: path_drawing url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" path_parsing: dependency: transitive description: name: path_parsing url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" path_provider: dependency: "direct main" description: @@ -857,14 +855,14 @@ packages: name: path_provider_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.16" + version: "2.0.17" path_provider_ios: dependency: transitive description: name: path_provider_ios url: "https://pub.dartlang.org" source: hosted - version: "2.0.10" + version: "2.0.11" path_provider_linux: dependency: transitive description: @@ -892,7 +890,7 @@ packages: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.7" + version: "2.1.1" percent_indicator: dependency: "direct main" description: @@ -1025,21 +1023,21 @@ packages: name: rxdart url: "https://pub.dartlang.org" source: hosted - version: "0.27.4" + version: "0.27.5" sentry: dependency: transitive description: name: sentry url: "https://pub.dartlang.org" source: hosted - version: "6.6.3" + version: "6.9.0" sentry_flutter: dependency: "direct main" description: name: sentry_flutter url: "https://pub.dartlang.org" source: hosted - version: "6.6.3" + version: "6.9.0" share_plus: dependency: "direct main" description: @@ -1163,7 +1161,7 @@ packages: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "2.0.2+1" + version: "2.0.3+1" sqflite_common: dependency: transitive description: @@ -1268,7 +1266,7 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.1.4" + version: "6.1.5" url_launcher_android: dependency: transitive description: @@ -1310,7 +1308,7 @@ packages: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.12" + version: "2.0.13" url_launcher_windows: dependency: transitive description: @@ -1366,7 +1364,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.7.0" wkt_parser: dependency: transitive description: diff --git a/packages/smooth_app/pubspec.yaml b/packages/smooth_app/pubspec.yaml index e9bda532c21..abe5554af3c 100644 --- a/packages/smooth_app/pubspec.yaml +++ b/packages/smooth_app/pubspec.yaml @@ -28,17 +28,13 @@ dependencies: image_picker: ^0.8.5+3 iso_countries: 2.1.0 latlong2: ^0.8.1 - # Currently using the fork of M123-dev with additional features, to be switched back when PR is merged - matomo_tracker: - git: - url: 'https://github.com/M123-dev/matomo-tracker.git' - ref: 'fix-event-sending' + matomo_tracker: ^1.3.0 modal_bottom_sheet: ^2.1.0 openfoodfacts: ^1.22.0 # openfoodfacts: # path: ../../../openfoodfacts-dart package_info_plus: ^1.4.2 - device_info_plus: ^3.2.4 + device_info_plus: ^4.0.1 permission_handler: ^9.2.0 photo_view: ^0.14.0 uuid: ^3.0.6