2022-05-26 01:02:06 +00:00
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
2023-03-27 17:02:44 +00:00
|
|
|
import 'package:selfprivacy/ui/components/buttons/brand_button.dart';
|
2022-09-14 16:45:50 +00:00
|
|
|
import 'package:selfprivacy/ui/components/info_box/info_box.dart';
|
2024-01-31 05:14:23 +00:00
|
|
|
import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart';
|
2022-05-24 17:45:13 +00:00
|
|
|
|
2022-05-26 01:02:06 +00:00
|
|
|
class RecoveryKeyReceiving extends StatelessWidget {
|
2024-02-09 11:07:03 +00:00
|
|
|
const RecoveryKeyReceiving({required this.recoveryKey, super.key});
|
2022-05-26 01:02:06 +00:00
|
|
|
|
2024-02-09 11:07:03 +00:00
|
|
|
final String recoveryKey;
|
2024-02-08 15:08:29 +00:00
|
|
|
|
2024-02-09 11:07:03 +00:00
|
|
|
@override
|
|
|
|
Widget build(final BuildContext context) => BrandHeroScreen(
|
|
|
|
heroTitle: 'recovery_key.key_main_header'.tr(),
|
|
|
|
heroSubtitle: 'recovery_key.key_receiving_description'.tr(),
|
|
|
|
hasBackButton: false,
|
|
|
|
hasFlashButton: false,
|
|
|
|
children: [
|
|
|
|
const Divider(),
|
|
|
|
const SizedBox(height: 16),
|
2022-06-05 22:40:34 +00:00
|
|
|
Text(
|
|
|
|
recoveryKey,
|
|
|
|
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
|
|
|
|
fontSize: 24,
|
|
|
|
fontFamily: 'RobotoMono',
|
|
|
|
),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
),
|
2024-02-09 11:07:03 +00:00
|
|
|
const SizedBox(height: 16),
|
|
|
|
const Divider(),
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
InfoBox(
|
|
|
|
text: 'recovery_key.key_receiving_info'.tr(),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
BrandButton.filled(
|
|
|
|
child: Text('recovery_key.key_receiving_done'.tr()),
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.of(context).popUntil((final route) => route.isFirst);
|
|
|
|
},
|
2022-06-05 22:40:34 +00:00
|
|
|
),
|
2024-02-09 11:07:03 +00:00
|
|
|
],
|
|
|
|
);
|
2022-05-26 01:02:06 +00:00
|
|
|
}
|