From 0a438cd8973648d54bd6ac9a780e26a9f316bf1d Mon Sep 17 00:00:00 2001 From: CaramelDunes Date: Sat, 6 Aug 2022 17:21:32 +0200 Subject: [PATCH] Upgrade packages. --- android/app/build.gradle | 4 +- android/app/src/main/AndroidManifest.xml | 6 +- .../fr/carameldunes/vfrlight/MainActivity.kt | 6 - android/build.gradle | 2 +- bin/download_oaci_vfr.dart | 5 +- lib/instruments_data_source.dart | 4 +- lib/map/map_screen.dart | 4 +- pubspec.lock | 228 ++++++++++-------- pubspec.yaml | 11 +- test/widget_test.dart | 30 --- 10 files changed, 141 insertions(+), 159 deletions(-) delete mode 100644 android/app/src/main/kotlin/fr/carameldunes/vfrlight/MainActivity.kt delete mode 100644 test/widget_test.dart diff --git a/android/app/build.gradle b/android/app/build.gradle index e1ace84..689adc2 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 28 + compileSdkVersion 33 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -39,7 +39,7 @@ android { defaultConfig { applicationId "fr.carameldunes.vfrlight" minSdkVersion 16 - targetSdkVersion 28 + targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index a2874b0..72f6dc6 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -8,12 +8,12 @@ - downloadTile(http.Client client, int x, int y, int zoom) async { if (!await file.exists()) { String url = 'https://wxs.ign.fr/an7nvfzojv5wa96dsga5nk8w/geoportail/wmts?layer=GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-OACI&style=normal&tilematrixset=PM&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/jpeg&TileMatrix=$zoom&TileCol=$y&TileRow=$x'; - var response = await client.get(Uri.parse(url)); if (response.statusCode == 200) { @@ -35,7 +34,7 @@ Future downloadTile(http.Client client, int x, int y, int zoom) async { await file.writeAsBytes(response.bodyBytes); return true; } else { - print('Error downloading $zoom/$x-$y.'); + print('Error downloading $zoom/$x-$y: HTTP ${response.statusCode}.'); return false; } } else { diff --git a/lib/instruments_data_source.dart b/lib/instruments_data_source.dart index 0a37c7e..30f50d7 100644 --- a/lib/instruments_data_source.dart +++ b/lib/instruments_data_source.dart @@ -26,7 +26,7 @@ class InstrumentsData { } class InstrumentsDataSource { - final LocationOptions locationOptions = LocationOptions(); + final LocationSettings locationSettings = LocationSettings(); double qnh; double surfaceAltitudeInM; @@ -46,7 +46,7 @@ class InstrumentsDataSource { InstrumentsDataSource({required this.qnh, required this.surfaceAltitudeInM}) { _positionSubscription = - Geolocator.getPositionStream(desiredAccuracy: LocationAccuracy.high) + Geolocator.getPositionStream(locationSettings: locationSettings) .listen(_onNewPosition); _pressureSubscription = EnvironmentSensors() diff --git a/lib/map/map_screen.dart b/lib/map/map_screen.dart index 1f9fe9a..bcb1e93 100644 --- a/lib/map/map_screen.dart +++ b/lib/map/map_screen.dart @@ -4,8 +4,10 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_background/flutter_background.dart'; +import 'package:flutter_map/flutter_map.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:latlong2/latlong.dart'; +import 'package:positioned_tap_detector_2/positioned_tap_detector_2.dart'; import 'package:wakelock/wakelock.dart'; import '../record_button.dart'; @@ -207,7 +209,7 @@ class _MapScreenState extends State { ); } - void _onLongPress(LatLng position) { + void _onLongPress(TapPosition _, LatLng position) { showDialog( context: context, builder: (c) { diff --git a/pubspec.lock b/pubspec.lock index bfc1e6c..8a79b6e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,35 +7,35 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "24.0.0" + version: "44.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "4.4.0" archive: dependency: transitive description: name: archive url: "https://pub.dartlang.org" source: hosted - version: "3.1.2" + version: "3.3.1" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.3.1" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -49,7 +49,7 @@ packages: name: cached_network_image url: "https://pub.dartlang.org" source: hosted - version: "3.1.0" + version: "3.2.1" cached_network_image_platform_interface: dependency: transitive description: @@ -70,56 +70,42 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.3" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" convert: dependency: transitive description: name: convert url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.0.2" coverage: dependency: transitive description: name: coverage url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "1.5.0" crypto: dependency: transitive description: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.0.2" environment_sensors: dependency: "direct main" description: @@ -133,14 +119,14 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" ffi: dependency: transitive description: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "2.0.1" file: dependency: transitive description: @@ -159,35 +145,35 @@ packages: name: flutter_background url: "https://pub.dartlang.org" source: hosted - version: "1.0.2+1" + version: "1.1.0" flutter_blurhash: dependency: transitive description: name: flutter_blurhash url: "https://pub.dartlang.org" source: hosted - version: "0.6.0" + version: "0.7.0" flutter_cache_manager: dependency: transitive description: name: flutter_cache_manager url: "https://pub.dartlang.org" source: hosted - version: "3.1.2" + version: "3.3.0" flutter_launcher_icons: dependency: "direct dev" description: name: flutter_launcher_icons url: "https://pub.dartlang.org" source: hosted - version: "0.9.2" + version: "0.9.3" flutter_map: dependency: "direct main" description: name: flutter_map url: "https://pub.dartlang.org" source: hosted - version: "0.13.1" + version: "2.2.0" flutter_test: dependency: "direct dev" description: flutter @@ -204,84 +190,91 @@ packages: name: font_awesome_flutter url: "https://pub.dartlang.org" source: hosted - version: "9.1.0" + version: "10.1.0" frontend_server_client: dependency: transitive description: name: frontend_server_client url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.1.3" geolocator: dependency: "direct main" description: name: geolocator url: "https://pub.dartlang.org" source: hosted - version: "7.4.0" + version: "9.0.1" geolocator_android: dependency: transitive description: name: geolocator_android url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "4.0.2" geolocator_apple: dependency: transitive description: name: geolocator_apple url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "2.2.1" geolocator_platform_interface: dependency: transitive description: name: geolocator_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.3.2" + version: "4.0.6" geolocator_web: dependency: transitive description: name: geolocator_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.1.6" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1" glob: dependency: transitive description: name: glob url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.1.0" http: dependency: "direct main" description: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.13.3" + version: "0.13.5" http_multi_server: dependency: transitive description: name: http_multi_server url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.2.1" http_parser: dependency: transitive description: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.0.1" image: dependency: transitive description: name: image url: "https://pub.dartlang.org" source: hosted - version: "3.0.2" + version: "3.2.0" intl: dependency: transitive description: @@ -302,14 +295,14 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.4" latlong2: dependency: transitive description: name: latlong2 url: "https://pub.dartlang.org" source: hosted - version: "0.8.0" + version: "0.8.1" lists: dependency: transitive description: @@ -323,21 +316,28 @@ packages: name: logging url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" mgrs_dart: dependency: transitive description: @@ -351,7 +351,7 @@ packages: name: mime url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.2" node_preamble: dependency: transitive description: @@ -365,56 +365,70 @@ packages: name: octo_image url: "https://pub.dartlang.org" source: hosted - version: "1.0.0+1" + version: "1.0.2" package_config: dependency: transitive description: name: package_config url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.2" path_provider: dependency: "direct main" description: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.11" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.17" + path_provider_ios: + dependency: transitive + description: + name: path_provider_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.1.7" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.6" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.4" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.1.1" pedantic: dependency: transitive description: @@ -428,42 +442,49 @@ packages: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "4.2.0" + version: "5.0.0" platform: dependency: transitive description: name: platform url: "https://pub.dartlang.org" source: hosted - version: "3.0.2" + version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.1.2" + polylabel: + dependency: transitive + description: + name: polylabel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" pool: dependency: transitive description: name: pool url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.5.1" positioned_tap_detector_2: - dependency: transitive + dependency: "direct main" description: name: positioned_tap_detector_2 url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.4" process: dependency: transitive description: name: process url: "https://pub.dartlang.org" source: hosted - version: "4.2.3" + version: "4.2.4" proj4dart: dependency: transitive description: @@ -477,49 +498,49 @@ packages: name: pub_semver url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.1" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.1.0" rxdart: dependency: transitive description: name: rxdart url: "https://pub.dartlang.org" source: hosted - version: "0.27.1" + version: "0.27.5" shelf: dependency: transitive description: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.2" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" shelf_static: dependency: transitive description: name: shelf_static url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" sky_engine: dependency: transitive description: flutter @@ -545,21 +566,21 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" sqflite: dependency: transitive description: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "2.0.0+4" + version: "2.0.3+1" sqflite_common: dependency: transitive description: name: sqflite_common url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.2.1+1" stack_trace: dependency: transitive description: @@ -580,49 +601,42 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" synchronized: dependency: transitive description: name: synchronized url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.0+2" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test: dependency: "direct dev" description: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.17.11" + version: "1.21.4" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "0.4.12" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.4.1" - transparent_image: - dependency: transitive - description: - name: transparent_image - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" + version: "0.4.16" tuple: dependency: transitive description: @@ -636,7 +650,7 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" unicode: dependency: transitive description: @@ -650,84 +664,84 @@ packages: name: uuid url: "https://pub.dartlang.org" source: hosted - version: "3.0.4" + version: "3.0.6" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.2" vm_service: dependency: transitive description: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "7.2.0" + version: "9.3.0" wakelock: dependency: "direct main" description: name: wakelock url: "https://pub.dartlang.org" source: hosted - version: "0.5.3+3" + version: "0.6.2" wakelock_macos: dependency: transitive description: name: wakelock_macos url: "https://pub.dartlang.org" source: hosted - version: "0.1.0+2" + version: "0.4.0" wakelock_platform_interface: dependency: transitive description: name: wakelock_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "0.2.1+2" + version: "0.3.0" wakelock_web: dependency: transitive description: name: wakelock_web url: "https://pub.dartlang.org" source: hosted - version: "0.2.0+2" + version: "0.4.0" wakelock_windows: dependency: transitive description: name: wakelock_windows url: "https://pub.dartlang.org" source: hosted - version: "0.1.0+1" + version: "0.2.0" watcher: dependency: transitive description: name: watcher url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" web_socket_channel: dependency: transitive description: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.2.0" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.2.6" + version: "2.7.0" wkt_parser: dependency: transitive description: @@ -741,21 +755,21 @@ packages: name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.2.0+1" xml: dependency: transitive description: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.2.0" + version: "6.1.0" yaml: dependency: transitive description: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "3.1.0" + version: "3.1.1" sdks: - dart: ">=2.13.0 <3.0.0" - flutter: ">=2.0.0" + dart: ">=2.17.0 <3.0.0" + flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 2f5d3e0..1bfaeb0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,15 +11,16 @@ dependencies: flutter: sdk: flutter - flutter_map: ^0.13.1 + flutter_map: ^2.2.0 environment_sensors: ^0.2.0 - geolocator: ^7.1.0 - font_awesome_flutter: ^9.1.0 + geolocator: ^9.0.1 + font_awesome_flutter: ^10.1.0 path_provider: ^2.0.1 - wakelock: ^0.5.2 + wakelock: ^0.6.2 flutter_background: ^1.0.2+1 cached_network_image: ^3.0.0 http: ^0.13.0 + positioned_tap_detector_2: ^1.0.4 dev_dependencies: flutter_test: @@ -27,6 +28,8 @@ dev_dependencies: flutter_launcher_icons: ^0.9.0 + test: ^1.17.9 + flutter_icons: android: "launcher_icon" ios: true diff --git a/test/widget_test.dart b/test/widget_test.dart deleted file mode 100644 index 0fcf229..0000000 --- a/test/widget_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:vfr_light/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -}