CakeWallet/lib/src/screens/dashboard/widgets/anonpay_transaction_row.dart
Godwin Asuquo 3006679560
Cw 314 trocador receive screen update (#823)
* Change receive screen ui

* Upgrade flutter packages

* revert Upgrade flutter packages

* revert Upgrade flutter packages

* Adjust flow for anon invoice page navigation

* Add receive screen ui

* Implement anonpay invoice

* Add invoice detail to transactions page

* Implement donation link

* Fix transaction filter and details view

* Save donation link

* Fix transaction display issues

* Fix formatting

* Fix merge conflict

* Fix localization

* Fix transaction amount display

* Fix transaction limit for fiat

* Update fix from code review

* Fix issues from code review

* Make amountTo nullable to avoid potential

* Remove encoding for description in donation link

* Remove optional params from request

* Fix QR image version

* Refactor QRCode, fix issues from code review

* Pass version to QRCode full page

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
2023-03-24 17:26:42 +02:00

64 lines
2.2 KiB
Dart

import 'package:flutter/material.dart';
class AnonpayTransactionRow extends StatelessWidget {
AnonpayTransactionRow({
required this.provider,
required this.createdAt,
required this.currency,
required this.onTap,
required this.amount,
});
final VoidCallback? onTap;
final String provider;
final String createdAt;
final String amount;
final String currency;
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Container(
padding: EdgeInsets.fromLTRB(24, 8, 24, 8),
color: Colors.transparent,
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
_getImage(),
SizedBox(width: 12),
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[
Text(provider,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme.headline2!.backgroundColor!)),
Text(amount + ' ' + currency,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme.headline2!.backgroundColor!))
]),
SizedBox(height: 5),
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[
Text(createdAt,
style: TextStyle(
fontSize: 14,
color: Theme.of(context).textTheme.overline!.backgroundColor!))
])
],
))
],
),
));
}
Widget _getImage() => ClipRRect(
borderRadius: BorderRadius.circular(50),
child: Image.asset('assets/images/trocador.png', width: 36, height: 36));
}