drift/sally_flutter/example/lib/bloc.dart

15 lines
282 B
Dart

import 'dart:async';
import 'package:sally_example/database/database.dart';
class TodoAppBloc {
final Database db;
Stream<List<TodoEntry>> get allEntries => db.allEntries();
TodoAppBloc() : db = Database();
void addEntry(TodoEntry entry) {
db.addEntry(entry);
}
}