| 1 | import 'package:cake_wallet/utils/address_formatter.dart'; |
| 2 | import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart'; |
| 3 | import 'package:flutter/material.dart'; |
| 4 | import 'package:flutter_mobx/flutter_mobx.dart'; |
| 5 | |
| 6 | class ReceiveAddressWidget extends StatelessWidget { |
| 7 | const ReceiveAddressWidget({super.key, required this.addressListViewModel}); |
| 8 | |
| 9 | final WalletAddressListViewModel addressListViewModel; |
| 10 | |
| 11 | @override |
| 12 | Widget build(BuildContext context) { |
| 13 | return Padding( |
| 14 | padding: const EdgeInsets.symmetric(horizontal: 50.0), |
| 15 | child: Observer( |
| 16 | builder: (_) => AddressFormatter.buildSegmentedAddress( |
| 17 | address: addressListViewModel.uri.address, |
| 18 | walletType: addressListViewModel.type, |
| 19 | textAlign: TextAlign.center, |
| 20 | evenTextStyle: Theme.of(context).textTheme.bodyMedium!.copyWith( |
| 21 | fontSize: 15, |
| 22 | fontWeight: FontWeight.w500, |
| 23 | color: Theme.of(context).colorScheme.onSurface, |
| 24 | fontFamily: "IBM Plex Mono"), |
| 25 | ), |
| 26 | ), |
| 27 | ); |
| 28 | } |
| 29 | } |