changed color theme to be black and added the ability to enter the amount in the recipient’s currency

This commit is contained in:
Arseni
2026-03-02 17:41:41 +03:00
parent 17e08ff26f
commit 6bb3ab5063
41 changed files with 618 additions and 239 deletions

View File

@@ -1,11 +1,15 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:provider/provider.dart';
import 'package:pshared/models/recipient/recipient.dart';
import 'package:pshared/provider/recipient/provider.dart';
import 'package:pweb/app/router/payout_routes.dart';
import 'package:pweb/pages/address_book/page/search.dart';
import 'package:pweb/pages/payout_page/send/widgets/add_recipient_tile.dart';
import 'package:pweb/pages/dashboard/payouts/single/address_book/long_list/widget.dart';
import 'package:pweb/pages/dashboard/payouts/single/address_book/placeholder.dart';
import 'package:pweb/pages/dashboard/payouts/single/address_book/short_list.dart';
@@ -63,6 +67,10 @@ class _AddressBookPayoutState extends State<AddressBookPayout> {
final loc = AppLocalizations.of(context)!;
final provider = context.watch<RecipientsProvider>();
final recipients = provider.recipients;
void onAddRecipient() {
provider.setCurrentObject(null);
context.pushNamed(PayoutRoutes.addRecipient);
}
final filteredRecipients = filterRecipients(
recipients: recipients,
query: _query,
@@ -97,7 +105,12 @@ class _AddressBookPayoutState extends State<AddressBookPayout> {
const SizedBox(height: _spacingBetween),
Expanded(
child: recipients.isEmpty
? AddressBookPlaceholder(text: loc.noRecipientsYet)
? Center(
child: AddRecipientTile(
label: loc.addRecipient,
onTap: onAddRecipient,
),
)
: _isExpanded && filteredRecipients.isEmpty
? AddressBookPlaceholder(text: loc.noRecipientsFound)
: _isExpanded
@@ -108,6 +121,10 @@ class _AddressBookPayoutState extends State<AddressBookPayout> {
: ShortListAddressBookPayout(
recipients: recipients,
onSelected: widget.onSelected,
trailing: AddRecipientTile(
label: loc.addRecipient,
onTap: onAddRecipient,
),
),
),
],