0

While reading a tutorial online about how to fetch the device's location with Flutter, I see this code snippet:

final Geolocator geolocator = Geolocator()..forceAndroidLocationManager;

What is the .. operator? I googled but couldn't find anything.

Full code from the tutorial:

  _getCurrentLocation() {
    final Geolocator geolocator = Geolocator()..forceAndroidLocationManager;

    geolocator
        .getCurrentPosition(desiredAccuracy: LocationAccuracy.best)
        .then((Position position) {
      setState(() {
        _currentPosition = position;
      });
    }).catchError((e) {
      print(e);
    });
  }
catcon
  • 1,295
  • 1
  • 9
  • 18

0 Answers0