drift/sally_flutter/example/lib/bloc.dart

15 lines
282 B
Dart
Raw Normal View History

2019-03-03 13:03:11 -08:00
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);
}
}