#241 upgrade, checked google maps issue
This commit is contained in:
parent
d8344c37fd
commit
c0cfa1ab95
6 changed files with 14 additions and 42 deletions
|
@ -204,9 +204,9 @@ dependencies {
|
|||
implementation 'com.caverock:androidsvg-aar:1.4'
|
||||
implementation 'com.commonsware.cwac:document:0.5.0'
|
||||
implementation 'com.drewnoakes:metadata-extractor:2.18.0'
|
||||
implementation 'com.github.bumptech.glide:glide:4.15.0'
|
||||
implementation 'com.github.bumptech.glide:glide:4.15.1'
|
||||
// SLF4J implementation for `mp4parser`
|
||||
implementation 'org.slf4j:slf4j-simple:2.0.6'
|
||||
implementation 'org.slf4j:slf4j-simple:2.0.7'
|
||||
|
||||
// forked, built by JitPack:
|
||||
// - https://jitpack.io/p/deckerst/Android-TiffBitmapFactory
|
||||
|
@ -221,7 +221,7 @@ dependencies {
|
|||
huaweiImplementation 'com.huawei.agconnect:agconnect-core:1.8.0.300'
|
||||
|
||||
kapt 'androidx.annotation:annotation:1.6.0'
|
||||
kapt 'com.github.bumptech.glide:compiler:4.15.0'
|
||||
kapt 'com.github.bumptech.glide:compiler:4.15.1'
|
||||
|
||||
compileOnly rootProject.findProject(':streams_channel')
|
||||
}
|
||||
|
|
|
@ -6,8 +6,6 @@ import 'package:aves_services_platform/src/map.dart';
|
|||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:google_api_availability/google_api_availability.dart';
|
||||
import 'package:google_maps_flutter_android/google_maps_flutter_android.dart';
|
||||
import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart';
|
||||
import 'package:latlong2/latlong.dart' as ll;
|
||||
|
||||
class PlatformMobileServices extends MobileServices {
|
||||
|
@ -20,26 +18,8 @@ class PlatformMobileServices extends MobileServices {
|
|||
_isAvailable = result == GooglePlayServicesAvailability.success;
|
||||
debugPrint('Device has Google Play Services=$_isAvailable');
|
||||
|
||||
// as of google_maps_flutter v2.1.1, minSDK is 20 because of default PlatformView usage,
|
||||
// but using hybrid composition would make it usable on API 19 too,
|
||||
// cf https://github.com/flutter/flutter/issues/23728
|
||||
// as of google_maps_flutter v2.1.5, Flutter v3.0.1 makes the map hide overlay widgets on API <=22
|
||||
final androidInfo = await DeviceInfoPlugin().androidInfo;
|
||||
_canRenderMaps = androidInfo.version.sdkInt >= 21;
|
||||
if (_canRenderMaps) {
|
||||
final mapsImplementation = GoogleMapsFlutterPlatform.instance;
|
||||
if (mapsImplementation is GoogleMapsFlutterAndroid) {
|
||||
// as of google_maps_flutter_android v2.2.0,
|
||||
// setting `useAndroidViewSurface` to true:
|
||||
// + issue #241 exists but workaround is efficient
|
||||
// + pan perf is OK when overlay is disabled
|
||||
// - pan perf is bad when overlay is enabled
|
||||
// setting `useAndroidViewSurface` to false:
|
||||
// - issue #241 exists and workaround is inefficient
|
||||
// + pan perf is OK when overlay is disabled or enabled
|
||||
mapsImplementation.useAndroidViewSurface = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -6,7 +6,7 @@ import 'package:aves_services/aves_services.dart';
|
|||
import 'package:aves_services_platform/src/map.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
|
||||
import 'package:huawei_map/map.dart' as hmap;
|
||||
import 'package:huawei_map/huawei_map.dart' as hmap;
|
||||
import 'package:latlong2/latlong.dart';
|
||||
|
||||
class PlatformMobileServices extends MobileServices {
|
||||
|
|
|
@ -3,7 +3,7 @@ import 'dart:typed_data';
|
|||
|
||||
import 'package:aves_map/aves_map.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:huawei_map/map.dart';
|
||||
import 'package:huawei_map/huawei_map.dart';
|
||||
import 'package:latlong2/latlong.dart' as ll;
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
|
@ -182,7 +182,7 @@ class _EntryHmsMapState<T> extends State<EntryHmsMap<T>> {
|
|||
...markers,
|
||||
if (dotLocation != null && _dotMarkerBitmap != null)
|
||||
Marker(
|
||||
markerId: MarkerId('dot'),
|
||||
markerId: const MarkerId('dot'),
|
||||
anchor: const Offset(.5, .5),
|
||||
clickable: true,
|
||||
icon: BitmapDescriptor.fromBytes(_dotMarkerBitmap!),
|
||||
|
|
|
@ -134,10 +134,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: huawei_map
|
||||
sha256: "8438cfa448711b6727cf4433ffc52bc20e36fb20105608703c644a6287b96f38"
|
||||
sha256: "3cee2a6fe1a8eb03782f29588df082de14b09f81c88b376017ad5afda6df2555"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.5.0+301"
|
||||
version: "6.9.0+300"
|
||||
intl:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -271,14 +271,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.1"
|
||||
stream_transform:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_transform
|
||||
sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
12
pubspec.lock
12
pubspec.lock
|
@ -276,10 +276,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: dynamic_color
|
||||
sha256: c4a508284b14ec4dda5adba2c28b2cdd34fbae1afead7e8c52cad87d51c5405b
|
||||
sha256: bbebb1b7ebed819e0ec83d4abdc2a8482d934f6a85289ffc1c6acf7589fa2aad
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.6.2"
|
||||
version: "1.6.3"
|
||||
equatable:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -382,10 +382,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: flex_color_picker
|
||||
sha256: "607c9fdb26be84d4a5a0931ab42a7eda725372e4f5ebaa2526ab6b22ead752f9"
|
||||
sha256: f0e0db8e3e47435cfbe9aa15c71b898fa218be0fc4ae409e1e42d5d5266b2c90
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
version: "3.2.0"
|
||||
flex_seed_scheme:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1126,10 +1126,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: shared_preferences
|
||||
sha256: "78528fd87d0d08ffd3e69551173c026e8eacc7b7079c82eb6a77413957b7e394"
|
||||
sha256: "858aaa72d8f61637d64e776aca82e1c67e6d9ee07979123c5d17115031c1b13b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.20"
|
||||
version: "2.1.0"
|
||||
shared_preferences_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
Loading…
Reference in a new issue