mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-05 00:13:12 +00:00
feat: Add refresh indicator on Recovery Key page to support drag gestures
This commit is contained in:
parent
0639ee4d57
commit
3ba2c6f731
|
@ -21,6 +21,12 @@ class RecoveryKey extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _RecoveryKeyState extends State<RecoveryKey> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
context.read<RecoveryKeyCubit>().load();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(final BuildContext context) {
|
||||
final RecoveryKeyState keyStatus = context.watch<RecoveryKeyCubit>().state;
|
||||
|
@ -50,12 +56,17 @@ class _RecoveryKeyState extends State<RecoveryKey> {
|
|||
break;
|
||||
}
|
||||
|
||||
return BrandHeroScreen(
|
||||
heroTitle: 'recovery_key.key_main_header'.tr(),
|
||||
heroSubtitle: subtitle,
|
||||
hasBackButton: true,
|
||||
hasFlashButton: false,
|
||||
children: widgets,
|
||||
return RefreshIndicator(
|
||||
onRefresh: () async {
|
||||
context.read<RecoveryKeyCubit>().load();
|
||||
},
|
||||
child: BrandHeroScreen(
|
||||
heroTitle: 'recovery_key.key_main_header'.tr(),
|
||||
heroSubtitle: subtitle,
|
||||
hasBackButton: true,
|
||||
hasFlashButton: false,
|
||||
children: widgets,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue