mirror of https://github.com/AMT-Cheif/drift.git
15 lines
282 B
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);
|
||
|
}
|
||
|
}
|