싱글톤(Singleton) 클래스 class Singleton { static final Singleton _instance = Singleton._internal(); factory Singleton() { return _instance; } Singleton._internal() { //클래스가 최초 생성될때 1회 발생 //초기화 코드 } } Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window) Related Posted on 2021-05-18 1:21 AM by andrew Comment 📂This entry was posted in flutter
2021-05-18 andrew Back Button 막기(Disable Back Button)WillPopScope 위젯을 사용한다. scaffold를 WillPopScope로 감싸서 처리 한다. return Scaffold( appBar: AppBar( title: Te...
2021-05-18 andrew FutureBuilderFuture가 있는 위젯을 만들기위해선 Stateful 위젯으로 해둔 다음에, 로딩이 완료되면 그 값에 따라 setstate을 다시 해야했다. 코드가 굉장히 지저분해지고...