build method
- dynamic context,
- 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),
};
}