Skip to content

PLEASE, help me #3

Description

@jcosta191

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...

Compiler message:
lib/fragments/startrequest.dart:41:37: Error: The method 'listen' isn't defined for the class 'Stream Function()'.

  • 'Stream' is from 'dart:async'.
  • 'LocationData' is from 'package:location/location.dart' ('file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/location-2.3.5/lib/location.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'listen'.
    _location.onLocationChanged.listen((Map<String, double> result) {
    ^^^^^^
    lib/fragments/startrequest.dart:54:18: Error: A value of type 'Future Function()' can't be assigned to a variable of type 'Map<String, double>'.
  • 'Future' is from 'dart:async'.
  • 'LocationData' is from 'package:location/location.dart' ('file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/location-2.3.5/lib/location.dart').
  • 'Map' is from 'dart:core'.
    Try changing the type of the left hand side, or casting the right hand side to 'Map<String, double>'.
    location = await _location.getLocation;
    ^
    Compiler failed on C:\Users\johnn\AndroidStudioProjects\flutter_app-master\lib\main.dart
    Finished with error: Gradle task assembleDebug failed with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions