dev
dart 81 lines 2.51 KB
Raw
1 import 'package:flutter/material.dart';
2 import 'package:cake_wallet/themes/core/material_base_theme.dart';
3
4 class TradeDetailsStandardListCard extends StatelessWidget {
5 TradeDetailsStandardListCard({
6 required this.id,
7 this.extraId,
8 required this.create,
9 required this.pair,
10 required this.onTap,
11 required this.currentTheme,
12 });
13
14 final String id;
15 final String? extraId;
16 final String create;
17 final String pair;
18 final ThemeType currentTheme;
19 final Function onTap;
20
21 @override
22 Widget build(BuildContext context) {
23 return Padding(
24 padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0),
25 child: GestureDetector(
26 onTap: () => onTap(context),
27 child: Container(
28 decoration: BoxDecoration(
29 borderRadius: BorderRadius.circular(15.0),
30 color: Theme.of(context).colorScheme.surfaceContainerHighest,
31 ),
32 child: Padding(
33 padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 16.0),
34 child: Column(
35 mainAxisSize: MainAxisSize.min,
36 crossAxisAlignment: CrossAxisAlignment.start,
37 children: [
38 Text(
39 id,
40 style: Theme.of(context).textTheme.bodyMedium?.copyWith(
41 fontSize: 16,
42 fontWeight: FontWeight.w600,
43 ),
44 ),
45 SizedBox(
46 height: 8,
47 ),
48 if (extraId != null && extraId!.isNotEmpty)
49 Padding(
50 padding: const EdgeInsets.only(bottom: 8.0),
51 child: Text(
52 extraId!,
53 style: Theme.of(context).textTheme.bodyMedium?.copyWith(
54 fontSize: 16,
55 ),
56 ),
57 ),
58 Text(
59 create,
60 style: Theme.of(context).textTheme.bodySmall?.copyWith(
61 color: Theme.of(context).colorScheme.onSurface,
62 ),
63 ),
64 SizedBox(
65 height: 35,
66 ),
67 Text(
68 pair,
69 style: Theme.of(context).textTheme.bodyLarge?.copyWith(
70 fontSize: 24,
71 fontWeight: FontWeight.bold,
72 ),
73 ),
74 ],
75 ),
76 ),
77 ),
78 ),
79 );
80 }
81 }