1

google maps working in debug and release version, but not working after publish to playstore.

I already add my sha1 debug and sha1 release. I build debug version and release version it's working if I install in my phone. but why after I publish to playstore using Android App Bundle (.aab) the maps it's not working?

note update :

  • when I build apk release using android studio, then I install, maps is show, but if I build apk release using command "flutter build apk --release" the maps is not show

this my code

@override
  Widget build(BuildContext context) {
    return  Scaffold(
      appBar: AppBar(
        title:
        Text("aaaa", style: const TextStyle(color: Colors.white)),
        backgroundColor: Palette.color_primary,
        iconTheme: const IconThemeData(
          color: Colors.white, //change your color here
        ),
      ),
      body:
      FutureBuilder(
          future: Future.delayed(const Duration(milliseconds: 500), () {}),
    builder: (ctx, snapshot) {
      if (snapshot.connectionState == ConnectionState.done) {
        return GoogleMap(
          myLocationEnabled: true,
          myLocationButtonEnabled: true,
          zoomControlsEnabled: false,
          mapType: MapType.normal,
          //initialCameraPosition: _initialCameraPosition,
          initialCameraPosition: CameraPosition(target: LatLng(latitude.toDouble(), longitude.toDouble()),zoom: 15.5),
          onMapCreated: (controller) => _googleMapController = controller,
          /*onMapCreated: (GoogleMapController controller){
          _controller.complete(controller);
        },*/

          markers: markers.map((e) => e).toSet(),

        );
      }
      return Container();
    }
    ),
    );
  }
Eggy
  • 522
  • 5
  • 29

0 Answers0