cpd/lib/database/todo_interface.dart

27 lines
596 B
Dart
Raw Normal View History

import 'package:flutter/cupertino.dart';
import 'package:sqflite/sqflite.dart';
import 'habit.dart';
abstract class ToDoInterface {
Future<void> createTable(Database database);
Future<int> insert({
required String title,
required String subtitle,
required IconData icon});
Future<List<Habit>> fetchAll();
Future<Habit?> fetchById(int id);
Future<int> update({
required int id,
required String title,
required String subtitle,
required IconData icon});
Future<void> delete(int id);
Future<int?>? updateCompletionStatus(int id, bool isCompleted);
}