build method

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

Implementation

@override
Widget build(BuildContext context, WidgetRef ref) {
  final pinsLoader = ref.watch(pinListProvider(spaceId));
  return pinsLoader.when(
    data: (pins) => buildPinsSectionUI(context, pins),
    error: (e, s) {
      _log.severe('Failed to load pins in space', e, s);
      return Center(
        child: Text(L10n.of(context).loadingFailed(e)),
      );
    },
    loading: () => Center(
      child: Text(L10n.of(context).loading),
    ),
  );
}