inflearn logo
강의

講義

知識共有

Flutter + FirebaseでNetflix UIクローンをコーディングする[ランダムフラッター]

フラッターとファイアベースの連携 - 2) フラッターコードの作成

firebase 적용후 디버깅시

2143

imhw1997

投稿した質問数 1

0

firebase 를 적용시키고 메뉴얼대로 실행을 하였음에도

======== Exception caught by widgets library =======================================================
The following FirebaseException was thrown building KeyedSubtree-[<0>]:
[core/not-initialized] Firebase has not been correctly initialized.

 

Usually this means you've attempted to use a Firebase service before calling `Firebase.initializeApp`.

 

View the documentation for more information: https://firebase.flutter.dev/docs/overview#initialization

 

The relevant error-causing widget was: 
  TabBarView TabBarView:file:///D:/StudioProjects/netflix_clone/lib/main.dart:34:17

라는 오류명과 함께

와 같은 에러가 발생하고 있습니다 찾아보니 초기화가 안되어 있다고 되어있는데 해결방법은 애초에 firebase 설정할때의 순서대로 하는 방법이 해결법이라고 하더군요.. 아무리 적용을하고 수정을 했음에도 안되는 이유를 아시는 분은 답변 부탁 드리겠습니다.. ㅠㅠ

클론코딩 Flutter firebase

回答 3

1

dltkdgns00

void main() async {

WidgetsFlutterBinding.ensureInitialized();

await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);

runApp(MyApp());

}

 

저도 같은 오류가 있어 플러터 공식문서를 찾아보니 initializeApp()안에 저 옵션을 넣어줘야 한다고 해서 넣었더니 해결되었습니다.

https://firebase.flutter.dev/docs/ui/auth/integrating-your-first-screen/#initializing-firebase

0

dltkrskfk

저는 main.dart에 이렇게 수정해서 실행했습니다....

void main() async {
 WidgetsFlutterBinding.ensureInitialized();
 await Firebase.initializeApp();
 runApp(MyApp());
}

0

imhw1997

현재

firebase_core: ^1.20.0

cloud_firestore: ^3.4.2 입니다

home screen에 찜하기가 바로 업데이트가 안되는 현상

0

300

1

로고 이미지가 안불러와져요

1

557

1

firebase 설치이후 디버깅하면 아래와 같은 에러가 발생하는데 알려주실분 계실까요?

0

1511

1

TabController controller를 넣게되면 오류가 나고 late를 넣으면 정상으로 작동되는데 이유를 알 수 있을까요?

0

739

1

CarouselImage문제

0

522

1

22.12.11 carousel_slider 문의 드려요..

0

817

1

왜 버튼들이 세로로 정렬될까요..ㅜㅜ

0

422

1

firebase 프로덕트 모드로 진행했는데, 홈화면이 안뜹니다... ㅜ

0

466

1

circle_silder 와 box_slider 에 이미지가 한개만 나옵니다.

0

369

0

url_launcher 의존성 추가시 빌드 불가 에러

1

337

0

220614 carousel_slider.dart

1

676

1

FirebaseFrirestroe 사용시 아래코드로 하시면 됩니다.

5

795

4

M1에서는 안되는가 봅니다..?

0

318

0

상세 페이지 코딩 입력햇는데요 안나와서요 ㅠㅜ 한번 봐주세요

0

335

1

이 부분 누가 해석좀 해주세요...

0

416

1

Container 한번더 감싼 이유

1

363

1

기기별 찜하기 기능 표시

1

412

0

({this.movies}); 에서 movies가 에러나는 이유를 모르겠습니다 ㅠㅠ

1

1015

10

widget.movie.like는 뭘 의미하는 것일까요?

0

240

0

fire base core 오류???

0

464

1

2021.03.17일 기준입니다

10

635

6

FlatButton이 안쓰이는 클래스가 되어서 이렇게 바꿔봤어요

5

631

2

강사님하고 똑같이 한거 같은데 .

0

307

1

다트 vscode 오류

0

205

0