Lock other pages until we have an account

This commit is contained in:
2025-05-04 20:38:20 +02:00
parent cf5dcfbc0f
commit 6390155f30
2 changed files with 70 additions and 43 deletions

View File

@@ -202,7 +202,10 @@ class _AddTransactionWidgetState extends State<AddTransactionWidget> {
);
})
.toList(),
hint: "Beneficiary",
hint: switch (_selectedDirection) {
TransactionDirection.send => "Payee",
TransactionDirection.receive => "Payer",
},
controller: _beneficiaryTextController,
selectedValue: _selectedBeneficiary,
onSuggestionTap: (beneficiary) {
@@ -211,6 +214,30 @@ class _AddTransactionWidgetState extends State<AddTransactionWidget> {
),
),
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: SegmentedButton<TransactionDirection>(
segments: [
ButtonSegment(
value: TransactionDirection.send,
label: Text("Send"),
icon: Icon(Icons.remove),
),
ButtonSegment(
value: TransactionDirection.receive,
label: Text("Receive"),
icon: Icon(Icons.add),
),
],
selected: <TransactionDirection>{_selectedDirection},
multiSelectionEnabled: false,
onSelectionChanged: (selection) {
setState(() => _selectedDirection = selection.first);
},
),
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: TextField(
@@ -274,29 +301,6 @@ class _AddTransactionWidgetState extends State<AddTransactionWidget> {
],
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: SegmentedButton<TransactionDirection>(
segments: [
ButtonSegment(
value: TransactionDirection.send,
label: Text("Send"),
icon: Icon(Icons.remove),
),
ButtonSegment(
value: TransactionDirection.receive,
label: Text("Receive"),
icon: Icon(Icons.add),
),
],
selected: <TransactionDirection>{_selectedDirection},
multiSelectionEnabled: false,
onSelectionChanged: (selection) {
setState(() => _selectedDirection = selection.first);
},
),
),
Align(
alignment: Alignment.centerRight,
child: OutlinedButton(