Geolocation with Dart in Firefox getCurrentPosition not a function


I have written this code in Dart

window.navigator.geolocation.getCurrentPosition((Geoposition position) {

When I run it in Dantium or Google Chrome it works fine, but if I try running this in Firefox, I get this JavaScript error

Timestamp: 15/11/12 21:36:19
Error: TypeError: getCurrentPosition$1 is not a function

This is wierd as if I just wrote this using html5 JavaScript

if (navigator.geolocation) {

function showPosition(position) {
    var latlon=position.coords.latitude+","+position.coords.longitude;

It works perfectly fine in Firefox.

The Firefox version is 16.0.2, Dart Editor version is 0.2.3_r14669 and Dart SDK version is

Is this a bug or am I doing something wrong?


It was a bug, but it is marked as fixed now, by @Pete Blois shown below.


Issue has been fixed, as well as an issue causing it to not work on IE10.

Answered By – Pete Blois

Answer Checked By – Robin (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *