diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 5365e27e..99d51bf8 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -33,7 +33,9 @@ class _PatientsScreenState extends State { List litems; //******************* List responseModelList; - //List> litems2; + List _locations =['Today','Tomorrow','Next Week']; + int _activeLocation=0; + //******************* @@ -102,6 +104,13 @@ class _PatientsScreenState extends State { Container( //child:litems == null?Column():Column(children: [ child:litems == null?Column():Column(children: [ + //*********change to test screen************* */ + // child:Column(children: [ + 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 { 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 { )); } //************* + 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: [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 { @override Path getClip(Size size) {