forked from prajapatihet/donorconnect
-
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.
Merge pull request prajapatihet#108 from singhtrivendra/main
added Screen for the donate button at home page
- Loading branch information
Showing
7 changed files
with
204 additions
and
2 deletions.
There are no files selected for viewing
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,77 @@ | ||
import 'package:donorconnect/Utils/constants/images_string.dart'; | ||
import 'package:donorconnect/views/common_widgets/rounded_conatiner.dart'; | ||
import 'package:donorconnect/views/common_widgets/rounded_image.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:iconsax/iconsax.dart'; | ||
|
||
class TDonateCardHorizontal extends StatelessWidget { | ||
const TDonateCardHorizontal({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
// color: Colors.red, | ||
// decoration: BoxDecoration(border: Border.all(color: Colors.black)), | ||
child: Padding( | ||
padding: EdgeInsets.fromLTRB(10, 20, 10, 360), | ||
child: Card( | ||
clipBehavior: Clip.hardEdge, | ||
child: InkWell( | ||
splashColor: Colors.blue.withAlpha(30), | ||
child: SizedBox( | ||
width: 300, | ||
height: 200, | ||
child:Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
|
||
const Padding( | ||
padding: EdgeInsets.all(15), | ||
child: CircleAvatar(child: Icon(Iconsax.user,size: 30,), | ||
), | ||
), | ||
|
||
const Padding( | ||
padding: EdgeInsets.fromLTRB(5, 5, 50, 0), | ||
child: Text('Oliver James',style: TextStyle(fontSize: 16,fontWeight: FontWeight.bold),)), | ||
const Padding( | ||
padding: EdgeInsets.fromLTRB(5, 5, 50, 0), | ||
child: Text('working Professional 21 year old having problem of low RBC ')), | ||
const Padding( | ||
padding: EdgeInsets.all(10), | ||
child: Chip( | ||
backgroundColor: Color.fromARGB(255, 246, 177, 172), | ||
label: Text('7 min ago',style: TextStyle(color: Color.fromARGB(255, 189, 20, 152)),), | ||
|
||
), | ||
), | ||
|
||
Row( | ||
children: [ | ||
const Icon(Icons.location_pin,size: 40), | ||
SizedBox(width: 10), | ||
const Text('Chandigarh'), | ||
SizedBox(width: 60), | ||
TextButton( | ||
style: ElevatedButton.styleFrom( | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(30), | ||
), | ||
backgroundColor: Theme.of(context).colorScheme.primary, | ||
padding: const EdgeInsets.fromLTRB(30, 10, 30, 15), | ||
), | ||
onPressed: (){}, child: Text(textAlign: TextAlign.right ,'Donate', style: TextStyle( | ||
color: Theme.of(context).colorScheme.onPrimary, | ||
fontWeight: FontWeight.bold, | ||
),)) | ||
], | ||
) | ||
], | ||
) | ||
) | ||
), | ||
), | ||
) | ||
); | ||
} | ||
} |
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,23 @@ | ||
import 'package:donorconnect/views/pages/donate/widgets/donate_screen_tabbar.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class DonateScreen extends StatelessWidget{ | ||
const DonateScreen({super.key}); | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar:AppBar( | ||
title: Center(child: Text('Donate',style: TextStyle( | ||
fontSize: 20, | ||
color: Theme.of(context).colorScheme.onSurface, | ||
fontWeight: FontWeight.bold, | ||
),)), | ||
) , | ||
body: | ||
const DonateScreenTabbar(), | ||
|
||
|
||
); | ||
} | ||
|
||
} |
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,88 @@ | ||
import 'package:donorconnect/Utils/constants/images_string.dart'; | ||
import 'package:donorconnect/views/common_widgets/donate_card.dart'; | ||
import 'package:donorconnect/views/common_widgets/donor_card.dart'; | ||
import 'package:donorconnect/views/common_widgets/rounded_conatiner.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:iconsax/iconsax.dart'; | ||
|
||
import '../../../common_widgets/rounded_image.dart'; | ||
|
||
class DonateScreenTabbar extends StatelessWidget { | ||
const DonateScreenTabbar({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return const TabBarExample(); | ||
} | ||
} | ||
|
||
class TabBarExample extends StatelessWidget { | ||
const TabBarExample({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return const DefaultTabController( | ||
initialIndex: 1, | ||
length: 3, | ||
child: TabBarView( | ||
children: <Widget>[ | ||
NestedTabBar(''), | ||
NestedTabBar(''), | ||
NestedTabBar(''), | ||
], | ||
), | ||
|
||
); | ||
} | ||
} | ||
|
||
class NestedTabBar extends StatefulWidget { | ||
const NestedTabBar(this.outerTab, {super.key}); | ||
|
||
final String outerTab; | ||
|
||
@override | ||
State<NestedTabBar> createState() => _NestedTabBarState(); | ||
} | ||
|
||
class _NestedTabBarState extends State<NestedTabBar> | ||
with TickerProviderStateMixin { | ||
late final TabController _tabController; | ||
|
||
@override | ||
void initState() { | ||
super.initState(); | ||
_tabController = TabController(length: 2, vsync: this); | ||
} | ||
|
||
@override | ||
void dispose() { | ||
_tabController.dispose(); | ||
super.dispose(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
children: <Widget>[ | ||
TabBar.secondary( | ||
controller: _tabController, | ||
tabs: <Widget>[ | ||
Tab(text: 'All'), | ||
Tab(text: 'Urgent'), | ||
], | ||
), | ||
Expanded( | ||
child: TabBarView( | ||
controller: _tabController, | ||
children: <Widget>[ | ||
TDonateCardHorizontal(), | ||
TDonateCardHorizontal(), | ||
|
||
], | ||
), | ||
), | ||
], | ||
); | ||
} | ||
} |
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