patient screen header

merge-requests/34/head
Amjad Amireh 5 years ago
parent d7b7cc998e
commit 35412fb0a5

@ -33,7 +33,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
List<dynamic> litems;
//*******************
List<PatiantInformtion> responseModelList;
//List<PatiantInformtion<dynamic>> litems2;
List<String> _locations =['Today','Tomorrow','Next Week'];
int _activeLocation=0;
//*******************
@ -102,6 +104,13 @@ class _PatientsScreenState extends State<PatientsScreen> {
Container(
//child:litems == null?Column():Column(children: <Widget>[
child:litems == null?Column():Column(children: <Widget>[
//*********change to test screen************* */
// child:Column(children: <Widget>[
Padding(padding:
EdgeInsets.only(top:MediaQuery.of(context).size.height*0.03),
child:_locationBar(context),),
SizedBox(height: 10.0),
Container(
width: SizeConfig.screenWidth * 0.80,
child: TextField(
@ -123,7 +132,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
line1Text:item.nationalityName,//item['FirstName'],//patient.getFirstName(),//item['FirstName'],
line2Text:item.lastName, //responseModelList['LastName'],//item['LastName'],//'12/04/2020 - 02:00 PM',
line3Text: item.middleName,
heightPercentage: 0.15,
heightPercentage: MediaQuery.of(context).size.height*0.00025,
widthPercentage: 0.80),
onTap: (){
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {"patient": responseModelList});
@ -163,10 +172,50 @@ class _PatientsScreenState extends State<PatientsScreen> {
));
}
//*************
Widget _locationBar(BuildContext _context){
//*********
//*********
return Container(
height: MediaQuery.of(context).size.height*0.065,
width:SizeConfig.screenWidth * 0.80,
decoration: BoxDecoration(
color:Color(0Xff59434f),//Color.fromARGB(89, 67, 79,0),
borderRadius: BorderRadius.circular(20)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _locations.map((l){
bool _isActive=_locations[_activeLocation]==l ? true : false ;
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[InkWell(child:Text(l ,
style:TextStyle(fontSize: 15,color:Colors.white,fontWeight:FontWeight.bold),
),
onTap: () {
print(l);
print(_locations.indexOf(l));
setState(() {
_activeLocation=_locations.indexOf(l);
});
}
),
_isActive? Container(
decoration: BoxDecoration(borderRadius: BorderRadius.circular(10),
color: Colors.white),
height: 3,
width: 80,
):Container()
]);
}).toList(),
));
}
}
//***********************
//************************************
class CustomShapeClipper extends CustomClipper<Path> {
@override
Path getClip(Size size) {

Loading…
Cancel
Save