derTuca / flutter_google_places_picker

Google Places Autocomplete for Flutter
MIT License
18 stars 28 forks source link

MissingPluginException #12

Closed abdullah4one closed 3 years ago

abdullah4one commented 5 years ago

[ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception: E/flutter (18747): MissingPluginException(No implementation found for method showPlacePicker on channel plugin_google_place_picker) E/flutter (18747): #0 MethodChannel.invokeMethod package:flutter/…/services/platform_channel.dart:291 E/flutter (18747): E/flutter (18747): #1 PluginGooglePlacePicker.showPlacePicker (package:google_places_picker/google_places_picker.dart:24:41)

_showPlacePicker() async {
    String placeName="kottayam";
    // Platform messages may fail, so we use a try/catch PlatformException.
    var place = await PluginGooglePlacePicker.showPlacePicker();
    placeName = place.name;

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted)
      return;

      print( placeName);

  }