build method
- dynamic context,
- dynamic ref
Implementation
@override
Widget build(BuildContext context, WidgetRef ref) {
final tasksLoader = ref.watch(taskListProvider(spaceId));
return tasksLoader.when(
data: (tasks) => buildTasksSectionUI(context, tasks),
error: (e, s) {
_log.severe('Failed to load tasks in space', e, s);
return Center(
child: Text(L10n.of(context).loadingTasksFailed(e)),
);
},
loading: () => Center(
child: Text(L10n.of(context).loading),
),
);
}