Answers for "The method 'placemarkFromCoordinates' isn't defined for the type 'Geolocator'."

2

flutter Error: 'Placemark' isn't a type.

#Geolocator() is deprecated from the package geolocator ^6.1.14 
#Flutter new version Flutter 1.22.5, you have to use the geocoding package 
#1- Add package in pubspec.yaml file:
dependencies:
  geocoding: ^1.0.5
#2 Install it
$ flutter pub get
#3 Import it in  Dart code
import 'package:geocoding/geocoding.dart';
Posted by: Guest on January-19-2021

Code answers related to "The method 'placemarkFromCoordinates' isn't defined for the type 'Geolocator'."

Browse Popular Code Answers by Language