build method

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

Implementation

@override
Widget build(BuildContext context, WidgetRef ref) {
  return switch (ref.watch(backupStateProvider)) {
    RecoveryState.enabled => allowDisabling
        ? renderCanResetAction(context, ref)
        : const SizedBox.shrink(), // nothing to see here. all good.
    RecoveryState.incomplete => renderRecoverAction(context, ref),
    RecoveryState.disabled => renderStartAction(context, ref),
    _ => renderUnknown(context, ref),
  };
}