From 9aaba69e3c125b50adda4045010f11dae64ffb42 Mon Sep 17 00:00:00 2001 From: Bram Verhulst Date: Thu, 17 Sep 2026 23:20:53 +0200 Subject: [PATCH] feat: add back button --- lib/views/pin_lock_view.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/views/pin_lock_view.dart b/lib/views/pin_lock_view.dart index 68b1c40..1798139 100644 --- a/lib/views/pin_lock_view.dart +++ b/lib/views/pin_lock_view.dart @@ -19,6 +19,7 @@ class PinEntryView extends StatefulWidget { final Future Function(String)? onVerify; final Future Function(String)? onSet; final String? Function()? errorMessage; + final bool showBack; const PinEntryView({ super.key, @@ -28,6 +29,7 @@ class PinEntryView extends StatefulWidget { this.onVerify, this.onSet, this.errorMessage, + this.showBack = false, }); @override @@ -182,6 +184,18 @@ class _PinEntryViewState extends State { padding: const EdgeInsets.symmetric(horizontal: 24), child: Column( children: [ + if (widget.showBack) ...[ + const Spacer(flex: 1), + Row( + children: [ + IconButton( + onPressed: () => {}, + icon: const Icon(Icons.close), + tooltip: 'Back', + ), + ], + ), + ], const Spacer(flex: 2), Icon(Icons.lock_outline_rounded, size: 36, color: scheme.primary), const SizedBox(height: 16),