dev
dart 68 lines 2.28 KB
Raw
1 import 'package:cake_wallet/di.dart';
2 import 'package:cake_wallet/src/screens/monero_accounts/monero_account_list_page.dart';
3 import 'package:cake_wallet/utils/show_pop_up.dart';
4 import 'package:flutter/material.dart';
5
6 class HomeScreenAccountWidget extends StatelessWidget {
7 HomeScreenAccountWidget({this.walletName, this.accountName});
8
9 final String? walletName;
10 final String? accountName;
11
12 @override
13 Widget build(BuildContext context) {
14 return GestureDetector(
15 onTap: () async {
16 await showPopUp<void>(context: context, builder: (_) => getIt.get<MoneroAccountListPage>());
17 },
18 behavior: HitTestBehavior.opaque,
19 child: Padding(
20 padding: EdgeInsets.all(25.0),
21 child: Row(
22 mainAxisSize: MainAxisSize.min,
23 mainAxisAlignment: MainAxisAlignment.center,
24 crossAxisAlignment: CrossAxisAlignment.center,
25 children: [
26 Column(
27 mainAxisAlignment: MainAxisAlignment.center,
28 children: [
29 Container(
30 child: Text(
31 walletName ?? '',
32 style: Theme.of(context).textTheme.headlineSmall?.copyWith(
33 fontWeight: FontWeight.bold,
34 color: Theme.of(context).colorScheme.onSurface,
35 ),
36 ),
37 ),
38 SizedBox(
39 height: 5.0,
40 ),
41 Row(
42 children: [
43 Padding(padding: EdgeInsets.only(left: 20)),
44 Container(
45 child: Text(
46 accountName ?? '',
47 style: Theme.of(context).textTheme.bodyMedium?.copyWith(
48 fontWeight: FontWeight.bold,
49 color: Theme.of(context).colorScheme.primary,
50 ),
51 ),
52 ),
53 Container(
54 child: Icon(
55 Icons.keyboard_arrow_down,
56 color: Theme.of(context).colorScheme.primary,
57 ),
58 ),
59 ],
60 ),
61 ],
62 ),
63 ],
64 ),
65 ),
66 );
67 }
68 }