change the home page design

fix_login
Mohammad Aljmma 4 years ago
parent 1cf4797d4f
commit 874de15040

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 644 B

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

@ -409,7 +409,7 @@ const Map<String, Map<String, String>> localizedValues = {
"locationa": {"en": "location:", "ar": "الموقع"},
"ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "},
"requestA": {"en": "Request:", "ar": "اسعاف"},
"MyAppointments": {"en": "My Appointments", "ar": "مواعيدي"},
"MyAppointments": {"en": "Appointments", "ar": "مواعيدي"},
"NoBookedAppointments": {
"en": "No Booked Appointments",
"ar": "لا توجد مواعيد محجوزة"

@ -30,4 +30,10 @@ class DQIcons {
static const IconData thermometer = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_scale = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData parking_icon = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData blood_type_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData height_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData online_payment_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_medicine_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData vital_sign_icon = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_icon = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}

@ -74,13 +74,13 @@ class MyApp extends StatelessWidget {
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent,
primaryColor: Colors.grey,
primaryColor: Color(0xff40ACC9),
bottomSheetTheme: BottomSheetThemeData(
backgroundColor: HexColor('#E0E0E0')),
cursorColor: Colors.grey,
iconTheme: IconThemeData(),
appBarTheme: AppBarTheme(
color: Colors.grey[700],
color: Color(0xff40ACC9),
brightness: Brightness.light,
elevation: 0.0,
actionsIconTheme: IconThemeData(

File diff suppressed because it is too large Load Diff

@ -3,6 +3,7 @@ import 'dart:typed_data';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
@ -18,8 +19,11 @@ import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/slide_up_page.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -29,6 +33,7 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:rxdart/rxdart.dart';
import '../../locator.dart';
import 'home_page.dart';
class LandingPage extends StatefulWidget {
@ -44,6 +49,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
int currentTab = 0;
PageController pageController;
ProjectViewModel projectProvider;
///inject the user data
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
final authService = new AuthProvider();
var event = RobotProvider();
@ -332,8 +340,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
appBar: AppBar(
elevation: 0,
textTheme: TextTheme(
headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
headline6: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
title: Text(getText(currentTab).toUpperCase()),
leading: Builder(
@ -363,21 +370,22 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
physics: NeverScrollableScrollPhysics(),
controller: pageController,
children: [
HomePage(
goToMyProfile: () {
_changeCurrentTab(1);
},
),
HomePage(goToMyProfile: () {_changeCurrentTab(1);},),
MedicalProfilePage(),
MyAdmissionsPage(),
BookingOptions(),
Container(),
ToDo(),
BookingOptions()
], // Please do not remove the BookingOptions from this array
),
bottomNavigationBar: BottomNavBar(
changeIndex: _changeCurrentTab,
index: currentTab,
),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab, index: currentTab,),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: currentTab ==0? FloatingButton(
elevation: true,
onTap: () {
_changeCurrentTab(2);
}):null
);
}
@ -392,11 +400,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
case 1:
return TranslationBase.of(context).medicalProfile;
case 2:
return TranslationBase.of(context).mySchedule;
return TranslationBase.of(context).bookAppo;
case 3:
return TranslationBase.of(context).services;
return TranslationBase.of(context).mySchedule;
case 4:
return TranslationBase.of(context).bookAppo;
return TranslationBase.of(context).services;
}
}

@ -492,6 +492,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
child: Container(),
),
]),
SizedBox(height: MediaQuery.of(context).size.height * 0.12,)
],
),
)

@ -51,26 +51,26 @@ class _BottomNavBarState extends State<BottomNavBar> {
currentIndex: 1,
name: TranslationBase.of(context).medicalProfile,
),
// Expanded(
// child: SizedBox(
// height: 50,
// child: Column(
// mainAxisSize: MainAxisSize.min,
// mainAxisAlignment: MainAxisAlignment.center,
// children: <Widget>[
// SizedBox(height: 22),
// ],
// ),
// ),
// ),
// Added Calendar Icon to access book appointment flow
if(widget.index == 0)
Expanded(
child: SizedBox(
height: 50,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(height: 22),
],
),
),
),
if(widget.index != 0)
BottomNavigationItem(
icon: EvaIcons.calendar,
activeIcon: EvaIcons.calendarOutline,
changeIndex: _changeIndex,
index: _index,
currentIndex: 4,
currentIndex: 2,
name: TranslationBase.of(context).bookAppo,
),
@ -79,7 +79,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
activeIcon: EvaIcons.person,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 2,
currentIndex: 3,
name: TranslationBase.of(context).mySchedule,
),
BottomNavigationItem(
@ -87,7 +87,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
activeIcon: EvaIcons.calendar,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 3,
currentIndex: 4,
name: TranslationBase.of(context).todoList,
)
],

@ -105,7 +105,7 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
: 19),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
color: widget.backgroundColor ?? HexColor('#515b5d'),
color: widget.backgroundColor ?? Theme.of(context).primaryColor,
boxShadow: [
BoxShadow(
color: Color.fromRGBO(

@ -0,0 +1,117 @@
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
/// Button widget
/// [label] button label
/// [icon] button icon its optional
/// [onTap] button function
/// [loading] show the progress indicator
/// [elevation] color elevation value
class FloatingButton extends StatefulWidget {
FloatingButton(
{Key key,
this.onTap,
this.elevation: true})
: super(key: key);
final VoidCallback onTap;
final bool elevation;
@override
_FloatingButtonState createState() => _FloatingButtonState();
}
class _FloatingButtonState extends State<FloatingButton>
with TickerProviderStateMixin {
double _buttonSize = 1.0;
AnimationController _animationController;
Animation _animation;
@override
void initState() {
_animationController = AnimationController(
vsync: this,
lowerBound: 0.7,
upperBound: 1.0,
duration: Duration(milliseconds: 120));
_animation = CurvedAnimation(
parent: _animationController,
curve: Curves.easeOutQuad,
reverseCurve: Curves.easeOutQuad);
_animation.addListener(() {
setState(() {
_buttonSize = _animation.value;
});
});
super.initState();
}
@override
void dispose() {
_animationController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return (GestureDetector(
onTapDown: (TapDownDetails tap) {
_animationController.reverse(from: 1.0);
},
onTapUp: (TapUpDetails tap) {
_animationController.forward();
},
onTapCancel: () {
_animationController.forward();
},
onTap: Feedback.wrapForTap(widget.onTap, context),
behavior: HitTestBehavior.opaque,
child: Transform.scale(
scale: _buttonSize,
child: AnimatedContainer(
duration: Duration(milliseconds: 150),
margin: EdgeInsets.only(bottom: 4),
padding: EdgeInsets.symmetric(vertical: 22, horizontal: 22),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(45.0)),
color: Theme.of(context).primaryColor,
boxShadow: [
BoxShadow(
color: Color.fromRGBO(
120, 71, 80, widget.elevation ? 0.28 : 0.0),
spreadRadius:
_buttonSize < 1.0 ? -(1 - _buttonSize) * 50 : 0.0,
offset: Offset(0, 7.0),
blurRadius: 55.0)
]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
child: Center(
child: Column(
children: [
//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,
height: 50,
decoration: BoxDecoration(
shape: BoxShape.circle,
),
)
],
),
)),
));
}
}

@ -3,6 +3,8 @@ import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dar
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../text.dart';
class MedicalProfileItem extends StatelessWidget {
MedicalProfileItem({
@required this.imagePath,
@ -17,19 +19,23 @@ class MedicalProfileItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
return RoundedContainer(
showBorder: true,
borderWidth: 0,
margin: 4,
height: MediaQuery.of(context).size.height * 0.12,
child: Container(
padding: EdgeInsets.all(5),
//width: MediaQuery.of(context).size.width * 0.25,
// width: MediaQuery.of(context).size.width* 0.40,
padding: EdgeInsets.all(10),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
title,
style: TextStyle(
fontSize: 1.5 * SizeConfig.textMultiplier,
color: HexColor('#B8382C'),
fontWeight: FontWeight.bold),
),
Texts(title,
fontSize: 1.5 * SizeConfig.textMultiplier,
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.bold),
RichText(
text: TextSpan(
style: TextStyle(color: Colors.black),

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -66,7 +67,7 @@ class AppScaffold extends StatelessWidget {
headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
title: Text(authenticatedUserObject.isLogin
title: Texts(authenticatedUserObject.isLogin || !isShowDecPage
? appBarTitle.toUpperCase()
: TranslationBase.of(context).serviceInformationTitle),leading: Builder(
builder: (BuildContext context) {
@ -110,6 +111,6 @@ class AppScaffold extends StatelessWidget {
buildBodyWidget() {
// return body; //Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]);
return Stack(children: <Widget>[body, FloatingSearchButton()]);
return Stack(children: <Widget>[body, /*FloatingSearchButton()*/]);
}
}

Loading…
Cancel
Save