build method

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

Implementation

@override
Widget build(BuildContext context, WidgetRef ref) {
  final pinData = ref.watch(pinProvider(pinId));
  return pinData.when(
    data: (pin) => buildPinItemUI(context, pin),
    error: (e, s) {
      _log.severe('Failed to load pin', e, s);
      return Text(L10n.of(context).errorLoadingPin(e));
    },
    loading: () => const Skeletonizer(
      child: SizedBox(height: 100, width: 100),
    ),
  );
}