Error: The name 'Class명' is defined in the libraries 에러가 발생할 때 해결 방법

Taek-In Jeong·2021년 10월 11일
0

1. 원인

import된 2개 이상의 패키지에서 중복되는 Class명이 있을 경우 발생

2. 해결방법

import 'package:firebase_auth/firebase_auth.dart' hide User;
import 'package:firebase_auth/firebase_auth.dart' as firebase show User;

위 코드처럼 import 패키지 뒤에 hide/show를 사용해준다.

0개의 댓글