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

Compiler Failed #13

Open
jhb115 opened this issue Oct 2, 2019 · 2 comments
Open

Compiler Failed #13

jhb115 opened this issue Oct 2, 2019 · 2 comments

Comments

@jhb115
Copy link

jhb115 commented Oct 2, 2019

After setting up firebase and deploying it, I used flutter run to run the code on iOS simulator but I am encountering the following compiler errors:

Compiler message:
lib/resources/firebase_provider.dart:93:31: Error: A value of type 'AuthResult' can't be
assigned to a variable of type 'FirebaseUser'.

  • 'AuthResult' is from 'package:firebase_auth/firebase_auth.dart'
    ('../../development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.14.0+
    5/lib/firebase_auth.dart').
  • 'FirebaseUser' is from 'package:firebase_auth/firebase_auth.dart'
    ('../../development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.14.0+
    5/lib/firebase_auth.dart').
    Try changing the type of the left hand side, or casting the right hand side to
    'FirebaseUser'.
    final FirebaseUser user = await _auth.signInWithCredential(credential);
    ^
    lib/ui/insta_upload_photo_screen.dart:212:18: Error: Too many positional arguments: 1
    allowed, but 2 found.
    Try removing the extra positional arguments.
    Im.copyResize(image, 500);
    ^
    ../../development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.4/lib/src/tran
    sform/copy_resize.dart:14:7: Context: Found this candidate, but the arguments don't match.
    Image copyResize(Image src, {int width, int height,
    ^^^^^^^^^^
    lib/ui/edit_profile_screen.dart:259:18: Error: Too many positional arguments: 1 allowed,
    but 2 found.
    Try removing the extra positional arguments.
    Im.copyResize(image, 500);
    ^
    ../../development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.4/lib/src/tran
    sform/copy_resize.dart:14:7: Context: Found this candidate, but the arguments don't match.
    Image copyResize(Image src, {int width, int height,
    ^^^^^^^^^^
    ../../development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.7
    .0/lib/src/cached_network_image_provider.dart:46:31: Error: The argument type 'Null
    Function(StringBuffer)' can't be assigned to the parameter type 'Iterable
    Function()'.
  • 'StringBuffer' is from 'dart:core'.
  • 'Iterable' is from 'dart:core'.
  • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart'
    ('../../development/tools/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to
    'Iterable Function()'.
    informationCollector: (StringBuffer information) {
    ^
    lib/ui/chat_detail_screen.dart:185:18: Error: Too many positional arguments: 1 allowed, but
    2 found.
    Try removing the extra positional arguments.
    Im.copyResize(image, 500);
    ^
    ../../development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.4/lib/src/tran
    sform/copy_resize.dart:14:7: Context: Found this candidate, but the arguments don't match.
    Image copyResize(Image src, {int width, int height,
    ^^^^^^^^^^
    Compiler failed on /Users/jeunghbyun/iOSProjects/Instagram-Clone/lib/main.dart
    Error launching application on iPhone 8 Plus.
@adamdupuis
Copy link

@jhb115 I am getting the same errors on Android. Did you ever resolve this?

@harsh2201
Copy link

Convert this line in ./lib/resources/firebase_provider.dart final FirebaseUser user = await _auth.signInWithCredential(credential) to this
final FirebaseUser user = (await _auth.signInWithCredential(credential)).user @jhb115

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

3 participants