mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 09:31:13 +00:00
Merge pull request 'feat: Add refresh indicator on Recovery Key page to support drag gestures' (#148) from recovery-keys into master
Reviewed-on: https://git.selfprivacy.org/kherel/selfprivacy.org.app/pulls/148 Reviewed-by: Inex Code <inex.code@selfprivacy.org>
This commit is contained in:
commit
32ca58537e
|
@ -21,6 +21,12 @@ class RecoveryKey extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _RecoveryKeyState extends State<RecoveryKey> {
|
class _RecoveryKeyState extends State<RecoveryKey> {
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
context.read<RecoveryKeyCubit>().load();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(final BuildContext context) {
|
Widget build(final BuildContext context) {
|
||||||
final RecoveryKeyState keyStatus = context.watch<RecoveryKeyCubit>().state;
|
final RecoveryKeyState keyStatus = context.watch<RecoveryKeyCubit>().state;
|
||||||
|
@ -50,12 +56,17 @@ class _RecoveryKeyState extends State<RecoveryKey> {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return BrandHeroScreen(
|
return RefreshIndicator(
|
||||||
heroTitle: 'recovery_key.key_main_header'.tr(),
|
onRefresh: () async {
|
||||||
heroSubtitle: subtitle,
|
context.read<RecoveryKeyCubit>().load();
|
||||||
hasBackButton: true,
|
},
|
||||||
hasFlashButton: false,
|
child: BrandHeroScreen(
|
||||||
children: widgets,
|
heroTitle: 'recovery_key.key_main_header'.tr(),
|
||||||
|
heroSubtitle: subtitle,
|
||||||
|
hasBackButton: true,
|
||||||
|
hasFlashButton: false,
|
||||||
|
children: widgets,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue