New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Flutter 3] Android platform get bottom offset in plugin [flutter_google_street_view] #103858
Comments
Platformview seems to be pinned to the top |
I have the same problem, The Platformview has been pinned to the top. nothing can cover it. even if push a new navigation. |
Hi @zyzdev, Thanks for filing the issue. I ran the sample app and the example fails to load with a grey screen which says "something went wrong" Also I see below exception in the logs am I missing anything? flutter run logs
flutter doctor -v (mac)
|
Duplicate of #103630, no? |
Hi @maheshmnj , Do you enable billing to the api key? |
We recently changed the backend that renders platform views. For views that use SurfaceView, you would need to now use I verified that the following fixes the issue: if (defaultTargetPlatform == TargetPlatform.android) {
- return AndroidView(
- viewType: viewType,
- onPlatformViewCreated: onPlatformViewCreated,
- creationParams: creationParams,
- gestureRecognizers: gestureRecognizers,
- creationParamsCodec: const StandardMessageCodec());
+ return PlatformViewLink(
+ viewType: viewType,
+ surfaceFactory:
+ (BuildContext context, PlatformViewController controller) {
+ return AndroidViewSurface(
+ controller: controller as AndroidViewController,
+ gestureRecognizers: gestureRecognizers ?? const <Factory<OneSequenceGestureRecognizer>>{},
+ hitTestBehavior: PlatformViewHitTestBehavior.opaque,
+ );
+ },
+ onCreatePlatformView: (PlatformViewCreationParams params) {
+ return PlatformViewsService.initExpensiveAndroidView(
+ id: params.id,
+ viewType: viewType,
+ layoutDirection: TextDirection.ltr,
+ creationParams: creationParams,
+ creationParamsCodec: const StandardMessageCodec(),
+ onFocus: () {
+ params.onFocusChanged(true);
+ },
+ )
+ ..addOnPlatformViewCreatedListener(params.onPlatformViewCreated)
+ ..create();
+ }); Make sure to bump the Flutter SDK in street_view_platform_interface pubspec.yaml, so you require Flutter 3.0.0. |
Thanks. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Hi
I am the developer of plugin flutter_google_street_view.
Android meets problem, iOS and web are no problem.
Plugin flutter_google_street_view gets view bottom offset after migrating to flutter 3.0.0.
The white place at bottom still can trigger scroll event.
Steps to Reproduce
git clone git@github.com:zyzdev/flutter_street_view.git
cd example
flutter upgrade
flutter run
to install exampleflutter downgrade
flutter run
to install exampleThe text was updated successfully, but these errors were encountered: