From 505b3383ff303bbf16ba30b70926c500b8e9b94a Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Tue, 2 Jun 2020 10:49:44 +0300 Subject: [PATCH] patient screen Modify --- lib/screens/patients/patients_screen.dart | 79 ++++++++++++----------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 87bc84a2..bcdc4218 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -338,14 +338,14 @@ class _PatientsScreenState extends State { ), SizedBox(height: 10.0), Container( - width: SizeConfig.screenWidth * 0.80, + width: SizeConfig.screenWidth * 0.9, child: TextField( controller: _controller, onChanged: (String str) { this.searchData(str); }, decoration: buildInputDecoration( - context, 'Search Patient'), + context, 'Search '), ), ), SizedBox( @@ -385,9 +385,9 @@ class _PatientsScreenState extends State { url + avatarMale, height: - 100.0, + 80.0, width: - 100.0, + 80.0, semanticsLabel: 'Male Logo') ] @@ -402,7 +402,11 @@ class _PatientsScreenState extends State { semanticsLabel: 'Female Logo') ], + ), + SizedBox( + width: 10, + ), Column( crossAxisAlignment: CrossAxisAlignment @@ -412,7 +416,7 @@ class _PatientsScreenState extends State { item.firstName + " " + item.lastName, - fontSize: 2.5 * + fontSize: 2.0 * SizeConfig .textMultiplier, fontWeight: @@ -437,12 +441,10 @@ class _PatientsScreenState extends State { backGroundcolor: Colors.white, ), - SizedBox( - height: 8, - ), - SizedBox( - height: 8, - ), + + // SizedBox( + // height: 8, + // ), AppText( "Age:" + item.age @@ -566,7 +568,7 @@ class _PatientsScreenState extends State { Widget _locationBar(BuildContext _context) { return Container( height: MediaQuery.of(context).size.height * 0.065, - width: SizeConfig.screenWidth * 0.80, + width: SizeConfig.screenWidth * 0.9, decoration: BoxDecoration( color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)), child: Row( @@ -575,30 +577,35 @@ class _PatientsScreenState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: _locations.map((item) { bool _isActive = _locations[_activeLocation] == item ? true : false; - return Column(mainAxisSize: MainAxisSize.min, children: [ + return Column(mainAxisSize: MainAxisSize.min, + children: [ InkWell( - 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), + child: Center( + child: Container( + height: 40, + width: 90, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(50), + color: _isActive ? Hexcolor("#B8382B") : Colors.white, ), - )), + child: Center( + child: Text( + item, + + style: TextStyle( + fontSize: 12, + color: _isActive + ? Colors.white + : Colors.black, //Colors.black, + // backgroundColor:_isActive + // ? Hexcolor("#B8382B") + // : Colors.white,//sideColor, + + fontWeight: FontWeight.bold, + ), + ), + )), + ), onTap: () { print(_locations.indexOf(item)); @@ -606,7 +613,7 @@ class _PatientsScreenState extends State { setState(() { _activeLocation = _locations.indexOf(item); - // sideColor=Colors.redAccent; + }); }), _isActive @@ -616,7 +623,7 @@ class _PatientsScreenState extends State { color: Colors.white), alignment: Alignment.center, height: 3, - width: 80, + width: 90, ) : Container() ]);