์น๊ณต๋ทฐ/flutter13 flutter ์ํฌํธ ๊ฒฝ๋ก import 'package:{project_name}/{location}/filename.dart'; project_name : ํ๋ก์ ํธ๋ช location: lib ํด๋๋ก๋ถํฐ์ ์์น 2023. 10. 6. flutter Drift ํ๋ก๊ทธ์ธ ์ฌ์ฉํด์ orm์ผ๋ก ๋ฐ์ดํฐ ๊ด๋ฆฌํ๊ธฐ Drift ์ง์ sql ์ฌ์ฉํ์ง ์๊ณ ๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ๊ด๋ฆฌํ ์ ์๋ค. ORM(Object Relational Mapping, ORM) ์ ์ฉ๋์ด์๋ ํ๋ฌ๊ทธ์ธ ํ ์ด๋ธ์ ํด๋์ค๋ก ํํํ๊ณ ์ฟผ๋ฆฌ๋ฅผ ๋คํธ ์ธ์ด๋ก ํํํ๋ฉด ๋๋ฆฌํํธ๊ฐ ์๋์ผ๋ก ํ ์ด๋ธ๊ณผ ์ฟผ๋ฆฌ๋ฅผ ์์ฑํด์ค. 1. ํ ์ด๋ธ ์์ฑ SQL create table student( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR NOT NULL, age INT DEFAULT 14, score INT NOT NULL ) Drift class Student extends Table{ IntColumn get id => integer.autoIncrement()(); TextColumn get name => text()(); .. 2023. 9. 17. flutter pubspec.yaml ์์ฑ ์ ๋ฆฌ # ํ๋ฌ๊ทธ์ธ์ ์ถ๊ฐํ ์ ์์. ์ฑ์ ํจ๊ป ํจํค์ง๋จ dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 # ํ๋ฌ๊ทธ์ธ ์ถ๊ฐ ๊ฐ๋ฅ. ์ฑ๊ณผ ํจ๊ป ํจํค์ง ๋์ง ์์ # ๊ฐ๋ฐํ ๋๋ง ํ์ํ๊ณ ์ฑ์ ์คํํ ๋ ํ์์๋ ํ๋ฌ๊ทธ์ธ๋ค์ ์์ฑํ๋ฉด๋จ dev_dependencies: flutter_test: sdk: flutter 2023. 9. 14. flutter ๊ฐค๋ฌ๋ฆฌ ๊ถํ ์ค์ ios ๊ถํ project > ios > Runner > Info.plist /*์๋ต*/ NSPhotoLibraryUsageDescription Please allow photo library permission. android ๊ถํ android > app > src > main > AndroidManifest.xml 2023. 9. 11. ์ด์ 1 2 3 4 ๋ค์