전체 글
-
[Error] Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe.Flutter/Error 2023. 6. 23. 10:59
E/flutter ( 3423): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe. E/flutter ( 3423): At this point the state of the widget's element tree is no longer stable. 이라는 오류를 직면하게 되는 경우가 있을 것이다. 나 같은 경우는 Future.delayed(Duration(seconds: 2), () { Navigator.of(context).pop(false); }); 버튼을 눌렀을 때 showDialog를 경고창을 띄우고 2초 뒤에 사라지길 원..
-
[Flutter] 앱 구동시 Splash 화면 만들기Flutter 2023. 4. 20. 16:02
보통 앱들은 첫 구동시에 Splash 화면을 먼저 보여주고 로그인 화면이나 메인 화면으로 이동하는 경우가 많다. 이유야 여러가지 있겠으나, 밋밋함을 없애기 위해서 추가하는 경우도 있을꺼고, 앱 자체가 무겁다보면 데이터를 불러오는 시간도 길어지기 마련이다. 후자같은 경우에는 Widget 내에서 FutureBuilder를 써서 딜레이를 줄 수도 있겠으나 각자 취향 차이이고 이유는 많으니까 .. 솔직히 난 전자에 속해서 Splash를 구현했다. https://pub.dev/packages/flutter_native_splash flutter_native_splash | Flutter Package Customize Flutter's default white native splash screen with bac..