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

PLEASE, help me #3

Open
jcosta191 opened this issue Jul 12, 2019 · 0 comments
Open

PLEASE, help me #3

jcosta191 opened this issue Jul 12, 2019 · 0 comments

Comments

@jcosta191
Copy link

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
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

1 participant