Skip to content

Commit

Permalink
Upgrade packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
CaramelDunes committed Aug 6, 2022
1 parent 65e957b commit 0a438cd
Show file tree
Hide file tree
Showing 10 changed files with 141 additions and 159 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -39,7 +39,7 @@ android {
defaultConfig {
applicationId "fr.carameldunes.vfrlight"
minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
6 changes: 3 additions & 3 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />

<application
android:name="io.flutter.app.FlutterApplication"
<application
android:name="${applicationName}"
android:label="VFR Light"
android:icon="@mipmap/launcher_icon">
<activity
android:name=".MainActivity"
android:name="io.flutter.embedding.android.FlutterActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.6.0'
repositories {
google()
jcenter()
Expand Down
5 changes: 2 additions & 3 deletions bin/download_oaci_vfr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:http/http.dart' as http;

class UserAgentClient extends http.BaseClient {
static final String firefoxUserAgent =
'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0';
'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0';

final String userAgent;
final http.Client _inner;
Expand All @@ -26,7 +26,6 @@ Future<bool> 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) {
Expand All @@ -35,7 +34,7 @@ Future<bool> 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 {
Expand Down
4 changes: 2 additions & 2 deletions lib/instruments_data_source.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class InstrumentsData {
}

class InstrumentsDataSource {
final LocationOptions locationOptions = LocationOptions();
final LocationSettings locationSettings = LocationSettings();

double qnh;
double surfaceAltitudeInM;
Expand All @@ -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()
Expand Down
4 changes: 3 additions & 1 deletion lib/map/map_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -207,7 +209,7 @@ class _MapScreenState extends State<MapScreen> {
);
}

void _onLongPress(LatLng position) {
void _onLongPress(TapPosition _, LatLng position) {
showDialog(
context: context,
builder: (c) {
Expand Down
Loading

0 comments on commit 0a438cd

Please sign in to comment.