Finish medicine search design

pull/161/head
Elham Rababah 6 years ago
parent 871bd6ab20
commit 0d8455faa7

@ -142,4 +142,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69
COCOAPODS: 1.10.0.beta.1 COCOAPODS: 1.9.3

@ -59,7 +59,7 @@ class BaseAppClient {
body['stamp'] = STAMP; body['stamp'] = STAMP;
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;
body['VersionID'] = VERSION_ID; body['VersionID'] = VERSION_ID;
if (body['Channel'] == null) body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
body['SessionID'] = SESSION_ID; body['SessionID'] = SESSION_ID;
body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP; body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP;
body['PatientOutSA'] = 0; // PATIENT_OUT_SA; body['PatientOutSA'] = 0; // PATIENT_OUT_SA;

@ -2,8 +2,8 @@ const MAX_SMALL_SCREEN = 660;
const ONLY_NUMBERS = "[0-9]"; const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL = 'https://hmgwebservices.com/'; //const BASE_URL = 'https://hmgwebservices.com/';
//const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = const PATIENT_PROGRESS_NOTE_URL =

@ -218,11 +218,11 @@ const Map<String, Map<String, String>> localizedValues = {
'endcall': {'en': 'End Call', 'ar': 'إنهاء المكالمة'}, 'endcall': {'en': 'End Call', 'ar': 'إنهاء المكالمة'},
'transfertoadmin': {'en': 'Transfer to admin', 'ar': 'نقل إلى المسؤول'}, 'transfertoadmin': {'en': 'Transfer to admin', 'ar': 'نقل إلى المسؤول'},
"searchMedicineImageCaption": { "searchMedicineImageCaption": {
'en': 'Type the medicine name to search', 'en': 'Type or speak the medicine name to search',
'ar': 'اكتب اسم الدواء الذي تبحت عنه ' 'ar': ' اكتب أو انطق اسم الدواء للبحث'
}, },
"type": { "type": {
'en': 'Type', 'en': 'Type or Speak',
'ar': 'اكتب اسم الدواء ' 'ar': 'اكتب أو تحدث '
} }
}; };

@ -41,7 +41,7 @@ class _LandingPageState extends State<LandingPage> {
backgroundColor: Hexcolor('#515B5D'), backgroundColor: Hexcolor('#515B5D'),
textTheme: TextTheme( textTheme: TextTheme(
headline6: headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold)), TextStyle(color: Colors.white)),
title: Text(getText(currentTab).toUpperCase()), title: Text(getText(currentTab).toUpperCase()),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {

@ -85,7 +85,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
Column( Column(
children: <Widget>[ children: <Widget>[
Container( Container(
height: 150, height: 140,
color: Hexcolor('#515B5D'), color: Hexcolor('#515B5D'),
width: double.infinity, width: double.infinity,
child: FractionallySizedBox( child: FractionallySizedBox(
@ -101,7 +101,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
children: <Widget>[ children: <Widget>[
AppText( AppText(
"Welcome", "Welcome",
fontSize: SizeConfig.textMultiplier * 2, fontSize: SizeConfig.textMultiplier * 1.7,
color: Colors.white, color: Colors.white,
) )
], ],
@ -130,7 +130,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
: authProvider.doctorProfile : authProvider.doctorProfile
.clinicDescription, .clinicDescription,
fontSize: fontSize:
SizeConfig.textMultiplier * 2, SizeConfig.textMultiplier * 1.7,
color: Colors.white, color: Colors.white,
), ),
alignment: projectsProvider.isArabic alignment: projectsProvider.isArabic
@ -201,14 +201,14 @@ class _DashboardScreenState extends State<DashboardScreen> {
), ),
Container( Container(
color: Colors.white, color: Colors.white,
height: 150, height: 90,
), ),
], ],
), ),
Positioned( Positioned(
right: 0.0, right: 9.0,
left: 0, left: 9,
bottom: 40, bottom: 19,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor("#DED8CF"), color: Hexcolor("#DED8CF"),
@ -376,10 +376,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
) )
]), ]),
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.95, widthFactor: 0.90,
child: Container( child: Container(
color: Colors.white, color: Colors.white,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -544,7 +545,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
width: MediaQuery width: MediaQuery
.of(context) .of(context)
.size .size
.width * 0.45, .width * 0.44,
height: MediaQuery height: MediaQuery
.of(context) .of(context)
.orientation == Orientation.portrait .orientation == Orientation.portrait
@ -598,7 +599,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
width: MediaQuery width: MediaQuery
.of(context) .of(context)
.size .size
.width * 0.45, .width * 0.44,
height: MediaQuery height: MediaQuery
.of(context) .of(context)
.orientation == Orientation.portrait .orientation == Orientation.portrait

@ -90,7 +90,9 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).searchMedicine, appBarTitle: TranslationBase.of(context).searchMedicine,
body: Column( body: FractionallySizedBox(
widthFactor: 0.97,
child: ListView(
children: <Widget>[ children: <Widget>[
Column( Column(
children: <Widget>[ children: <Widget>[
@ -119,12 +121,12 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
) )
], ],
), ),
Padding( SizedBox(height: 15,),
padding: EdgeInsets.only( FractionallySizedBox(
bottom: SizeConfig.heightMultiplier * 1, widthFactor: 0.9,
right: SizeConfig.heightMultiplier * 2, child: Column(
left: SizeConfig.heightMultiplier * 2, children: <Widget>[
top: SizeConfig.heightMultiplier * 3), Container(
child: AppTextFormField( child: AppTextFormField(
hintText: TranslationBase.of(context).searchMedicineNameHere, hintText: TranslationBase.of(context).searchMedicineNameHere,
controller: myController, controller: myController,
@ -147,12 +149,9 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
}), }),
inputFormatter: ONLY_LETTERS), inputFormatter: ONLY_LETTERS),
), ),
SizedBox(height: 15,),
Container( Container(
margin: EdgeInsets.only(
bottom: SizeConfig.heightMultiplier * 1,
right: SizeConfig.heightMultiplier * 2,
left: SizeConfig.heightMultiplier * 2,
top: SizeConfig.heightMultiplier * 1),
child: Wrap( child: Wrap(
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
@ -176,22 +175,17 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
TranslationBase TranslationBase
.of(context) .of(context)
.youCanFind + .youCanFind +
(_medicineProvider.pharmacyItemsList == null _medicineProvider.pharmacyItemsList.length
? " 0 " .toString() +" "+
: _medicineProvider.pharmacyItemsList.length
.toString()) +
TranslationBase TranslationBase
.of(context) .of(context)
.itemsInSearch, .itemsInSearch,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
margin: 5,
), ),
], ],
), ),
), ),
Expanded( Container(
child: Container(
width: SizeConfig.screenWidth * 0.90,
child: !_medicineProvider.isFinished child: !_medicineProvider.isFinished
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: _medicineProvider.hasError : _medicineProvider.hasError
@ -238,8 +232,12 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
}, },
), ),
), ),
],
),
), ),
], ],
),
)); ));
} }

@ -25,14 +25,14 @@ class AppScaffold extends StatelessWidget {
AppGlobal.CONTEX = context; AppGlobal.CONTEX = context;
ProjectProvider projectProvider = Provider.of(context); ProjectProvider projectProvider = Provider.of(context);
return Scaffold( return Scaffold(
backgroundColor: Hexcolor('#F5F5F5'), backgroundColor: Colors.white,
appBar: isShowAppBar appBar: isShowAppBar
? AppBar( ? AppBar(
elevation: 0, elevation: 0,
backgroundColor: Hexcolor('#515B5D'), backgroundColor: Hexcolor('#515B5D'),
textTheme: TextTheme( textTheme: TextTheme(
headline6: TextStyle( headline6: TextStyle(
color: Colors.white, fontWeight: FontWeight.bold)), color: Colors.white)),
title: Text(appBarTitle.toUpperCase()), title: Text(appBarTitle.toUpperCase()),
leading: Builder(builder: (BuildContext context) { leading: Builder(builder: (BuildContext context) {
return IconButton( return IconButton(

Loading…
Cancel
Save