Add card meta data
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 938 B |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
|
@ -0,0 +1,22 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja_flutter/data/models/gateway_token_model.dart';
|
||||
|
||||
class TokenMeta extends StatelessWidget {
|
||||
const TokenMeta({this.meta});
|
||||
|
||||
final GatewayTokenMetaEntity meta;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/payment_types/${meta.brand}.png',
|
||||
height: 16,
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Text('•••• ${meta.last4} ${meta.expMonth}/${meta.expYear}'),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -14,6 +14,7 @@ import 'package:invoiceninja_flutter/redux/task/task_selectors.dart';
|
|||
import 'package:invoiceninja_flutter/ui/app/FieldGrid.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/entities/entity_list_tile.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/entity_header.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/gateways/token_meta.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/icon_message.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/lists/list_divider.dart';
|
||||
import 'package:invoiceninja_flutter/ui/client/view/client_view_vm.dart';
|
||||
|
|
@ -129,7 +130,14 @@ class ClientOverview extends StatelessWidget {
|
|||
ListTile(
|
||||
title: Text(
|
||||
'${localization.token} › ${gatewayMap[customerReference].gateway.name}'),
|
||||
subtitle: Text(customerReference),
|
||||
subtitle: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: tokenMap[customerReference]
|
||||
.map((token) => TokenMeta(
|
||||
meta: token.meta,
|
||||
))
|
||||
.toList(),
|
||||
),
|
||||
onTap: linkMap.containsKey(customerReference)
|
||||
? () => launch(linkMap[customerReference])
|
||||
: null,
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ flutter:
|
|||
assets:
|
||||
- assets/images/logo.png
|
||||
- assets/images/google-icon.png
|
||||
- assets/images/payment_types/
|
||||
|
||||
fonts:
|
||||
- family: Roboto
|
||||
|
|
|
|||