-
Notifications
You must be signed in to change notification settings - Fork 46
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 #85 from singhtrivendra/singhtri/added_new_search_…
…page added the Search Page features
- Loading branch information
Showing
12 changed files
with
440 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "windows-gcc-x86", | ||
"includePath": [ | ||
"${workspaceFolder}/**" | ||
], | ||
"compilerPath": "C:/MinGW/bin/gcc.exe", | ||
"cStandard": "${default}", | ||
"cppStandard": "${default}", | ||
"intelliSenseMode": "windows-gcc-x86", | ||
"compilerArgs": [ | ||
"" | ||
] | ||
} | ||
], | ||
"version": 4 | ||
} |
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,24 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "C/C++ Runner: Debug Session", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"externalConsole": true, | ||
"cwd": "c:/Users/conta/OneDrive/Documents/Desktop/donorconnect/lib/views/pages/search/widgets", | ||
"program": "c:/Users/conta/OneDrive/Documents/Desktop/donorconnect/lib/views/pages/search/widgets/build/Debug/outDebug", | ||
"MIMode": "gdb", | ||
"miDebuggerPath": "gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
] | ||
} | ||
] | ||
} |
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,59 @@ | ||
{ | ||
"C_Cpp_Runner.cCompilerPath": "gcc", | ||
"C_Cpp_Runner.cppCompilerPath": "g++", | ||
"C_Cpp_Runner.debuggerPath": "gdb", | ||
"C_Cpp_Runner.cStandard": "", | ||
"C_Cpp_Runner.cppStandard": "", | ||
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat", | ||
"C_Cpp_Runner.useMsvc": false, | ||
"C_Cpp_Runner.warnings": [ | ||
"-Wall", | ||
"-Wextra", | ||
"-Wpedantic", | ||
"-Wshadow", | ||
"-Wformat=2", | ||
"-Wcast-align", | ||
"-Wconversion", | ||
"-Wsign-conversion", | ||
"-Wnull-dereference" | ||
], | ||
"C_Cpp_Runner.msvcWarnings": [ | ||
"/W4", | ||
"/permissive-", | ||
"/w14242", | ||
"/w14287", | ||
"/w14296", | ||
"/w14311", | ||
"/w14826", | ||
"/w44062", | ||
"/w44242", | ||
"/w14905", | ||
"/w14906", | ||
"/w14263", | ||
"/w44265", | ||
"/w14928" | ||
], | ||
"C_Cpp_Runner.enableWarnings": true, | ||
"C_Cpp_Runner.warningsAsError": false, | ||
"C_Cpp_Runner.compilerArgs": [], | ||
"C_Cpp_Runner.linkerArgs": [], | ||
"C_Cpp_Runner.includePaths": [], | ||
"C_Cpp_Runner.includeSearch": [ | ||
"*", | ||
"**/*" | ||
], | ||
"C_Cpp_Runner.excludeSearch": [ | ||
"**/build", | ||
"**/build/**", | ||
"**/.*", | ||
"**/.*/**", | ||
"**/.vscode", | ||
"**/.vscode/**" | ||
], | ||
"C_Cpp_Runner.useAddressSanitizer": false, | ||
"C_Cpp_Runner.useUndefinedSanitizer": false, | ||
"C_Cpp_Runner.useLeakSanitizer": false, | ||
"C_Cpp_Runner.showCompilationTime": false, | ||
"C_Cpp_Runner.useLinkTimeOptimization": false, | ||
"C_Cpp_Runner.msvcSecureNoWarnings": false | ||
} |
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 |
---|---|---|
|
@@ -95,4 +95,4 @@ class MyApp extends StatelessWidget { | |
), | ||
); | ||
} | ||
} | ||
} |
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
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,87 @@ | ||
import 'package:donorconnect/language/helper/language_extention.dart'; | ||
import 'package:donorconnect/views/common_widgets/home_card.dart'; | ||
import 'package:donorconnect/views/pages/search/widgets/blood_bank_form.dart'; | ||
import 'package:donorconnect/views/pages/search/widgets/blood_donor_form.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:google_fonts/google_fonts.dart'; | ||
class SearchScreen extends StatefulWidget{ | ||
const SearchScreen({super.key}); | ||
|
||
@override | ||
State<SearchScreen> createState() => _SearchScreenState(); | ||
} | ||
|
||
class _SearchScreenState extends State<SearchScreen> { | ||
@override | ||
Widget build(BuildContext context) { | ||
final _text = context.localizedString; | ||
return Scaffold( | ||
appBar: AppBar( | ||
title: Padding( | ||
padding: const EdgeInsets.only( | ||
top: 16.0, | ||
), | ||
child: Text( | ||
_text.locate_nearby_bloodbank, | ||
maxLines: 3, | ||
style: GoogleFonts.montserrat( | ||
fontSize: 20, | ||
fontWeight: FontWeight.w700, | ||
letterSpacing: 1, | ||
), | ||
), | ||
), | ||
|
||
), | ||
body: SingleChildScrollView( | ||
child: Column( | ||
children: [ | ||
Padding( | ||
padding: EdgeInsets.all(30), | ||
child: Container( | ||
height: 50, | ||
width: double.infinity, | ||
decoration: BoxDecoration( | ||
border: Border.all(color: Colors.black),borderRadius: BorderRadius.all(Radius.circular(19)), | ||
), | ||
child: Padding( | ||
padding: EdgeInsets.all(9), | ||
child: Row( | ||
children: [ | ||
Icon(Icons.search, color: Colors.grey), | ||
const SizedBox(width: 20), | ||
Text('Search nearby bloodbanks', style: Theme.of(context).textTheme.bodySmall), | ||
], | ||
), | ||
), | ||
), | ||
), | ||
SizedBox(height: 15), | ||
HomeCard( | ||
title: 'Blood Bank', | ||
description: 'Search near by blood bank', | ||
button: 'Find', | ||
image: 'assets/images/home_image1.png', | ||
onPressed:(){Navigator.push( | ||
context,MaterialPageRoute( | ||
builder: (ctx)=> const BloodBankForm()) | ||
);} , | ||
icon: Icon(Icons.local_hospital),), | ||
SizedBox(height: 15), | ||
HomeCard( | ||
title: 'Blood Donors', | ||
description: 'Find nearby donor if available and acc.to blood type', | ||
button: 'explore', | ||
image: 'assets/images/home_image2.png', | ||
onPressed: (){ | ||
Navigator.push(context, MaterialPageRoute( | ||
builder:(ctx)=>const BloodDonorForm())); | ||
}, | ||
icon: Icon(Icons.bloodtype)) | ||
], | ||
), | ||
), | ||
); | ||
|
||
} | ||
} |
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,139 @@ | ||
import 'package:dropdown_textfield/dropdown_textfield.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/widgets.dart'; | ||
|
||
class BloodBankForm extends StatelessWidget{ | ||
const BloodBankForm({super.key}); | ||
@override | ||
Widget build(BuildContext context) { | ||
|
||
return Scaffold( | ||
|
||
body: | ||
|
||
Container( | ||
height: double.infinity, | ||
width: double.infinity, | ||
decoration: BoxDecoration( | ||
gradient: LinearGradient( | ||
colors: [ | ||
const Color.fromARGB(255, 221, 45, 45).withOpacity(0.6), | ||
const Color.fromARGB(255, 232, 62, 50).withOpacity(0.6), | ||
const Color.fromARGB(255, 240, 62, 39), | ||
const Color.fromARGB(255, 222, 69, 69) | ||
], | ||
begin: Alignment.bottomCenter, | ||
end: Alignment.topCenter, | ||
), | ||
), | ||
|
||
child: Padding( | ||
padding: EdgeInsets.fromLTRB(30, 150, 30, 90), | ||
child: Container( | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.all(Radius.circular(30)), | ||
color:Colors.white | ||
), | ||
child: Padding( | ||
padding: EdgeInsets.all(16.0), | ||
child: Form( | ||
child:Column( | ||
children: [ | ||
Text('Blood Bank',style: TextStyle( | ||
color: Theme.of(context).colorScheme.onSurface, | ||
fontWeight: FontWeight.bold, | ||
fontSize: 30, | ||
), | ||
), | ||
|
||
SizedBox(height: 50,), | ||
const DropdownMenu(dropdownMenuEntries: [ | ||
DropdownMenuEntry(value: '1', label: 'Agra'), | ||
DropdownMenuEntry(value: '2', label: 'Delhi'), | ||
DropdownMenuEntry(value: '3', label: 'Chandigarh'), | ||
DropdownMenuEntry(value: '4', label: 'Banglore'), | ||
DropdownMenuEntry(value: '5', label: 'Pune'), | ||
DropdownMenuEntry(value: '6', label: 'Noida'), | ||
DropdownMenuEntry(value: '7', label: 'Mumbai'), | ||
DropdownMenuEntry(value: '8', label: 'Kolkata'), | ||
|
||
], | ||
width: 600, | ||
|
||
label: Text('Select City'), | ||
), | ||
SizedBox(height: 30,), | ||
const DropdownMenu(dropdownMenuEntries: [ | ||
DropdownMenuEntry(value: '1', label: 'xx'), | ||
DropdownMenuEntry(value: '2', label: 'zx'), | ||
DropdownMenuEntry(value: '3', label: 'xy'), | ||
DropdownMenuEntry(value: '4', label: 'xm'), | ||
DropdownMenuEntry(value: '5', label: 'xk'), | ||
], | ||
width: 600, | ||
|
||
label: Text('Select Taluka/Zila'), | ||
), | ||
SizedBox(height: 30,), | ||
const DropdownMenu(dropdownMenuEntries: [ | ||
DropdownMenuEntry(value: '1', label: 'AIIMS'), | ||
DropdownMenuEntry(value: '2', label: 'City Hospital'), | ||
DropdownMenuEntry(value: '3', label: 'General Hospital'), | ||
DropdownMenuEntry(value: '4', label: 'Trama center'), | ||
|
||
|
||
], | ||
width: 600, | ||
|
||
label: Text('Select Hospital'), | ||
), | ||
|
||
|
||
SizedBox(height: 30,), | ||
|
||
const DropdownMenu(dropdownMenuEntries: [ | ||
DropdownMenuEntry(value: '1', label: 'A'), | ||
DropdownMenuEntry(value: '2', label: 'A+'), | ||
DropdownMenuEntry(value: '3', label: 'AB'), | ||
DropdownMenuEntry(value: '4', label: 'AB+'), | ||
DropdownMenuEntry(value: '5', label: 'B'), | ||
DropdownMenuEntry(value: '6', label: 'B+'), | ||
DropdownMenuEntry(value: '7', label: 'O'), | ||
DropdownMenuEntry(value: '8', label: 'O+'), | ||
], | ||
width: 600, | ||
label: Text('Needed blood group'), | ||
), | ||
SizedBox(height: 30), | ||
|
||
ElevatedButton( | ||
style: ElevatedButton.styleFrom( | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(30), | ||
), | ||
backgroundColor: Theme.of(context).colorScheme.primary, | ||
padding: const EdgeInsets.fromLTRB(112, 10, 140, 15), | ||
), | ||
onPressed: () {}, | ||
child: Text(maxLines: 1, | ||
'Search', | ||
style: TextStyle( | ||
color: Theme.of(context).colorScheme.onPrimary, | ||
fontWeight: FontWeight.bold, | ||
|
||
), | ||
), | ||
|
||
), | ||
] | ||
), | ||
), | ||
), | ||
), | ||
) | ||
) | ||
); | ||
} | ||
|
||
} | ||
|
Oops, something went wrong.