Skip to content

[BUG] Not compatible with flutter v3.29 #541

@ChibangLW

Description

@ChibangLW

Platforms

android

Version of flutter maplibre_gl

v0.20.0

Bug Description

The deprecated PluginRegistry.Registrar was removed in flutter 3.29. From my understanding the plugin already uses the new registry.

It should be save to just remove the calls to the old registry as this is only used by flutter v1, which is older than 2021.

Steps to Reproduce

  1. build for Android with latest flutter version v3.29.
  2. See build errors

Expected Results

Build with latest flutter version.

Actual Results

maplibre_gl-0.20.0/android/src/main/java/org/maplibre/maplibregl/GlobalMethodHandler.java:29: error: symbol not found
  @Nullable private PluginRegistry.Registrar registrar;

maplibre_gl-0.20.0/android/src/main/java/org/maplibre/maplibregl/GlobalMethodHandler.java:33: error: symbol not found
  GlobalMethodHandler(@NonNull PluginRegistry.Registrar registrar) {

maplibre_gl-0.20.0/android/src/main/java/org/maplibre/maplibregl/MapLibreMapsPlugin.java:20: error: symbol not found
import io.flutter.plugin.common.PluginRegistry.Registrar;

Code Sample

  @override
  Widget build(BuildContext context) {
    return Container(
      child: MapLibreMap(
        myLocationEnabled: true,
        myLocationTrackingMode: MyLocationTrackingMode.tracking,
        onMapCreated: _onMapCreated,
        styleString:
            "https://sgx.geodatenzentrum.de/gdz_basemapde_vektor/styles/bm_web_gry.json",
        initialCameraPosition: const CameraPosition(
          target: LatLng(51.9481, 10.26517),
          zoom: 5,
        ),
        onStyleLoadedCallback: _onStyleLoadedCallback,
      ),
    );
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions