feat: add back button

This commit is contained in:
2026-09-17 23:20:53 +02:00
parent 33d9ae11d8
commit 9aaba69e3c
+14
View File
@@ -19,6 +19,7 @@ class PinEntryView extends StatefulWidget {
final Future<bool> Function(String)? onVerify; final Future<bool> Function(String)? onVerify;
final Future<bool> Function(String)? onSet; final Future<bool> Function(String)? onSet;
final String? Function()? errorMessage; final String? Function()? errorMessage;
final bool showBack;
const PinEntryView({ const PinEntryView({
super.key, super.key,
@@ -28,6 +29,7 @@ class PinEntryView extends StatefulWidget {
this.onVerify, this.onVerify,
this.onSet, this.onSet,
this.errorMessage, this.errorMessage,
this.showBack = false,
}); });
@override @override
@@ -182,6 +184,18 @@ class _PinEntryViewState extends State<PinEntryView> {
padding: const EdgeInsets.symmetric(horizontal: 24), padding: const EdgeInsets.symmetric(horizontal: 24),
child: Column( child: Column(
children: [ children: [
if (widget.showBack) ...[
const Spacer(flex: 1),
Row(
children: [
IconButton(
onPressed: () => {},
icon: const Icon(Icons.close),
tooltip: 'Back',
),
],
),
],
const Spacer(flex: 2), const Spacer(flex: 2),
Icon(Icons.lock_outline_rounded, size: 36, color: scheme.primary), Icon(Icons.lock_outline_rounded, size: 36, color: scheme.primary),
const SizedBox(height: 16), const SizedBox(height: 16),