강의

멘토링

커뮤니티

Inflearn Community Q&A

daengcheongcrow's profile image
daengcheongcrow

asked

Flutter Introduction - Android and iOS Development at Once (with Firebase)

선생님 질문 하나 있습니다.

Resolved

Written on

·

252

2

home_page.dart에서는

그냥 user.photoUrl 이 되는데

account_page.dart에선

widget.user.photoUrl 로 작성 해야 하는 이유가 무엇인가요?

androidFlutterios

Answer 3

4

survivalcoding님의 프로필 이미지
survivalcoding
Instructor

StatelessWidget 에서는 클래스가 하나이고 전역 변수 user에 어디서나 접근이 가능합니다.

StatefulWidget 에서는 클래스가 두 개로 구성되어 있고 상위 user 에 접근하려면 widget. 을 통해서 접근해야 합니다.

1

daengcheongcrow님의 프로필 이미지
daengcheongcrow
Questioner

StatelessWidget과 StatefulWidget의 차이였군요. 답변 감사합니다.

0

저도 같은 질문남길려고했는데 감사합니다

daengcheongcrow's profile image
daengcheongcrow

asked

Ask a question