http://www.flutterbyexample.com/#/posts/inherited_widgets

 

Flutter by Example

 

www.flutterbyexample.com

위 글에 대한 내용입니다.

 

플러터 에서 sdk 의 모든 부분이 개발자에게 노출되어 있고 개발자는 상속된 위젯의 장점을 이용할수 있다.

 

또한 커스텀한 상속 위젯을 "built-in central state storage" 처럼 사용할수 있습니다. "Redux Store" 나 "Vue 의 Vuex Store" 처럼 말이죠.

아래는 예시 소스 입니다.

1
2
3
4
5
6
@override
Widget build(context) {
  return new Text('Hello, World',
    style: new TextStyle(color: Theme.of(context).primaryColor),
  );
}
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter

"Lifting State Up" 아키텍처

statefulwidget 에서 상태관리 툴

'Flutter' 카테고리의 다른 글

BuildContext() 란  (0) 2020.02.12

+ Recent posts