matanshukry / flutter_google_places_sdk

Flutter plugin for google places native sdk
36 stars 74 forks source link

Calling fetchPlace using web_sdk when running in --release or --profile mode throws errors. #4

Closed nullrocket closed 3 years ago

nullrocket commented 3 years ago

Using flutter_google_places_sdk_web with --release or --profile throws errors about missing functions when calling fetchPlace. I tried looking into it a bit but I don't know a lot about the js/dart interop, but it seems to have something to do with the difference in dart2js and dartdevc output.

  // this call works in debug, throws in the browser in --release or --profile
  var placeDetails =  await  googlePlaces.fetchPlace(selectedPlace!.placeId!);

Desktop-screenshot (10)



[✓] Flutter (Channel stable, 2.5.1, on Ubuntu 21.04 5.11.0-37-generic, locale en_US.UTF-8)
    • Flutter version 2.5.1 at /home/doug/fvm/versions/2.5.1
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ffb2ecea52 (10 days ago), 2021-09-17 15:26:33 -0400
    • Engine revision b3af521a05
    • Dart version 2.14.2
matanshukry commented 3 years ago

@nullrocket looking into it

matanshukry commented 3 years ago

@nullrocket fixed and uploaded new version flutter_google_places_sdk_web: ^0.1.0+4

nullrocket commented 3 years ago

Thank you! it's working fine now, although there is some functionality that isn't exposed I'm really happy with this library so far. I will open a new issue for the other things.