build method
- String? arg
Implementation
@override
Future<List<ffi.CalendarEvent>> build(String? arg) async {
final client = ref.watch(alwaysClientProvider);
//GET ALL EVENTS
if (arg == null) {
_listener =
client.subscribeStream('calendar'); // keep it resident in memory
} else {
//GET SPACE EVENTS
_listener = client.subscribeStream('$arg::calendar');
}
_listener.forEach((e) async {
state = await AsyncValue.guard(_getEventList);
});
return await _getEventList();
}