mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-29 06:38:45 +01:00
* fix android CI * feat: add anypay core models, parser and routing engine * feat: add anypay resolver, anypay service and wallet switch service * refactor: route the send page payment flow through anypay service * fix: show message when there's no swap providers for a pair and reset the trade guard on dismissal * refactor: merge the swap from network and send to network decision pages together and clean up anypay widgets * feat: reapply deep links to a currently open send flow and register the solana scheme * feat: add support for zcash address detection to anypay and other minor fixes * refactor: remove trailing icon * feat: hide swap flow for sp and mweb addresses * feat: enhance zcash address detection and deeplink handling * fix: pin bitcoin_base * refactor: Move the anypay decision navigation out of the send page and address minor review comments * refactor: Move the anypay decision navigation out of the send page and address minor review comments * feat: handle exception in switch service and mvoe balance compute to call site * refactor: combine anypay entry points to one and extract selected mode widget --------- Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
75 lines
2.3 KiB
Dart
75 lines
2.3 KiB
Dart
import "package:cake_wallet/generated/i18n.dart";
|
|
import "package:cake_wallet/src/widgets/cake_image_widget.dart";
|
|
import "package:cw_core/currency_for_wallet_type.dart";
|
|
import "package:flutter/material.dart";
|
|
|
|
class RecipientNetworkSelector extends StatelessWidget {
|
|
const RecipientNetworkSelector({
|
|
required this.networkName,
|
|
required this.networkIconPath,
|
|
required this.onTap,
|
|
super.key,
|
|
});
|
|
|
|
final String networkName;
|
|
final String networkIconPath;
|
|
final VoidCallback onTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final colors = Theme.of(context).colorScheme;
|
|
return Semantics(
|
|
button: true,
|
|
label: "${S.of(context).network_prefix_on} $networkName",
|
|
child: GestureDetector(
|
|
onTap: onTap,
|
|
child: ExcludeSemantics(
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Text(
|
|
S.of(context).network_prefix_on,
|
|
style: Theme.of(context)
|
|
.textTheme
|
|
.bodyMedium
|
|
?.copyWith(color: colors.onSurfaceVariant, letterSpacing: -0.07),
|
|
),
|
|
const SizedBox(width: 12),
|
|
CakeImageWidget(
|
|
imageUrl: networkIconPath,
|
|
width: 16,
|
|
height: 16,
|
|
fit: BoxFit.cover,
|
|
color: isMonochromeSymbolIcon(networkIconPath) ? colors.primary : null,
|
|
),
|
|
const SizedBox(width: 8),
|
|
Text(
|
|
networkName,
|
|
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
|
fontWeight: FontWeight.w400,
|
|
letterSpacing: -0.07,
|
|
color: colors.primary,
|
|
),
|
|
),
|
|
const SizedBox(width: 8),
|
|
Container(
|
|
width: 28,
|
|
height: 28,
|
|
decoration: BoxDecoration(
|
|
color: colors.surfaceContainer,
|
|
shape: BoxShape.circle,
|
|
),
|
|
child: Icon(
|
|
Icons.keyboard_arrow_down,
|
|
size: 18,
|
|
color: colors.onSurfaceVariant,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|