1월, 2022의 게시물 표시

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' );

[안드로이드] gps 권한을 요청 If you need access to FINE location, you must request both ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION

 안드로이드에서 gps 권한을 요청하기 manifest에  <uses-permission android :name ="android.permission.ACCESS_FINE_LOCATION" /> 를 추가했더니 If you need access to FINE location, you must request both ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION 가 나왔는데 <uses-permission android :name ="android.permission.ACCESS_COARSE_LOCATION" /> 를 같이 써주면 해결. fine은 자세한 위치 coarse는 대략적 위치를 가져오는 권한인데 coarse는 무조건 권한 선언되어야 하기 때문 https://developer.android.com/training/location/permissions?hl=ko https://rkdxowhd98.tistory.com/127