-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb882f7
commit 712ae14
Showing
5 changed files
with
203 additions
and
11 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
lib/features/User-Data-Widgets/sigle_user_data_screen.dart
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:jp_book/features/User-Data-Widgets/single_user_total_widget.dart'; | ||
import 'package:jp_book/widgets/single_entry_widget.dart'; | ||
|
||
class SingleUserDataScreen extends StatelessWidget { | ||
const SingleUserDataScreen({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
body: Column( | ||
children: [ | ||
const SingleUserTotalWidget(), | ||
const SizedBox(height: 7), | ||
const Padding( | ||
padding: EdgeInsets.symmetric(horizontal: 7.0, vertical: 14), | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
children: [ | ||
Icon(Icons.person_off_rounded), | ||
Icon(Icons.currency_rupee_sharp), | ||
Icon(Icons.wechat_sharp), | ||
Icon(Icons.sms_outlined), | ||
], | ||
), | ||
), | ||
Expanded( | ||
child: ListView.builder( | ||
itemCount: 20, | ||
itemBuilder: ((context, index) { | ||
return const SingleEntryWidget( | ||
balance: '79', | ||
description: 'this is the rupees i recieve', | ||
time: '25 Mar 24 05:30 PM', | ||
); | ||
})), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
lib/features/User-Data-Widgets/single_user_total_widget.dart
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class SingleUserTotalWidget extends StatelessWidget { | ||
const SingleUserTotalWidget({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
color: Colors.blue, | ||
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 14), | ||
child: Container( | ||
decoration: BoxDecoration( | ||
color: Colors.white, | ||
borderRadius: BorderRadius.circular(7), | ||
), | ||
padding: const EdgeInsets.symmetric(vertical: 14, horizontal: 14), | ||
child: Column( | ||
children: [ | ||
Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: [ | ||
Text( | ||
'You will get', | ||
style: Theme.of(context).textTheme.titleMedium, | ||
), | ||
Text( | ||
'Rs 79', | ||
style: Theme.of(context) | ||
.textTheme | ||
.titleMedium! | ||
.copyWith(color: Colors.red), | ||
) | ||
], | ||
), | ||
const Divider(color: Colors.grey), | ||
Row( | ||
children: [ | ||
const Icon( | ||
Icons.perm_contact_calendar_outlined, | ||
), | ||
const SizedBox(width: 7), | ||
Text( | ||
'Set Collection reminder', | ||
style: Theme.of(context).textTheme.bodyLarge, | ||
), | ||
const Expanded(child: SizedBox()), | ||
Text( | ||
'SET DATE', | ||
style: Theme.of(context) | ||
.textTheme | ||
.titleSmall! | ||
.copyWith(color: Colors.blue), | ||
), | ||
], | ||
) | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:jp_book/features/User-Data-Widgets/user_total.dart'; | ||
|
||
class HomeScreen extends StatelessWidget { | ||
const HomeScreen({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return const Center( | ||
child: Column( | ||
children: [ | ||
UserTotal(credit: '345', debit: '500'), | ||
Expanded(child: SizedBox()), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class SingleEntryWidget extends StatelessWidget { | ||
final String time; | ||
final String balance; | ||
final String description; | ||
|
||
const SingleEntryWidget({ | ||
super.key, | ||
required this.balance, | ||
required this.description, | ||
required this.time, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
margin: const EdgeInsets.symmetric(horizontal: 11, vertical: 11), | ||
padding: const EdgeInsets.symmetric(vertical: 3.5, horizontal: 14), | ||
decoration: BoxDecoration( | ||
color: Colors.white, | ||
borderRadius: BorderRadius.circular(3), | ||
), | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: [ | ||
Expanded( | ||
flex: 2, | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Text( | ||
time, | ||
style: Theme.of(context).textTheme.bodyLarge, | ||
), | ||
Card( | ||
child: Padding( | ||
padding: const EdgeInsets.all(2), | ||
child: Text( | ||
'Bal. rs $balance', | ||
style: Theme.of(context).textTheme.labelLarge, | ||
), | ||
), | ||
), | ||
Text( | ||
description, | ||
overflow: TextOverflow.ellipsis, | ||
style: Theme.of(context).textTheme.bodySmall, | ||
), | ||
], | ||
), | ||
), | ||
Expanded( | ||
flex: 1, | ||
child: Text( | ||
'Rs 50', | ||
style: Theme.of(context).textTheme.titleSmall, | ||
), | ||
), | ||
Expanded( | ||
flex: 1, | ||
child: Text( | ||
'Rs 16', | ||
style: Theme.of(context).textTheme.titleSmall, | ||
), | ||
) | ||
], | ||
), | ||
); | ||
} | ||
} |