Skip to content

[📚] Example code does not work #10089

Closed
@lukehutch

Description

@lukehutch

Using the latest Flutter release, I tried the example code here:

https://pub.dev/packages/firebase_ui_auth

I get the following errors:

lib/main.dart:8:24: Error: 'EmailAuthProvider' is imported from both 'package:firebase_auth_platform_interface/src/providers/email_auth.dart' and 'package:firebase_ui_auth/src/providers/email_auth_provider.dart'.
    const providers = [EmailAuthProvider()];
                       ^^^^^^^^^^^^^^^^^
lib/main.dart:15:24: Error: The argument type 'List<dynamic>' can't be assigned to the parameter type 'List<AuthProvider<AuthListener, AuthCredential>>?'.
 - 'List' is from 'dart:core'.
 - 'AuthProvider' is from 'package:firebase_ui_auth/src/providers/auth_provider.dart' ('/opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ui_auth-1.1.2/lib/src/providers/auth_provider.dart').
 - 'AuthListener' is from 'package:firebase_ui_auth/src/providers/auth_provider.dart' ('/opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ui_auth-1.1.2/lib/src/providers/auth_provider.dart').
 - 'AuthCredential' is from 'package:firebase_auth_platform_interface/src/auth_credential.dart' ('/opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.11.4/lib/src/auth_credential.dart').
            providers: providers,
                       ^
lib/main.dart:25:24: Error: The argument type 'List<dynamic>' can't be assigned to the parameter type 'List<AuthProvider<AuthListener, AuthCredential>>?'.
 - 'List' is from 'dart:core'.
 - 'AuthProvider' is from 'package:firebase_ui_auth/src/providers/auth_provider.dart' ('/opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ui_auth-1.1.2/lib/src/providers/auth_provider.dart').
 - 'AuthListener' is from 'package:firebase_ui_auth/src/providers/auth_provider.dart' ('/opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ui_auth-1.1.2/lib/src/providers/auth_provider.dart').
 - 'AuthCredential' is from 'package:firebase_auth_platform_interface/src/auth_credential.dart' ('/opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.11.4/lib/src/auth_credential.dart').
            providers: providers,
                       ^

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions