20 lines
566 B
Dart
20 lines
566 B
Dart
|
import 'package:flutter/cupertino.dart';
|
||
|
import 'package:sqflite/sqflite.dart';
|
||
|
import 'habit.dart';
|
||
|
|
||
|
abstract class ToDoInterface {
|
||
|
|
||
|
Future<void> createTable(Database database);
|
||
|
|
||
|
Future<int> create({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);
|
||
|
}
|