[Android] onStyleLoadedListener is delayed until an inactive AutoTabsScaffold tab becomes active when using Hybrid Composition
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Start by tracing MapWidget creation and onStyleLoadedListener through the Android Platform View integration, then compare Hybrid Composition with the VD hosting mode described in the workaround. Reproduce the inactive mounted tab case in the stated Flutter and plugin versions. Done means the style-loaded callback fires before the tab becomes active under Hybrid Composition, while the related issue’s distinct reproduction remains understood.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
After migrating to mapbox_maps_flutter 3.x, the map style does not finish loading while the map is hosted in an inactive tab of an AutoTabsScaffold when using Hybrid Composition.
The map is created immediately because AutoTabsScaffold uses lazyLoad: false. The onMapCreated callback is invoked during the initial screen setup, but onStyleLoadedListener is not invoked until the user navigates to the map tab.
This delays the initialization of custom style layers.
Environment
- Flutter: 3.47.8
mapbox_maps_flutter: 3.33.1- Platform: Android
- Navigation:
AutoTabsScaffoldwithlazyLoad: false
Expected behavior
The map should initialize its style and emit onStyleLoadedListener while its tab is inactive but mounted, allowing the application to prepare style and custom layers before the user navigates to the map tab.
Actual behavior
The map is created, but the style-loaded callback is delayed until the map tab becomes active.
Workaround
Setting androidHostingMode: AndroidPlatformViewHostingMode.VD while keeping textureView: true resolves the issue. This configuration enables the expected behavior.
MapWidget(
textureView: true,
androidHostingMode: AndroidPlatformViewHostingMode.VD,
onMapCreated: onMapCreated,
onStyleLoadedListener: onStyleLoaded,
)
Related issue
https://github.com/mapbox/mapbox-maps-flutter/issues/1147
The two issues appear to be related to the Android Platform View integration, but they have different reproduction steps and workarounds.
- Ngôn ngữ chính
- Dart
- Star
- 379
- Fork
- 205
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mapbox/mapbox-maps-flutter
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
mapbox/mapbox-maps-flutter#1144 ·
-
iOS: the map cannot be captured or read by flutter, because it is a platform viewCó thể đã có người làm @Nixxx19 đã nhận 67 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
mapbox/mapbox-maps-flutter#1142 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
mapbox/mapbox-maps-flutter#1140 ·
-
Normalize ornament positioning relative to safe areas on iOS and AndroidCó thể làm lại được @maios đã nhận 112 ngày trước và không có pull request nào đang mở. Đang mở
mapbox/mapbox-maps-flutter#1137 · 1 bình luận · 1 reaction · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
mapbox/mapbox-maps-flutter#1136 · 1 bình luận ·
Tất cả issue của mapbox/mapbox-maps-flutter
Issue tương tự
-
check-relative-paths reports links to existing directories as missingCó thể đã có người làm @reidbaker-agent đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
google/skills_lint.dart#202 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Incorrect Arabic yeh isolated-form cmap alias (064A → FEEF) causes missing letters with TajawalĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100