fix ui issues

merge-update-with-lab-changes
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();
@ -340,9 +343,10 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
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: Text(getText(currentTab).toUpperCase()), title: Texts(getText(currentTab).toUpperCase(),bold: true,color: Colors.white,),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return IconButton( return IconButton(
@ -370,23 +374,29 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: pageController, controller: pageController,
children: [ children: [
HomePage(goToMyProfile: () {_changeCurrentTab(1);},), HomePage(
goToMyProfile: () {
_changeCurrentTab(1);
},
),
MedicalProfilePage(), MedicalProfilePage(),
BookingOptions(), BookingOptions(),
Container(), Container(),
ToDo(), ToDo(),
], // Please do not remove the BookingOptions from this array ], // Please do not remove the BookingOptions from this array
), ),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab, index: currentTab,), bottomNavigationBar: BottomNavBar(
changeIndex: _changeCurrentTab,
index: currentTab,
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: currentTab ==0? FloatingButton( floatingActionButton: currentTab == 0
? FloatingButton(
elevation: true, elevation: true,
onTap: () { onTap: () {
_changeCurrentTab(2); _changeCurrentTab(2);
}):null })
); : 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,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
child: Center(
child: Column( child: Column(
children: [ children: [
//TODO change the icon Icon(EvaIcons.calendar,color: Colors.white,size: 23,),
Image.asset("assets/images/blood-drop.png", fit: BoxFit.cover), Texts(
Texts('BOOK',bold: true,color: Colors.white,), TranslationBase.of(context).book,
Texts('APPPINTEMNT',color: Colors.white,fontSize: 7,), bold: !projectViewModel.isArabic,
], color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 17,
), ),
Texts(
TranslationBase.of(context).appointmentLabel,
bold: projectViewModel.isArabic,
color: Colors.white,
fontSize:projectViewModel.isArabic ? 8.8 : 8,
), ),
width: 50, ],
height: 50, ),
width: 54,
height: 54,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, 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