fix ui issues

fix_login
Mohammad Aljmma 5 years ago
parent 89cfcd3cad
commit 856ab52439

@ -671,4 +671,7 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Drag point to change your age", "en": "Drag point to change your age",
"ar": "اسحب لتغيير عمرك" "ar": "اسحب لتغيير عمرك"
}, },
"Book": {"en": "Book", "ar": "احجز"},
"AppointmentLabel": {"en": "Appointment", "ar": "موعد"},
}; };

@ -393,7 +393,7 @@ class _HomePageState extends State<HomePage> {
.vitalSigns, .vitalSigns,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, bold: true,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
) )
], ],
@ -440,7 +440,7 @@ class _HomePageState extends State<HomePage> {
TranslationBase.of(context).searchMedicine, TranslationBase.of(context).searchMedicine,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, bold: true,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
) )
], ],
@ -480,12 +480,11 @@ class _HomePageState extends State<HomePage> {
fit: BoxFit.contain,)), fit: BoxFit.contain,)),
), ),
SizedBox(height: 15,), SizedBox(height: 15,),
Texts( Texts(
TranslationBase.of(context).onlinePaymentService, TranslationBase.of(context).onlinePaymentService,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, bold: true,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
) )
], ],
@ -641,11 +640,10 @@ class _HomePageState extends State<HomePage> {
Texts( Texts(
TranslationBase.of(context).hMGService, TranslationBase.of(context).hMGService,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.normal, bold: true,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).viewAllHabibMedicalService,
.viewAllHabibMedicalService,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 10, fontSize: 10,
@ -656,7 +654,7 @@ class _HomePageState extends State<HomePage> {
Texts( Texts(
TranslationBase.of(context).viewMore, TranslationBase.of(context).viewMore,
color: Colors.white, color: Colors.white,
//fontWeight: FontWeight.normal, bold: true,
) )
], ],
), ),
@ -671,8 +669,6 @@ class _HomePageState extends State<HomePage> {
DashboardItem( DashboardItem(
opacity:1.0, opacity:1.0,
onTap: () { onTap: () {
// Navigator.push(
// context, FadePage(page: FeedbackHomePage()));
Navigator.push( Navigator.push(
context, FadePage(page: ContactUsPage())); context, FadePage(page: ContactUsPage()));
}, },
@ -685,13 +681,13 @@ class _HomePageState extends State<HomePage> {
Texts( Texts(
TranslationBase.of(context).contactUs, TranslationBase.of(context).contactUs,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.normal, bold: true,
), ),
Texts( Texts(
TranslationBase.of(context).viewAllWaysReachUs, TranslationBase.of(context).viewAllWaysReachUs,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 10, fontSize: SizeConfig.textMultiplier * 1.0 ,
), ),
Expanded( Expanded(
child: Container(), child: Container(),
@ -699,7 +695,7 @@ class _HomePageState extends State<HomePage> {
Texts( Texts(
TranslationBase.of(context).viewMore, TranslationBase.of(context).viewMore,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.normal, bold: true,
) )
], ],
), ),

@ -21,6 +21,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/slide_up_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/slide_up_page.dart';
@ -49,8 +50,10 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
int currentTab = 0; int currentTab = 0;
PageController pageController; PageController pageController;
ProjectViewModel projectProvider; ProjectViewModel projectProvider;
///inject the user data ///inject the user data
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
final authService = new AuthProvider(); final authService = new AuthProvider();
@ -131,7 +134,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
AppGlobal.context = context; AppGlobal.context = context;
}); });
_requestIOSPermissions(); _requestIOSPermissions();
pageController = PageController(keepPage: true); pageController = PageController(keepPage: true);
// _firebaseMessaging.setAutoInitEnabled(true); // _firebaseMessaging.setAutoInitEnabled(true);
// //
// if (Platform.isIOS) { // if (Platform.isIOS) {
@ -149,119 +152,119 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// }); // });
//_firebase Background message handler //_firebase Background message handler
// _firebaseMessaging.configure( // _firebaseMessaging.configure(
// onMessage: (Map<String, dynamic> message) async { // onMessage: (Map<String, dynamic> message) async {
// showDialog("onMessage: $message"); // showDialog("onMessage: $message");
// print("onMessage: $message"); // print("onMessage: $message");
// print(message); // print(message);
// print(message['name']); // print(message['name']);
// print(message['appointmentdate']); // print(message['appointmentdate']);
// //
// if (Platform.isIOS) { // if (Platform.isIOS) {
// if (message['is_call'] == "true") { // if (message['is_call'] == "true") {
// var route = ModalRoute.of(context); // var route = ModalRoute.of(context);
// //
// if (route != null) { // if (route != null) {
// print(route.settings.name); // print(route.settings.name);
// } // }
// //
// Map<String, dynamic> myMap = new Map<String, dynamic>.from(message); // Map<String, dynamic> myMap = new Map<String, dynamic>.from(message);
// print(myMap); // print(myMap);
// LandingPage.isOpenCallPage = true; // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // if (!isPageNavigated) {
// isPageNavigated = true; // isPageNavigated = true;
// Navigator.push( // Navigator.push(
// context, // context,
// MaterialPageRoute( // MaterialPageRoute(
// builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // .then((value) {
// isPageNavigated = false; // isPageNavigated = false;
// }); // });
// } // }
// } else { // } else {
// print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
// } // }
// } else { // } else {
// print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
// } // }
// //
// if (Platform.isAndroid) { // if (Platform.isAndroid) {
// if (message['data'].containsKey("is_call")) { // if (message['data'].containsKey("is_call")) {
// var route = ModalRoute.of(context); // var route = ModalRoute.of(context);
// //
// if (route != null) { // if (route != null) {
// print(route.settings.name); // print(route.settings.name);
// } // }
// //
// Map<String, dynamic> myMap = // Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message['data']); // new Map<String, dynamic>.from(message['data']);
// print(myMap); // print(myMap);
// LandingPage.isOpenCallPage = true; // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // if (!isPageNavigated) {
// isPageNavigated = true; // isPageNavigated = true;
// Navigator.push( // Navigator.push(
// context, // context,
// MaterialPageRoute( // MaterialPageRoute(
// builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // .then((value) {
// isPageNavigated = false; // isPageNavigated = false;
// }); // });
// } // }
// } else { // } else {
// print("Is Call Not Found Android"); // print("Is Call Not Found Android");
// } // }
// } else { // } else {
// print("Is Call Not Found Android"); // print("Is Call Not Found Android");
// } // }
// }, // },
// onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler, // onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
// onLaunch: (Map<String, dynamic> message) async { // onLaunch: (Map<String, dynamic> message) async {
// print("onLaunch: $message"); // print("onLaunch: $message");
// showDialog("onLaunch: $message"); // showDialog("onLaunch: $message");
// }, // },
// onResume: (Map<String, dynamic> message) async { // onResume: (Map<String, dynamic> message) async {
// print("onResume: $message"); // print("onResume: $message");
// print(message); // print(message);
// print(message['name']); // print(message['name']);
// print(message['appointmentdate']); // print(message['appointmentdate']);
// //
// showDialog("onResume: $message"); // showDialog("onResume: $message");
// //
// if (Platform.isIOS) { // if (Platform.isIOS) {
// if (message['is_call'] == "true") { // if (message['is_call'] == "true") {
// var route = ModalRoute.of(context); // var route = ModalRoute.of(context);
// //
// if (route != null) { // if (route != null) {
// print(route.settings.name); // print(route.settings.name);
// } // }
// //
// Map<String, dynamic> myMap = // Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message); // new Map<String, dynamic>.from(message);
// print(myMap); // print(myMap);
// LandingPage.isOpenCallPage = true; // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // if (!isPageNavigated) {
// isPageNavigated = true; // isPageNavigated = true;
// Navigator.push( // Navigator.push(
// context, // context,
// MaterialPageRoute( // MaterialPageRoute(
// builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // .then((value) {
// isPageNavigated = false; // isPageNavigated = false;
// }); // });
// } // }
// } else { // } else {
// print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
// } // }
// } else { // } else {
// print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
// } // }
// }, // },
// ); // );
} }
@ -337,56 +340,63 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// projectProvider = Provider.of(context); // projectProvider = Provider.of(context);
// checkValue(projectProvider); // checkValue(projectProvider);
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
elevation: 0, elevation: 0,
textTheme: TextTheme( textTheme: TextTheme(
headline6: TextStyle(color: Colors.white, fontWeight: FontWeight.bold), headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
title: Texts(getText(currentTab).toUpperCase(),bold: true,color: Colors.white,),
leading: Builder(
builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.menu),
color: Colors.white,
onPressed: () => Scaffold.of(context).openDrawer(),
);
},
),
actions: [
// IconButton(
// iconSize: 70,
// icon: SvgPicture.asset('assets/images/svg/robort_svg.svg',
// height: 100, width: 100, fit: BoxFit.cover),
// onPressed: () {
// triggerRobot();
// } //do something,
// )
],
centerTitle: true,
),
drawer: SafeArea(child: AppDrawer()),
extendBody: true,
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,
children: [
HomePage(
goToMyProfile: () {
_changeCurrentTab(1);
},
),
MedicalProfilePage(),
BookingOptions(),
Container(),
ToDo(),
], // Please do not remove the BookingOptions from this array
), ),
title: Text(getText(currentTab).toUpperCase()), bottomNavigationBar: BottomNavBar(
leading: Builder( changeIndex: _changeCurrentTab,
builder: (BuildContext context) { index: currentTab,
return IconButton(
icon: Icon(Icons.menu),
color: Colors.white,
onPressed: () => Scaffold.of(context).openDrawer(),
);
},
), ),
actions: [ floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
// IconButton( floatingActionButton: currentTab == 0
// iconSize: 70, ? FloatingButton(
// icon: SvgPicture.asset('assets/images/svg/robort_svg.svg', elevation: true,
// height: 100, width: 100, fit: BoxFit.cover), onTap: () {
// onPressed: () { _changeCurrentTab(2);
// triggerRobot(); })
// } //do something, : null);
// )
],
centerTitle: true,
),
drawer: SafeArea(child: AppDrawer()),
extendBody: true,
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,
children: [
HomePage(goToMyProfile: () {_changeCurrentTab(1);},),
MedicalProfilePage(),
BookingOptions(),
Container(),
ToDo(),
], // Please do not remove the BookingOptions from this array
),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab, index: currentTab,),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: currentTab ==0? FloatingButton(
elevation: true,
onTap: () {
_changeCurrentTab(2);
}):null
);
} }
triggerRobot() { triggerRobot() {
@ -405,7 +415,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
return TranslationBase.of(context).mySchedule; return TranslationBase.of(context).mySchedule;
case 4: case 4:
return TranslationBase.of(context).services; return TranslationBase.of(context).services;
} }
} }

@ -728,6 +728,8 @@ class TranslationBase {
String get selectAge => localizedValues['select-age'][locale.languageCode]; String get selectAge => localizedValues['select-age'][locale.languageCode];
String get iAm => localizedValues['i-am'][locale.languageCode]; String get iAm => localizedValues['i-am'][locale.languageCode];
String get yearOld => localizedValues['years-old'][locale.languageCode]; String get yearOld => localizedValues['years-old'][locale.languageCode];
String get book => localizedValues['Book'][locale.languageCode];
String get appointmentLabel => localizedValues['AppointmentLabel'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -67,7 +67,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
if(widget.index != 0) if(widget.index != 0)
BottomNavigationItem( BottomNavigationItem(
icon: EvaIcons.calendar, icon: EvaIcons.calendar,
activeIcon: EvaIcons.calendarOutline, activeIcon: EvaIcons.calendar,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
currentIndex: 2, currentIndex: 2,

@ -1,24 +1,19 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart';
/// Button widget /// FloatingButton widget
/// [label] button label
/// [icon] button icon its optional
/// [onTap] button function /// [onTap] button function
/// [loading] show the progress indicator
/// [elevation] color elevation value /// [elevation] color elevation value
class FloatingButton extends StatefulWidget { class FloatingButton extends StatefulWidget {
FloatingButton( FloatingButton({Key key, this.onTap, this.elevation: true}) : super(key: key);
{Key key,
this.onTap,
this.elevation: true})
: super(key: key);
final VoidCallback onTap; final VoidCallback onTap;
final bool elevation; final bool elevation;
@override @override
_FloatingButtonState createState() => _FloatingButtonState(); _FloatingButtonState createState() => _FloatingButtonState();
} }
@ -54,9 +49,9 @@ class _FloatingButtonState extends State<FloatingButton>
super.dispose(); super.dispose();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return (GestureDetector( return (GestureDetector(
onTapDown: (TapDownDetails tap) { onTapDown: (TapDownDetails tap) {
_animationController.reverse(from: 1.0); _animationController.reverse(from: 1.0);
@ -74,9 +69,9 @@ class _FloatingButtonState extends State<FloatingButton>
child: AnimatedContainer( child: AnimatedContainer(
duration: Duration(milliseconds: 150), duration: Duration(milliseconds: 150),
margin: EdgeInsets.only(bottom: 4), margin: EdgeInsets.only(bottom: 4),
padding: EdgeInsets.symmetric(vertical: 22, horizontal: 22), padding: EdgeInsets.symmetric(vertical: 24, horizontal: 24),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(45.0)), borderRadius: BorderRadius.all(Radius.circular(54.0)),
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
@ -87,29 +82,29 @@ class _FloatingButtonState extends State<FloatingButton>
offset: Offset(0, 7.0), offset: Offset(0, 7.0),
blurRadius: 55.0) blurRadius: 55.0)
]), ]),
child: Column( child: Container(
crossAxisAlignment: CrossAxisAlignment.center, child: Column(
mainAxisAlignment: MainAxisAlignment.center, children: [
mainAxisSize: MainAxisSize.min, Icon(EvaIcons.calendar,color: Colors.white,size: 23,),
children: <Widget>[ Texts(
Container( TranslationBase.of(context).book,
child: Center( bold: !projectViewModel.isArabic,
child: Column( color: Colors.white,
children: [ fontSize: projectViewModel.isArabic ? 8 : 17,
//TODO change the icon
Image.asset("assets/images/blood-drop.png", fit: BoxFit.cover),
Texts('BOOK',bold: true,color: Colors.white,),
Texts('APPPINTEMNT',color: Colors.white,fontSize: 7,),
],
),
), ),
width: 50, Texts(
height: 50, TranslationBase.of(context).appointmentLabel,
decoration: BoxDecoration( bold: projectViewModel.isArabic,
shape: BoxShape.circle, color: Colors.white,
fontSize:projectViewModel.isArabic ? 8.8 : 8,
), ),
) ],
], ),
width: 54,
height: 54,
decoration: BoxDecoration(
shape: BoxShape.circle,
),
), ),
)), )),
)); ));

@ -36,14 +36,7 @@ class MedicalProfileItem extends StatelessWidget {
fontSize: 1.5 * SizeConfig.textMultiplier, fontSize: 1.5 * SizeConfig.textMultiplier,
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
RichText( Texts(subTitle,fontSize: 1.4 * SizeConfig.textMultiplier,),
text: TextSpan(
style: TextStyle(color: Colors.black),
children: [
TextSpan(text: subTitle),
],
),
),
Align( Align(
alignment: Alignment.bottomRight, alignment: Alignment.bottomRight,
child: Image.asset( child: Image.asset(

@ -70,7 +70,7 @@ class AppScaffold extends StatelessWidget {
), ),
title: Texts(authenticatedUserObject.isLogin || !isShowDecPage title: Texts(authenticatedUserObject.isLogin || !isShowDecPage
? appBarTitle.toUpperCase() ? appBarTitle.toUpperCase()
: TranslationBase.of(context).serviceInformationTitle,color: Colors.white,), : TranslationBase.of(context).serviceInformationTitle,color: Colors.white,bold: true,),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return ArrowBack(); return ArrowBack();

Loading…
Cancel
Save