Created
January 22, 2025 12:58
-
-
Save Lxxyx/26e8fb3e07a1adada7535e8f1f8ab3c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'My Wallet', | |
debugShowCheckedModeBanner: false, | |
theme: ThemeData( | |
colorSchemeSeed: Colors.blue, | |
), | |
home: const MyWalletPage(), | |
); | |
} | |
} | |
class MyWalletPage extends StatelessWidget { | |
const MyWalletPage({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: const Text('My Wallet'), | |
), | |
body: Padding( | |
padding: const EdgeInsets.all(16.0), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.stretch, | |
children: [ | |
// Card 1: Balance | |
Card( | |
child: Padding( | |
padding: const EdgeInsets.all(16.0), | |
child: Column( | |
children: [ | |
const Text( | |
'Balance:', | |
style: TextStyle(fontSize: 18), | |
), | |
const Text( | |
'\$1,234.56', | |
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), | |
), | |
], | |
), | |
), | |
), | |
const SizedBox(height: 16), | |
// Card 2: Transactions | |
Card( | |
child: Padding( | |
padding: const EdgeInsets.all(16.0), | |
child: Column( | |
children: [ | |
const Text( | |
'Transactions:', | |
style: TextStyle(fontSize: 18), | |
), | |
const ListTile( | |
leading: Icon(Icons.payment), | |
title: Text('Payment to John Doe'), | |
subtitle: Text('Yesterday, 10:45 AM'), | |
trailing: Text('-\$500.00'), | |
), | |
const ListTile( | |
leading: Icon(Icons.receipt), | |
title: Text('Received from Jane Doe'), | |
subtitle: Text('Today, 9:00 AM'), | |
trailing: Text('+\$200.00'), | |
), | |
], | |
), | |
), | |
), | |
const SizedBox(height: 16), | |
// Card 3: Actions | |
Card( | |
child: Padding( | |
padding: const EdgeInsets.all(16.0), | |
child: Row( | |
mainAxisAlignment: MainAxisAlignment.spaceAround, | |
children: [ | |
ElevatedButton( | |
onPressed: () {}, | |
child: const Text('Add Money'), | |
), | |
ElevatedButton( | |
onPressed: () {}, | |
child: const Text('Send Money'), | |
), | |
], | |
), | |
), | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment