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