글

라벨이 dart인 게시물 표시

[flutter] Navigator operation requested with a context that does not include a Navigator.

 Navigator operation requested with a context that does not include a Navigator. https://stackoverflow.com/questions/50124355/flutter-navigator-not-working/50125296 void main() => runApp(MaterialApp(home: FooClass(),)); 로 고쳐서 해결

flutter sqlite에서 리턴 했는데 Instance of 'Future'라고 뜸

future는 기다려서 받아야하는데 await 쓰는 걸 잊어버렸다 https://stackoverflow.com/questions/55744894/instance-of-futuredynamic-in-flutter

flutter sqlite database storage location 플러터 db위치

  I want to have an SQLite db in my flutter app, so i followed this flutter cookbook:   https://flutter.dev/docs/cookbook/persistence/sqlite I open the database with the following path:  join(await getDatabasesPath(), 'doggie_database.db')  exactly like the tutorial. I ran the app on my Android phone (not emulator). Now i want to inspect the database file on my PC, but i cannot find the file on my phone. I debugged the above statement and it resolves to  /data/user/0/*mypackage*.*app-name*/databases/doggie_database.db , but i can't find the folder  /data  (only  Android/data ) or the file in my file manager neither on my phone nor on my pc. Where is the file and how can i extract it from my phone? I found the solution that works on Android. It is possible to extract the database file by using adb. Connect the phone via USB use the adb shell type  run-as *mypackage*.*app-name* you are in the  /data/data/*mypackage*.*app-name*  folder...

[dart] 숫자 빈자리를 0으로 채우기 zero padding

.padLeft(2, '0' );  하면 왼쪽 빈만큼 0 들어간다 Dart 1.3   introduced a   String.padLeft   and a   String.padRight   you can use : String intToString( int i, { int pad 0 }) => i.toString().padLeft(pad, '0' );