小编Azg*_*aou的帖子

错误:“AuthProvider”是从两者导入的

当我尝试在 Android Studio 中运行 flutter 代码时,出现以下错误:

Task :app:compileFlutterBuildDebug
lib/features/auth/authRepository.dart:5:1: Error: 'AuthProvider' is imported from both 'package:firebase_auth_platform_interface/src/auth_provider.dart' and 'package:flutterquiz/features/auth/cubits/authCubit.dart'.
import 'package:flutterquiz/features/auth/cubits/authCubit.dart';
^^^^^^^^^^^^
lib/features/auth/authRemoteDataSource.dart:7:1: Error: 'AuthProvider' is imported from both 'package:firebase_auth_platform_interface/src/auth_provider.dart' and 'package:flutterquiz/features/auth/cubits/authCubit.dart'.
import 'package:flutterquiz/features/auth/cubits/authCubit.dart';
^^^^^^^^^^^^
lib/features/auth/cubits/signInCubit.dart:6:1: Error: 'AuthProvider' is imported from both 'package:firebase_auth_platform_interface/src/auth_provider.dart' and 'package:flutterquiz/features/auth/cubits/authCubit.dart'.
import 'authCubit.dart';
^^^^^^^^^^^^
lib/features/auth/authRepository.dart:62:27: Error: 'AuthProvider' is imported from both 'package:firebase_auth_platform_interface/src/auth_provider.dart' and 'package:flutterquiz/features/auth/cubits/authCubit.dart'.
      if (authProvider == AuthProvider.email) {
                          ^^^^^^^^^^^^
lib/features/auth/authRepository.dart:136:15: Error: 'AuthProvider' is imported from both 'package:firebase_auth_platform_interface/src/auth_provider.dart' and 'package:flutterquiz/features/auth/cubits/authCubit.dart'.
      signOut(AuthProvider.email);
              ^^^^^^^^^^^^
lib/features/auth/authRepository.dart:159:21: Error: 'AuthProvider' is imported …
Run Code Online (Sandbox Code Playgroud)

build gradle flutter

5
推荐指数
1
解决办法
906
查看次数

标签 统计

build ×1

flutter ×1

gradle ×1