В моем случае я должен убедиться, что моя карта может динамически изменяться без сбоев, вы можете предложить использовать resizeToAvoidBottomPadding, но моя проблема заключается в том, что, например, мое приложение вылетает, если я использую чат-мессенджер facebookи откройте его клавиатуру (что привело к изменению размера приложения, заставив изменить размер карты, следовательно, произошел сбой)
следующий код находится внутри под-маршрута (внутри маршрута, содержащего нижнюю панель вкладок, поэтому следующий код находится внутриодна из кнопок панели)
@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
GoogleMap(
onMapCreated: _onMapCreated,
mapType: MapType.normal,
initialCameraPosition: CameraPosition(
target: LatLng(30, 40),
zoom: 11,
),
onCameraMove: (pos) {
setState(() {
// do something
});
},
onCameraIdle: () {
setState(() {
// do something
});
},
),
TextField(),
],
);
}
Редактировать: это сообщение об ошибке, которое я получаю в консоли:
E/flutter (16068): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.AbstractMethodError: abstract method "void io.flutter.plugin.platform.PlatformView.onInputConnectionLocked()"
E/flutter (16068): at io.flutter.plugin.platform.VirtualDisplayController.onInputConnectionLocked(VirtualDisplayController.java:166)
E/flutter (16068): at io.flutter.plugin.platform.PlatformViewsController.lockInputConnection(PlatformViewsController.java:370)
E/flutter (16068): at io.flutter.plugin.platform.PlatformViewsController.access$1000(PlatformViewsController.java:36)
E/flutter (16068): at io.flutter.plugin.platform.PlatformViewsController$1.resizePlatformView(PlatformViewsController.java:165)
E/flutter (16068): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.resize(PlatformViewsChannel.java:120)
E/flutter (16068): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:57)
E/flutter (16068): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/flutter (16068): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/flutter (16068): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
E/flutter (16068): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (16068): at android.os.MessageQueue.next(MessageQueue.java:323)
E/flutter (16068): at android.os.Looper.loop(Looper.java:136)
E/flutter (16068): at android.app.ActivityThread.main(ActivityThread.java:6776)
E/flutter (16068): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (16068): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
E/flutter (16068): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
E/flutter (16068): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)
E/flutter (16068):
F/flutter (16068): [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env).
F/libc (16068): Fatal signal 6 (SIGABRT), code -6 in tid 16068 (m.dm.dm_testing)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/a7xeltexx/a7xelte:7.0/NRD90M/A710FXXU2CQG4:user/release-keys'
Revision: '3'
ABI: 'arm'
pid: 16068, tid: 16068, name: m.dm.dm_testing >>> com.dm.dm_testing <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env).
'
r0 00000000 r1 00003ec4 r2 00000006 r3 00000008
r4 ec60358c r5 00000006 r6 ec603534 r7 0000010c
r8 ffcc802c r9 db59415c sl 00000032 fp db594110
ip 0000000b sp ffcc7f08 lr ea8f04c7 pc ea8f2d30 cpsr 000e0010
backtrace:
#00 pc 0004ad30 /system/lib/libc.so (tgkill+12)
#01 pc 000484c3 /system/lib/libc.so (pthread_kill+34)
#02 pc 0001dd99 /system/lib/libc.so (raise+10)
#03 pc 00019521 /system/lib/libc.so (__libc_android_abort+34)
#04 pc 00017160 /system/lib/libc.so (abort+4)
#05 pc 00fa7b9f /data/app/com.dm.dm_testing-1/lib/arm/libflutter.so (offset 0xf99000)
#06 pc 00f9dde1 /data/app/com.dm.dm_testing-1/lib/arm/libflutter.so (offset 0xf99000)
#07 pc 00f9cad7 /data/app/com.dm.dm_testing-1/lib/arm/libflutter.so (offset 0xf99000)
#08 pc 00fcfb83 /data/app/com.dm.dm_testing-1/lib/arm/libflutter.so (offset 0xf99000)
#09 pc 00fa81f5 /data/app/com.dm.dm_testing-1/lib/arm/libflutter.so (offset 0xf99000)
#10 pc 00fab943 /data/app/com.dm.dm_testing-1/lib/arm/libflutter.so (offset 0xf99000)
#11 pc 00011e77 /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+614)
#12 pc 00011b83 /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+26)
#13 pc 00097325 /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvP8_jobjecti+22)
#14 pc 7594bd55 /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x38c0000)
Lost connection to device.
спасибо за помощь.