dev
dart 57 lines 2.24 KB
Raw
1 import "package:cake_wallet/generated/i18n.dart";
2 import "package:cake_wallet/new-ui/widgets/new_primary_button.dart";
3 import "package:cake_wallet/new-ui/widgets/receive_page/receive_top_bar.dart";
4 import "package:cake_wallet/src/widgets/base_text_form_field.dart";
5 import "package:flutter/material.dart";
6
7 class MoneroHardwareWalletPassphraseInputModal extends StatelessWidget {
8 const MoneroHardwareWalletPassphraseInputModal({required this.controller, super.key});
9
10 final TextEditingController controller;
11
12 @override
13 Widget build(BuildContext context) => Padding(
14 padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
15 child: Container(
16 decoration: BoxDecoration(
17 borderRadius: const BorderRadius.vertical(top: Radius.circular(18)),
18 color: Theme.of(context).colorScheme.surface,
19 ),
20 child: SafeArea(
21 child: Column(
22 mainAxisSize: MainAxisSize.min,
23 children: [
24 ModalTopBar(
25 title: S.of(context).passphrase_entry,
26 leadingIcon: const Icon(Icons.close),
27 leadingSemanticLabel: S.of(context).close,
28 onLeadingPressed: Navigator.of(context).pop,
29 ),
30 Padding(
31 padding: const EdgeInsets.symmetric(horizontal: 18),
32 child: Column(
33 spacing: 12,
34 children: [
35 BaseTextFormField(
36 controller: controller,
37 hintText: S.of(context).passphrase_raw,
38 autocorrect: false,
39 enableSuggestions: false,
40 ),
41 const SizedBox(),
42 NewPrimaryButton(
43 onPressed: Navigator.of(context).pop,
44 text: S.of(context).restore_next,
45 color: Theme.of(context).colorScheme.primary,
46 textColor: Theme.of(context).colorScheme.onPrimary,
47 ),
48 const SizedBox(),
49 ],
50 ),
51 ),
52 ],
53 ),
54 ),
55 ),
56 );
57 }