Sela Repository Project Flutter
Berikut contoh dasar kode program Flutter untuk aplikasi To-Do List dengan fitur CRUD (Create, Read, Update, Delete) menggunakan SQLite. Kita akan gunakan `sqflite` dan `path_provider`. --- ### **Langkah 1: Tambahkan Dependency di `pubspec.yaml`** ```yaml dependencies: flutter: sdk: flutter sqflite: ^2.3.0 path_provider: ^2.0.15 ``` --- ### **Langkah 2: Buat Model Todo** ```dart // models/todo.dart class Todo { int? id; String title; String description; Todo({this.id, required this.title, required this.description}); Map<String, dynamic> toMap() { return { 'id': id, 'title': title, 'description': description, }; } factory Todo.fromMap(Map<String, dynamic> map) { return Todo( id: map['id'], title: map['title'], description...