working message rendering
This commit is contained in:
parent
a28bced44d
commit
7c76bb6e66
20 changed files with 305 additions and 197 deletions
18
lib/controllers/new_events_controller.dart
Normal file
18
lib/controllers/new_events_controller.dart
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||
import "package:nexus/models/event.dart";
|
||||
|
||||
class NewEventsController extends Notifier<IList<Event>> {
|
||||
final String roomId;
|
||||
NewEventsController(this.roomId);
|
||||
|
||||
@override
|
||||
IList<Event> build() => const IList.empty();
|
||||
|
||||
void add(IList<Event> newEvents) => state = newEvents;
|
||||
|
||||
static final provider = NotifierProvider.autoDispose
|
||||
.family<NewEventsController, IList<Event>, String>(
|
||||
NewEventsController.new,
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue