Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The method 'RaisedButton' isn't defined for the class 'GoogleMapPlacePicker'. #179

Open
CodeLifeITs opened this issue Oct 6, 2022 · 3 comments

Comments

@CodeLifeITs
Copy link

../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_place_picker-2.1.0-nullsafety.3/lib/src/google_map_place_picker.dart:339:11: Error: The method 'RaisedButton' isn't defined for the class 'GoogleMapPlacePicker'.

  • 'GoogleMapPlacePicker' is from 'package:google_maps_place_picker/src/google_map_place_picker.dart' ('../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_place_picker-2.1.0-nullsafety.3/lib/src/google_map_place_picker.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'RaisedButton'.
    RaisedButton(
    ^^^^^^^^^^^^

it's the error I got can someone help?

@korosiadam99
Copy link

korosiadam99 commented Nov 1, 2022

In Flutter 3 you have to use ElevatedButton instead of RaisedButton. It's not your fault, It's deprecated. I submitted a pull request. You just need to change your google_maps_place_picker import for these lines:

google_maps_place_picker:
    git:
      url: https://github.com/fysoul17/google_maps_place_picker.git
      ref: 22bd2674fc648a69ceefe7c99afeece282a6f711

@hirandelab
Copy link

In Flutter 3 you have to use ElevatedButton instead of RaisedButton. It's not your fault, It's deprecated. I submitted a pull request. You just need to change your google_maps_place_picker import for these lines:

google_maps_place_picker:
    git:
      url: https://github.com/fysoul17/google_maps_place_picker.git
      ref: 22bd2674fc648a69ceefe7c99afeece282a6f711

Can you explain in a little more detail? I do not fully understand. thanks

@korosiadam99
Copy link

If you get this error message, just open your pubspec.yaml, go to that line, where you import Google maps picker, and replace with my version.

google_maps_place_picker: ^YOUR_VERSION
->

google_maps_place_picker:
    git:
      url: https://github.com/fysoul17/google_maps_place_picker.git
      ref: 22bd2674fc648a69ceefe7c99afeece282a6f711

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants