최신 글
-
Flutter State, Stateful&Stateless Widget Flutter meetup#2 2019.11.20 @Google Startup campus author: huansuh draft: 191120 1. State Widget State State class (아래 내용은 meetup에서 들은 내용을 바탕으로 flutter api docs를 읽으며 정리한 내용임. 일부 내용은 추가 확인 필요(!!)) State는 (1) widget이 build되는 시점에 읽을 수 있고 (2) widget의 lifetime 동안 변경될 수 있는 정보이다. State object는 StatefulWidget이 widget tree에 들어가기 위해 생성 될 때 createState를 통해 생성된다. (!!) StatefulWidget이 widget tree 상에서 여러 번 in..
-
Flutter Infinite Scroll ListView Infinite Scroll ListView overall : 무한스크롤 리스트뷰 author : huansuh draft : 2019.11.13 ListView widget을 통해 아래와 같이 무한스크롤을 구현할 수 있다. ListView.builder( itemCount: itemList.length + 1, // 실제 데이터수 + 1 itemBuilder: (context, idx) { // 최하단 체크 if(idx == itemCount) { // 데이터 요청 여부(end of data) 체크 if(canLoadMore() == true) { loadMore(); // 추가 데이터 요청 // 로딩 프로그레스 return return Center( child: Padding( padding: con..
-
Flutter JSON and serialization JSON and serialization overall : JSON and Serialization docs 정리 author : huansuh draft : 2019.11.07 reference : flutter.dev/docs/... 0. Background Serialization Encoding (serialization) : Data -> String Decoding (deserialization) : String -> Data Json libraries in Flutter Is there a GSON/Jackson/Moshi equivalent in Flutter? => The simple answer is NO. 위와 같은 라이브러리들은 runtime reflection이 필요하며, 생성해 ..
-
Flutter Flutter State management 개요 State management Overall : Flutter State management 개요 author: huansuh draft : 191104 reference : flutter.dev/docs/... Think declaratively Flutter is declarative. UI : The layout on the screen f : build methods state : the application state :: App의 state가 변경되면, redraw 를 trigger 하므로, widget.setText와 같이 UI를 직접 변경하지 않는다. Declarative UI vs Imperative UI// Declarative style return ViewB( color: red, ..