feat: add back button
This commit is contained in:
@@ -19,6 +19,7 @@ class PinEntryView extends StatefulWidget {
|
||||
final Future<bool> Function(String)? onVerify;
|
||||
final Future<bool> 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<PinEntryView> {
|
||||
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),
|
||||
|
||||
Reference in New Issue
Block a user