build method

  1. @override
dynamic build(
  1. dynamic context,
  2. dynamic ref
)

Implementation

@override
Widget build(BuildContext context, WidgetRef ref) {
  final parentSpaceListData = ref.watch(parentIdsProvider(roomId));
  return parentSpaceListData.when(
    data: (spaceList) => spaceListUI(context, spaceList),
    error: (e, s) {
      _log.severe('Failed to load space', e, s);
      return Text(L10n.of(context).errorLoadingSpaces(e));
    },
    loading: () => const Skeletonizer(
      child: SizedBox(height: 100, width: 100),
    ),
  );
}