Skip to content

Commit

Permalink
Update wallet card to use the wallet screen
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedHanafy725 committed Mar 9, 2024
1 parent 4419712 commit cb9f135
Showing 1 changed file with 56 additions and 37 deletions.
93 changes: 56 additions & 37 deletions app/lib/widgets/wallet_card.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:threebotlogin/models/wallet.dart';
import 'package:threebotlogin/screens/wallet_details.dart';

class WalletCardWidget extends StatelessWidget {
const WalletCardWidget({super.key, required this.wallet});
Expand All @@ -8,51 +9,69 @@ class WalletCardWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Card(
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
wallet.name,
style: Theme.of(context).textTheme.titleLarge!.copyWith(
color: Theme.of(context).colorScheme.onSecondaryContainer,
),
),
const SizedBox(height: 10),
Row(
child: InkWell(
onTap: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (context) => WalletDetailsScreen(wallet: wallet),
));
},
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Stellar',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
wallet.name,
style: Theme.of(context).textTheme.titleLarge!.copyWith(
color: Theme.of(context).colorScheme.onSecondaryContainer,
),
),
const Spacer(),
Text(
'${wallet.stellarBalance} TFT',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context).colorScheme.onSecondaryContainer,
),
const SizedBox(height: 10),
Row(
children: [
Text(
'Stellar',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context)
.colorScheme
.onSecondaryContainer,
),
),
const Spacer(),
Text(
'${wallet.stellarBalance} TFT',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context)
.colorScheme
.onSecondaryContainer,
),
),
],
),
Row(
children: [
Text(
'TFChain',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context)
.colorScheme
.onSecondaryContainer,
),
),
const Spacer(),
Text(
'${wallet.tfchainBalance} TFT',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context)
.colorScheme
.onSecondaryContainer,
),
),
],
)
],
),
Row(
children: [
Text(
'TFChain',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context).colorScheme.onSecondaryContainer,
),
),
const Spacer(),
Text(
'${wallet.tfchainBalance} TFT',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context).colorScheme.onSecondaryContainer,
),
),
],
)
]),
),
),
);
}
Expand Down

0 comments on commit cb9f135

Please sign in to comment.