dev
dart 86 lines 2.89 KB
Raw
1 import 'package:cake_wallet/anonpay/anonpay_invoice_info.dart';
2 import 'package:cake_wallet/generated/i18n.dart';
3 import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator_icon.dart';
4 import 'package:flutter/material.dart';
5
6 class AnonInvoiceStatusSection extends StatelessWidget {
7 const AnonInvoiceStatusSection({
8 super.key,
9 required this.invoiceInfo,
10 });
11
12 final AnonpayInvoiceInfo invoiceInfo;
13
14 @override
15 Widget build(BuildContext context) {
16 return Container(
17 width: 200,
18 padding: EdgeInsets.all(19),
19 decoration: BoxDecoration(
20 color: Theme.of(context).colorScheme.surface,
21 borderRadius: BorderRadius.circular(30),
22 ),
23 child: Column(
24 children: [
25 Row(
26 mainAxisAlignment: MainAxisAlignment.spaceBetween,
27 children: [
28 Text(
29 S.current.status,
30 style: Theme.of(context).textTheme.bodyMedium?.copyWith(
31 fontWeight: FontWeight.w500,
32 color: Theme.of(context).colorScheme.onSurfaceVariant,
33 ),
34 ),
35 Container(
36 padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
37 decoration: BoxDecoration(
38 color: Theme.of(context).colorScheme.secondaryContainer,
39 borderRadius: BorderRadius.circular(10),
40 ),
41 child: Row(
42 mainAxisSize: MainAxisSize.min,
43 children: [
44 SyncIndicatorIcon(
45 boolMode: false,
46 value: invoiceInfo.status,
47 size: 6,
48 ),
49 SizedBox(width: 5),
50 Text(
51 invoiceInfo.status,
52 style: Theme.of(context).textTheme.bodySmall?.copyWith(
53 fontWeight: FontWeight.w600,
54 color: Theme.of(context).colorScheme.onSecondaryContainer,
55 ),
56 ),
57 ],
58 ),
59 ),
60 ],
61 ),
62 SizedBox(height: 27),
63 Row(
64 mainAxisAlignment: MainAxisAlignment.spaceBetween,
65 children: [
66 Text(
67 'ID',
68 style: Theme.of(context).textTheme.bodyMedium?.copyWith(
69 fontWeight: FontWeight.w500,
70 color: Theme.of(context).colorScheme.onSurfaceVariant,
71 ),
72 ),
73 Text(
74 invoiceInfo.invoiceId,
75 style: Theme.of(context).textTheme.bodySmall?.copyWith(
76 fontWeight: FontWeight.w600,
77 color: Theme.of(context).colorScheme.onSurface,
78 ),
79 ),
80 ],
81 ),
82 ],
83 ),
84 );
85 }
86 }