feat: add animation recovery menu

- Resolve https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/164
This commit is contained in:
dettlaff 2023-12-20 05:21:20 +04:00
parent 2f6b4e0f9c
commit 40e09fcbbb

View file

@ -89,10 +89,18 @@ class _RecoveryKeyContentState extends State<RecoveryKeyContent> {
children: [
if (keyStatus.exists) RecoveryKeyStatusCard(isValid: keyStatus.isValid),
const SizedBox(height: 16),
if (keyStatus.exists && !_isConfigurationVisible)
RecoveryKeyInformation(state: keyStatus),
if (_isConfigurationVisible || !keyStatus.exists)
const RecoveryKeyConfiguration(),
AnimatedCrossFade(
duration: const Duration(milliseconds: 300),
firstChild: keyStatus.exists && !_isConfigurationVisible
? RecoveryKeyInformation(state: keyStatus)
: const SizedBox.shrink(),
secondChild: _isConfigurationVisible || !keyStatus.exists
? const RecoveryKeyConfiguration()
: const SizedBox.shrink(),
crossFadeState: _isConfigurationVisible || !keyStatus.exists
? CrossFadeState.showSecond
: CrossFadeState.showFirst,
),
const SizedBox(height: 16),
if (!_isConfigurationVisible && keyStatus.isValid && keyStatus.exists)
BrandButton.text(