New Design from Mahmoud

merge-requests/69/head
Amjad Amireh 6 years ago
parent 425b60405d
commit bb606e6a1d

@ -67,6 +67,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType); sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType);
print('************_selectedType*************');
print('_selectedType${_selectedType}'); print('_selectedType${_selectedType}');
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
@ -74,6 +75,9 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
_patientSearchFormValues.ProjectID = doctorProfile.projectID ;//15 _patientSearchFormValues.ProjectID = doctorProfile.projectID ;//15
_patientSearchFormValues.DoctorID = doctorProfile.doctorID; _patientSearchFormValues.DoctorID = doctorProfile.doctorID;
_patientSearchFormValues.ClinicID = doctorProfile.clinicID; _patientSearchFormValues.ClinicID = doctorProfile.clinicID;
//=====================
// _patientSearchFormValues.
//=====================
print("=============doctorProfile.clinicID="+doctorProfile.clinicID.toString()); print("=============doctorProfile.clinicID="+doctorProfile.clinicID.toString());

@ -14,8 +14,10 @@ import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -40,7 +42,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
List date; List date;
List unfilterDate; List unfilterDate;
Color sideColor = Colors.black;
List<PatiantInformtion> responseModelList; List<PatiantInformtion> responseModelList;
List<PatiantInformtion> responseModelList2; List<PatiantInformtion> responseModelList2;
@ -91,7 +93,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
_isError = false; _isError = false;
} else { } else {
_isError = true; _isError = true;
error = res['ErrorEndUserMessage'] ?? res['ErrorMessage'] ; error = res['ErrorEndUserMessage'] ?? res['ErrorMessage'];
} }
}); });
}).catchError((error) { }).catchError((error) {
@ -276,6 +278,14 @@ class _PatientsScreenState extends State<PatientsScreen> {
return "Old Date"; return "Old Date";
} }
/*
*@author: Amjad Amireh Modified New design
*@Date:21/5/2020
*@param:
*@return:PatientsScreen
*@desc:
*/
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context); PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
@ -333,54 +343,162 @@ class _PatientsScreenState extends State<PatientsScreen> {
context, 'Search Patient'), context, 'Search Patient'),
), ),
), ),
SizedBox(
height: 10.0,
),
Container( Container(
//===============
decoration: BoxDecoration(
color: Color(0Xffffffff),
borderRadius:
BorderRadius.circular(20)),
//================
margin: margin:
EdgeInsets.fromLTRB(15, 0, 15, 0), EdgeInsets.fromLTRB(15, 0, 15, 0),
child: Column( child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
children: responseModelList children: responseModelList
.map((PatiantInformtion item) { .map((PatiantInformtion item) {
return InkWell( return InkWell(
child: CardWithBgWidget( child: CardWithBgWidgetNew(
//CardWithBgWidget(
widget: Column( widget: Column(
children: <Widget>[
Row(
children: <Widget>[
Column(
mainAxisAlignment:
MainAxisAlignment
.start,
children: [
Image.network(
"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png",
height: 100,
width: 100),
],
),
Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment
.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
item.firstName + item.firstName +
" " + " " +
item.lastName + item.lastName,
"- " + fontSize: 2.5 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight
.bold,
backGroundcolor:
Colors.white,
),
SizedBox(
height: 8,
),
AppText(
"File Number:" +
item.patientId item.patientId
.toString(), .toString(),
fontSize: 2.5 * fontSize: 2.0 *
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
fontWeight: fontWeight:
FontWeight.bold, FontWeight
.bold,
backGroundcolor:
Colors.white,
),
SizedBox(
height: 8,
),
SizedBox(
height: 8,
),
AppText(
"Age:" +
item.age
.toString(),
fontSize: 2.0 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight
.bold,
backGroundcolor:
Colors.white,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
SERVICES_PATIANT2[int.parse( SERVICES_PATIANT2[int
.parse(
patientType)] == patientType)] ==
"List_MyOutPatient" "List_MyOutPatient"
? AppText( ? Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: <
Widget>[
Container(
height:
20,
width:
80,
decoration:
BoxDecoration(
borderRadius:
BorderRadius.circular(50),
color:
Hexcolor("#20A169"),
),
child:
AppText(
item.startTime,
color:
Colors.white,
fontSize:
2 * SizeConfig.textMultiplier,
textAlign:
TextAlign.center,
fontWeight:
FontWeight.bold,
),
),
SizedBox(
width:60,
),
Container(
child:
AppText(
convertDateFormat2(item convertDateFormat2(item
.appointmentDate .appointmentDate
.toString()) + .toString()),
" " + fontSize:
"-" + 2.0 * SizeConfig.textMultiplier,
" " + fontWeight:
item.startTime, FontWeight.bold,
fontSize: 2.5 * ),
SizeConfig )
.textMultiplier) ],
)
: AppText( : AppText(
item item.nationalityName,
.nationalityName,
fontSize: 2.5 * fontSize: 2.5 *
SizeConfig SizeConfig
.textMultiplier) .textMultiplier,
),
],
),
],
),
Divider(color: Colors.grey)
], ],
), ),
), ),
@ -416,8 +534,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
borderSide: BorderSide(color: Hexcolor('#CCCCCC')), borderSide: BorderSide(color: Hexcolor('#CCCCCC')),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)), borderRadius: BorderRadius.all(Radius.circular(50.0)),
borderSide: BorderSide(color: Theme.of(context).primaryColor), borderSide: BorderSide(color: Colors.grey), //),
)); ));
} }
@ -426,7 +544,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
height: MediaQuery.of(context).size.height * 0.065, height: MediaQuery.of(context).size.height * 0.065,
width: SizeConfig.screenWidth * 0.80, width: SizeConfig.screenWidth * 0.80,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0Xff59434f), borderRadius: BorderRadius.circular(20)), color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
@ -435,13 +553,28 @@ class _PatientsScreenState extends State<PatientsScreen> {
bool _isActive = _locations[_activeLocation] == item ? true : false; bool _isActive = _locations[_activeLocation] == item ? true : false;
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[ return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
InkWell( InkWell(
child: Container(
height: 40,
width: 80,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50),
color: _isActive ? Hexcolor("#B8382B") : Colors.white,
),
child: Center(
child: Text( child: Text(
item, item,
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
color: Colors.white, color: _isActive
? Colors.white
: Colors.black, //Colors.black,
// backgroundColor:_isActive
// ? Hexcolor("#B8382B")
// : Colors.white,//sideColor,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
)),
onTap: () { onTap: () {
print(_locations.indexOf(item)); print(_locations.indexOf(item));
@ -449,6 +582,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
setState(() { setState(() {
_activeLocation = _locations.indexOf(item); _activeLocation = _locations.indexOf(item);
// sideColor=Colors.redAccent;
}); });
}), }),
_isActive _isActive
@ -456,6 +590,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
color: Colors.white), color: Colors.white),
alignment: Alignment.center,
height: 3, height: 3,
width: 80, width: 80,
) )

@ -21,6 +21,9 @@ class AppScaffold extends StatelessWidget {
Widget body; Widget body;
bool isloading = false; bool isloading = false;
int current; int current;
//======
Color backGroundcolorhex=Colors.teal;//Hexcolor('#88b74093');//Hexcolor('#FCF7F7');
//======
AppScaffold( AppScaffold(
{this.pageOnly, {this.pageOnly,
@ -32,28 +35,30 @@ class AppScaffold extends StatelessWidget {
this.showbg, this.showbg,
this.showCurve, this.showCurve,
this.isloading = false, this.isloading = false,
this.current}); this.current,
this.backGroundcolorhex
});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: backgroundColor:Hexcolor('#F5F5F5'),
(pageOnly == true || showbg == false) ? null : Hexcolor('#FCF7F7'), // (pageOnly == true || showbg == false) ? null : Hexcolor('#FCF7F7'),
appBar: (pageOnly == true || showAppBar == false) appBar: (pageOnly == true || showAppBar == false)
? null ? null
: AppBar( : AppBar(
elevation: 0, elevation: 0,
backgroundColor: Hexcolor('#FFDDD9'), backgroundColor:Hexcolor('#515B5D'), //Hexcolor('#FFDDD9'),
textTheme: TextTheme( textTheme: TextTheme(
title: TextStyle( title: TextStyle(
color: Colors.black, fontWeight: FontWeight.bold)), color: Colors.white, fontWeight: FontWeight.bold)),//Colors.black
title: Text(appBarTitle.toUpperCase()), title: Text(appBarTitle.toUpperCase()),
leading: Builder(builder: (BuildContext context) { leading: Builder(builder: (BuildContext context) {
return IconButton( return IconButton(
icon: showAppDrawer icon: showAppDrawer
? Icon(Icons.menu) ? Icon(Icons.menu)
: Icon(Icons.arrow_back_ios), : Icon(Icons.arrow_back_ios),
color: Colors.black, color: Colors.white,//Colors.black,
onPressed: () => showAppDrawer onPressed: () => showAppDrawer
? Scaffold.of(context).openDrawer() ? Scaffold.of(context).openDrawer()
: Navigator.pop(context), : Navigator.pop(context),
@ -127,7 +132,7 @@ class AppScaffold extends StatelessWidget {
child: Container( child: Container(
height: SizeConfig.realScreenHeight * 0.40, height: SizeConfig.realScreenHeight * 0.40,
decoration: decoration:
BoxDecoration(color: Hexcolor('#FFDDD9')))), BoxDecoration(color: Hexcolor('#F5F5F5')))),//Hexcolor('#FFDDD9')
Positioned( Positioned(
// key: , // key: ,
// top: SizeConfig.realScreenHeight * 0.10, // top: SizeConfig.realScreenHeight * 0.10,

@ -19,6 +19,7 @@ class AppText extends StatefulWidget {
final double marginLeft; final double marginLeft;
final bool visibility; final bool visibility;
final TextAlign textAlign; final TextAlign textAlign;
final Color backGroundcolor;
AppText(this.data, AppText(this.data,
{this.color = Colors.black, {this.color = Colors.black,
@ -31,7 +32,9 @@ class AppText extends StatefulWidget {
this.marginBottom = 0, this.marginBottom = 0,
this.marginLeft = 0, this.marginLeft = 0,
this.visibility = true, this.visibility = true,
this.textAlign}); this.textAlign,
this.backGroundcolor=Colors.white
});
@override @override
_AppTextState createState() => _AppTextState(); _AppTextState createState() => _AppTextState();
@ -57,7 +60,9 @@ class _AppTextState extends State<AppText> {
color: widget.color, color: widget.color,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2), fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2),
fontFamily: widget.fontFamily), fontFamily: widget.fontFamily,
// backgroundColor:widget.backGroundcolor
),
), ),
), ),
); );

@ -0,0 +1,68 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/providers/project_provider.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
/*
*@author: Amjad Amireh Modify for new design created by Mohammad Aljammal
*@Date:Modify date 21/5/2020 Original date 27/4/2020
*@param: Widget
*@return:
*@desc: Card With Bg Widget
*/
class CardWithBgWidgetNew extends StatelessWidget {
final Widget widget;
CardWithBgWidgetNew({@required this.widget});
@override
Widget build(BuildContext context) {
ProjectProvider projectProvider = Provider.of(context);
return Container(
margin: EdgeInsets.symmetric(vertical: 10.0),
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
// border: Border.all(color: Hexcolor('#707070'), width: 2.0),
),
child: Material(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
color: Hexcolor('#FFFFFF'),
child: Stack(
children: [
if (projectProvider.isArabic)
Positioned(
child: Container(
width: 10,
color: Hexcolor('#FFFFFF'),
),
bottom: 0,
top: 0,
right: 0,
)
else
Positioned(
child: Container(
width: 10,
color: Hexcolor('#FFFFFF'),
),
bottom: 0,
top: 0,
left: 0,
),
Container(
padding: EdgeInsets.all(15.0),
margin: EdgeInsets.only(left: 10),
child: widget)
],
),
),
);
}
}
Loading…
Cancel
Save