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);
print('************_selectedType*************');
print('_selectedType${_selectedType}');
String token = await sharedPref.getString(TOKEN);
@ -74,6 +75,9 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
_patientSearchFormValues.ProjectID = doctorProfile.projectID ;//15
_patientSearchFormValues.DoctorID = doctorProfile.doctorID;
_patientSearchFormValues.ClinicID = doctorProfile.clinicID;
//=====================
// _patientSearchFormValues.
//=====================
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/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/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -40,7 +42,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
List date;
List unfilterDate;
Color sideColor = Colors.black;
List<PatiantInformtion> responseModelList;
List<PatiantInformtion> responseModelList2;
@ -91,7 +93,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
_isError = false;
} else {
_isError = true;
error = res['ErrorEndUserMessage'] ?? res['ErrorMessage'] ;
error = res['ErrorEndUserMessage'] ?? res['ErrorMessage'];
}
});
}).catchError((error) {
@ -276,6 +278,14 @@ class _PatientsScreenState extends State<PatientsScreen> {
return "Old Date";
}
/*
*@author: Amjad Amireh Modified New design
*@Date:21/5/2020
*@param:
*@return:PatientsScreen
*@desc:
*/
@override
Widget build(BuildContext context) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
@ -333,54 +343,162 @@ class _PatientsScreenState extends State<PatientsScreen> {
context, 'Search Patient'),
),
),
SizedBox(
height: 10.0,
),
Container(
//===============
decoration: BoxDecoration(
color: Color(0Xffffffff),
borderRadius:
BorderRadius.circular(20)),
//================
margin:
EdgeInsets.fromLTRB(15, 0, 15, 0),
child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
children: responseModelList
.map((PatiantInformtion item) {
return InkWell(
child: CardWithBgWidget(
child: CardWithBgWidgetNew(
//CardWithBgWidget(
widget: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
item.firstName +
" " +
item.lastName +
"- " +
item.patientId
.toString(),
fontSize: 2.5 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight.bold,
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
.start,
children: <Widget>[
AppText(
item.firstName +
" " +
item.lastName,
fontSize: 2.5 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight
.bold,
backGroundcolor:
Colors.white,
),
SizedBox(
height: 8,
),
AppText(
"File Number:" +
item.patientId
.toString(),
fontSize: 2.0 *
SizeConfig
.textMultiplier,
fontWeight:
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(
height: 8,
),
SERVICES_PATIANT2[int
.parse(
patientType)] ==
"List_MyOutPatient"
? 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
.appointmentDate
.toString()),
fontSize:
2.0 * SizeConfig.textMultiplier,
fontWeight:
FontWeight.bold,
),
)
],
)
: AppText(
item.nationalityName,
fontSize: 2.5 *
SizeConfig
.textMultiplier,
),
],
),
],
),
SizedBox(
height: 8,
),
SERVICES_PATIANT2[int.parse(
patientType)] ==
"List_MyOutPatient"
? AppText(
convertDateFormat2(item
.appointmentDate
.toString()) +
" " +
"-" +
" " +
item.startTime,
fontSize: 2.5 *
SizeConfig
.textMultiplier)
: AppText(
item
.nationalityName,
fontSize: 2.5 *
SizeConfig
.textMultiplier)
Divider(color: Colors.grey)
],
),
),
@ -416,8 +534,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
borderSide: BorderSide(color: Hexcolor('#CCCCCC')),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).primaryColor),
borderRadius: BorderRadius.all(Radius.circular(50.0)),
borderSide: BorderSide(color: Colors.grey), //),
));
}
@ -426,7 +544,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
height: MediaQuery.of(context).size.height * 0.065,
width: SizeConfig.screenWidth * 0.80,
decoration: BoxDecoration(
color: Color(0Xff59434f), borderRadius: BorderRadius.circular(20)),
color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
@ -435,13 +553,28 @@ class _PatientsScreenState extends State<PatientsScreen> {
bool _isActive = _locations[_activeLocation] == item ? true : false;
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
InkWell(
child: Text(
item,
style: TextStyle(
fontSize: 15,
color: Colors.white,
fontWeight: FontWeight.bold),
),
child: Container(
height: 40,
width: 80,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50),
color: _isActive ? Hexcolor("#B8382B") : Colors.white,
),
child: Center(
child: Text(
item,
style: TextStyle(
fontSize: 15,
color: _isActive
? Colors.white
: Colors.black, //Colors.black,
// backgroundColor:_isActive
// ? Hexcolor("#B8382B")
// : Colors.white,//sideColor,
fontWeight: FontWeight.bold),
),
)),
onTap: () {
print(_locations.indexOf(item));
@ -449,6 +582,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
setState(() {
_activeLocation = _locations.indexOf(item);
// sideColor=Colors.redAccent;
});
}),
_isActive
@ -456,6 +590,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white),
alignment: Alignment.center,
height: 3,
width: 80,
)

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

@ -19,6 +19,7 @@ class AppText extends StatefulWidget {
final double marginLeft;
final bool visibility;
final TextAlign textAlign;
final Color backGroundcolor;
AppText(this.data,
{this.color = Colors.black,
@ -31,7 +32,9 @@ class AppText extends StatefulWidget {
this.marginBottom = 0,
this.marginLeft = 0,
this.visibility = true,
this.textAlign});
this.textAlign,
this.backGroundcolor=Colors.white
});
@override
_AppTextState createState() => _AppTextState();
@ -57,7 +60,9 @@ class _AppTextState extends State<AppText> {
color: widget.color,
fontWeight: widget.fontWeight,
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