Files
sendico/frontend/pweb/lib/pages/dashboard/buttons/balance/add/card.dart
Stephan D 218c4e20b3
All checks were successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/discovery Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/gateway_mntx Pipeline was successful
ci/woodpecker/push/gateway_chain Pipeline was successful
ci/woodpecker/push/gateway_tgsettle Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
accounts creation
2026-01-23 00:13:43 +01:00

85 lines
2.7 KiB
Dart

import 'package:flutter/material.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:pweb/pages/dashboard/buttons/balance/add/dialog.dart';
import 'package:pweb/pages/dashboard/buttons/balance/config.dart';
import 'package:pweb/generated/i18n/app_localizations.dart';
class AddBalanceCard extends StatelessWidget {
final VoidCallback? onTap;
const AddBalanceCard({super.key, this.onTap});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final colorScheme = theme.colorScheme;
final textTheme = theme.textTheme;
final loc = AppLocalizations.of(context)!;
final borderRadius = BorderRadius.circular(WalletCardConfig.borderRadius);
final subtitle = '${loc.paymentTypeLedger} / ${loc.paymentTypeManagedWallet}';
final effectiveOnTap = onTap ?? () => showAddBalanceDialog(context);
return ClipRRect(
borderRadius: borderRadius,
child: DottedBorder(
options: RoundedRectDottedBorderOptions(
radius: Radius.circular(WalletCardConfig.borderRadius),
dashPattern: const [8, 5],
strokeWidth: 1.6,
color: colorScheme.primary.withAlpha(110),
),
child: Material(
color: colorScheme.primary.withAlpha(14),
child: InkWell(
onTap: effectiveOnTap,
child: SizedBox.expand(
child: Padding(
padding: WalletCardConfig.contentPadding,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: 48,
height: 48,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: colorScheme.primary.withAlpha(28),
),
child: Icon(
Icons.add_rounded,
size: 28,
color: colorScheme.primary,
),
),
const SizedBox(height: 8),
Text(
loc.actionAddNew,
style: textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w700,
),
),
const SizedBox(height: 4),
Text(
subtitle,
textAlign: TextAlign.center,
style: textTheme.bodySmall?.copyWith(
color: colorScheme.onSurfaceVariant,
),
),
],
),
),
),
),
),
),
);
}
}