47 lines
1.2 KiB
Dart
47 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:pshared/models/ledger/account.dart';
|
|
|
|
import 'package:pweb/pages/payout_page/wallet/ledger/card_body.dart';
|
|
|
|
|
|
class LedgerWalletCard extends StatelessWidget {
|
|
final LedgerAccount account;
|
|
final VoidCallback onTap;
|
|
|
|
const LedgerWalletCard({
|
|
super.key,
|
|
required this.account,
|
|
required this.onTap,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final theme = Theme.of(context);
|
|
|
|
return Card(
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
|
elevation: theme.cardTheme.elevation ?? 4,
|
|
color: theme.colorScheme.onSecondary,
|
|
child: InkWell(
|
|
borderRadius: BorderRadius.circular(12),
|
|
onTap: onTap,
|
|
child: Container(
|
|
padding: const EdgeInsets.only(left: 50, top: 16, bottom: 16),
|
|
child: Row(
|
|
spacing: 3,
|
|
children: [
|
|
const CircleAvatar(
|
|
radius: 24,
|
|
child: Icon(Icons.account_balance, size: 28),
|
|
),
|
|
const SizedBox(width: 16),
|
|
Expanded(child: LedgerCardBody(account: account)),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|