BuildContext (1) 썸네일형 리스트형 [Flutter] BuildContext 이해하기 Flutter 공식 문서를 살펴보면 BuildContext에 대한 두 가지 정의를 찾을 수 있다. 1 A handle to the location of a widget in the widget tree. 위젯 트리에서 위젯의 위치를 다루는 것 Widget build(BuildContext context){ // ... return Scaffold(...) } 먼저 알아야 할 것은 Flutter 안의 모든 Widget은 내부에 build 메서드를 가지고 있다는 것이다. build 메서드는 widget tree 상에서 어디에 위치하는지에 대한 정보를 가지고 있는 context를 넣어 Scaffold Widget 리턴한다. 2 Each widget has its own BuildContext, which be.. 이전 1 다음