SharedPreferences (2) 썸네일형 리스트형 [Flutter] shared_preferences 사용 1. 의존성 추가 shared_preferences: ^2.2.0 2. 텍스트 받을 위젯 세팅 final _contentEditController = TextEditingController(); child: TextField( controller: _contentEditController, style: TextStyle(color: Colors.black), decoration: InputDecoration( border: InputBorder.none, hintText: '메모를 입력해주세요', hintStyle: TextStyle(color: Colors.grey[300])), cursorColor: Colors.blue, ), 3. 인스턴스 초기화 (대부분 State단에서 선언) final Futu.. [Flutter] 내부 저장 디비를 활용해보자 플러터에서 단말기 내부 디비를 사용할 수있다. 사용해보자 1. pubspec.yaml shared_preferences: ^2.2.0 2. 인스턴스 선언 & 데이터 쓰기 class Scene extends StatelessWidget { late SharedPreferences sp; _loadData() async{ sp = await SharedPreferences.getInstance(); sp.setString("test", "smithtestthisis"); } 3. 데이터 읽기 GestureDetector( onTap: (){ Navigator.pushNamed(context, '/second', arguments: [Person('gd','smith'),Person('gd2','smith2'.. 이전 1 다음