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: [ children: [
if (keyStatus.exists) RecoveryKeyStatusCard(isValid: keyStatus.isValid), if (keyStatus.exists) RecoveryKeyStatusCard(isValid: keyStatus.isValid),
const SizedBox(height: 16), const SizedBox(height: 16),
if (keyStatus.exists && !_isConfigurationVisible) AnimatedCrossFade(
RecoveryKeyInformation(state: keyStatus), duration: const Duration(milliseconds: 300),
if (_isConfigurationVisible || !keyStatus.exists) firstChild: keyStatus.exists && !_isConfigurationVisible
const RecoveryKeyConfiguration(), ? 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), const SizedBox(height: 16),
if (!_isConfigurationVisible && keyStatus.isValid && keyStatus.exists) if (!_isConfigurationVisible && keyStatus.isValid && keyStatus.exists)
BrandButton.text( BrandButton.text(