@ -42,6 +42,7 @@ class _HomePageState extends State<HomePage> {
onModelReady: ( model ) = > model . getPatientRadOrders ( ) ,
onModelReady: ( model ) = > model . getPatientRadOrders ( ) ,
builder: ( _ , model , wi ) = > AppScaffold (
builder: ( _ , model , wi ) = > AppScaffold (
isShowDecPage: false ,
isShowDecPage: false ,
isHelp: true ,
body: Container (
body: Container (
width: double . infinity ,
width: double . infinity ,
child: SingleChildScrollView (
child: SingleChildScrollView (
@ -88,49 +89,77 @@ class _HomePageState extends State<HomePage> {
borderRadius: BorderRadius . all (
borderRadius: BorderRadius . all (
Radius . circular ( 5 ) ) ) ,
Radius . circular ( 5 ) ) ) ,
child: Container (
child: Container (
child: Column (
child: Column (
children: < Widget > [
children: < Widget > [
Texts ( TranslationBase . of ( context ) . covidTest ,
Texts (
TranslationBase . of ( context )
. covidTest ,
color: Colors . white ,
color: Colors . white ,
fontWeight: FontWeight . w700 ,
fontWeight: FontWeight . w700 ,
) ,
) ,
Row (
Row (
mainAxisAlignment: MainAxisAlignment . spaceAround ,
mainAxisAlignment:
MainAxisAlignment
. spaceAround ,
children: < Widget > [
children: < Widget > [
Container (
Container (
margin: EdgeInsets . only (
margin: EdgeInsets . only (
top: 15.0 , ) ,
top: 15.0 ,
) ,
child: SvgPicture . asset (
child: SvgPicture . asset (
' assets/images/new-design/covid-19-car.svg ' ,
' assets/images/new-design/covid-19-car.svg ' ,
width: 45.0 ,
width: 45.0 ,
height: 45.0 ) ,
height: 45.0 ) ,
) ,
) ,
Container (
Container (
margin: EdgeInsets . only ( top: 5.0 ) ,
margin: EdgeInsets . only (
top: 5.0 ) ,
child: Column (
child: Column (
children: < Widget > [
children: < Widget > [
Texts ( TranslationBase . of ( context ) . driveThru ,
Texts (
fontWeight: FontWeight . w700 ,
TranslationBase . of (
color: Colors . white , ) ,
context )
. driveThru ,
fontWeight:
FontWeight . w700 ,
color: Colors . white ,
) ,
ButtonTheme (
ButtonTheme (
shape: RoundedRectangleBorder (
shape:
RoundedRectangleBorder (
borderRadius:
borderRadius:
BorderRadius . circular ( 5.0 ) , ) ,
BorderRadius
minWidth: MediaQuery . of ( context ) . size . width * 0.15 ,
. circular (
5.0 ) ,
) ,
minWidth: MediaQuery . of (
context )
. size
. width *
0.15 ,
height: 25.0 ,
height: 25.0 ,
child: RaisedButton (
child: RaisedButton (
color: Colors . red [ 800 ] ,
color: Colors
textColor: Colors . white ,
. red [ 800 ] ,
disabledTextColor: Colors . white ,
textColor:
disabledColor: new Color ( 0xFFbcc2c4 ) ,
Colors . white ,
disabledTextColor:
Colors . white ,
disabledColor:
new Color (
0xFFbcc2c4 ) ,
onPressed: ( ) {
onPressed: ( ) {
navigateToCovidDriveThru ( ) ;
navigateToCovidDriveThru ( ) ;
} ,
} ,
child: Texts (
child: Texts (
TranslationBase . of ( context ) . bookNow ,
TranslationBase . of (
fontWeight: FontWeight . w700 ,
context )
color: Colors . white ,
. bookNow ,
fontWeight:
FontWeight
. w700 ,
color: Colors
. white ,
) ,
) ,
) ,
) ,
) ,
) ,
@ -172,7 +201,9 @@ class _HomePageState extends State<HomePage> {
] ,
] ,
) ,
) ,
) ,
) ,
Container ( width: double . infinity , height: projectViewModel . isArabic ? 110 : 80 )
Container (
width: double . infinity ,
height: projectViewModel . isArabic ? 110 : 80 )
] ,
] ,
) ,
) ,
Positioned (
Positioned (
@ -216,7 +247,6 @@ class _HomePageState extends State<HomePage> {
fontWeight: FontWeight . w700 ,
fontWeight: FontWeight . w700 ,
fontSize: 23 ,
fontSize: 23 ,
) ,
) ,
Texts (
Texts (
TranslationBase . of ( context )
TranslationBase . of ( context )
. myMedicalFileSubTitle ,
. myMedicalFileSubTitle ,
@ -232,7 +262,8 @@ class _HomePageState extends State<HomePage> {
widget . goToMyProfile ( ) ;
widget . goToMyProfile ( ) ;
} ,
} ,
child: Container (
child: Container (
margin: EdgeInsets . only ( left: 15 , right: 15 ) ,
margin: EdgeInsets . only (
left: 15 , right: 15 ) ,
width: 90 ,
width: 90 ,
height: 30 ,
height: 30 ,
decoration: BoxDecoration (
decoration: BoxDecoration (
@ -246,7 +277,8 @@ class _HomePageState extends State<HomePage> {
) ,
) ,
child: Center (
child: Center (
child: Texts (
child: Texts (
TranslationBase . of ( context ) . viewMore ,
TranslationBase . of ( context )
. viewMore ,
color: Colors . white ,
color: Colors . white ,
fontWeight: FontWeight . w700 ,
fontWeight: FontWeight . w700 ,
fontSize: 12 ,
fontSize: 12 ,
@ -261,7 +293,7 @@ class _HomePageState extends State<HomePage> {
)
)
: Container (
: Container (
width: double . infinity ,
width: double . infinity ,
height: projectViewModel . isArabic ? 160 : 130 ,
height: projectViewModel . isArabic ? 160 : 130 ,
decoration: BoxDecoration (
decoration: BoxDecoration (
color: HexColor ( ' #A59E9E ' ) ,
color: HexColor ( ' #A59E9E ' ) ,
shape: BoxShape . rectangle ,
shape: BoxShape . rectangle ,
@ -280,7 +312,8 @@ class _HomePageState extends State<HomePage> {
children: < Widget > [
children: < Widget > [
Row (
Row (
children: < Widget > [
children: < Widget > [
if ( projectViewModel . user ! = null & & model . isLogin )
if ( projectViewModel . user ! = null & &
model . isLogin )
Expanded (
Expanded (
child: Column (
child: Column (
crossAxisAlignment:
crossAxisAlignment:
@ -373,11 +406,9 @@ class _HomePageState extends State<HomePage> {
width: 25 ,
width: 25 ,
height: 40 ,
height: 40 ,
) ,
) ,
Texts (
Texts ( ' ${ model . weightKg } ' ,
' ${ model . weightKg } ' ,
color: Colors . white ,
color: Colors . white ,
fontSize: 17
fontSize: 17 )
)
] ,
] ,
) ,
) ,
) ,
) ,
@ -410,13 +441,15 @@ class _HomePageState extends State<HomePage> {
) ,
) ,
] ,
] ,
) ,
) ,
if ( projectViewModel . havePrivilege ( 64 ) | | projectViewModel . havePrivilege ( 65 ) | | projectViewModel . havePrivilege ( 67 ) )
if ( projectViewModel . havePrivilege ( 64 ) | |
projectViewModel . havePrivilege ( 65 ) | |
projectViewModel . havePrivilege ( 67 ) )
Container (
Container (
margin: EdgeInsets . only ( left: 15 , right: 15 ) ,
margin: EdgeInsets . only ( left: 15 , right: 15 ) ,
child: Row (
child: Row (
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: < Widget > [
children: < Widget > [
if ( projectViewModel . havePrivilege ( 64 ) )
if ( projectViewModel . havePrivilege ( 64 ) )
DashboardItem (
DashboardItem (
onTap: ( ) {
onTap: ( ) {
Navigator . push (
Navigator . push (
@ -444,7 +477,8 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign . center ,
textAlign: TextAlign . center ,
color: Colors . white ,
color: Colors . white ,
fontWeight: FontWeight . w700 ,
fontWeight: FontWeight . w700 ,
fontSize: SizeConfig . textMultiplier * 1.55 ,
fontSize:
SizeConfig . textMultiplier * 1.55 ,
)
)
] ,
] ,
) ,
) ,
@ -454,10 +488,10 @@ class _HomePageState extends State<HomePage> {
imageName: ' home_healthcare_service_bg.png ' ,
imageName: ' home_healthcare_service_bg.png ' ,
opacity: 0.5 ,
opacity: 0.5 ,
) ,
) ,
if ( projectViewModel . havePrivilege ( 65 ) )
if ( projectViewModel . havePrivilege ( 65 ) )
DashboardItem (
DashboardItem (
onTap: ( ) = > Navigator . push ( context , FadePage ( page: LandingPagePharmacy ( ) ) ) ,
onTap: ( ) = > Navigator . push (
context , FadePage ( page: LandingPagePharmacy ( ) ) ) ,
child: Center (
child: Center (
child: Padding (
child: Padding (
padding: const EdgeInsets . all ( 15.0 ) ,
padding: const EdgeInsets . all ( 15.0 ) ,
@ -472,11 +506,13 @@ class _HomePageState extends State<HomePage> {
height: 20 ,
height: 20 ,
) ,
) ,
Texts (
Texts (
TranslationBase . of ( context ) . onlinePharmacy ,
TranslationBase . of ( context )
. onlinePharmacy ,
textAlign: TextAlign . center ,
textAlign: TextAlign . center ,
color: Colors . white ,
color: Colors . white ,
fontWeight: FontWeight . w700 ,
fontWeight: FontWeight . w700 ,
fontSize: SizeConfig . textMultiplier * 1.55 ,
fontSize:
SizeConfig . textMultiplier * 1.55 ,
)
)
] ,
] ,
) ,
) ,
@ -485,9 +521,9 @@ class _HomePageState extends State<HomePage> {
height: MediaQuery . of ( context ) . size . width * 0.4 ,
height: MediaQuery . of ( context ) . size . width * 0.4 ,
imageName: ' al-habib_onlne_pharmacy_bg.png ' ,
imageName: ' al-habib_onlne_pharmacy_bg.png ' ,
) ,
) ,
if ( projectViewModel . havePrivilege ( 67 ) )
if ( projectViewModel . havePrivilege ( 67 ) )
DashboardItem (
DashboardItem (
onTap: ( ) {
onTap: ( ) {
Navigator . push (
Navigator . push (
context ,
context ,
FadePage (
FadePage (
@ -506,14 +542,16 @@ class _HomePageState extends State<HomePage> {
height: 50 ,
height: 50 ,
) ,
) ,
SizedBox (
SizedBox (
height: 10 ,
height: 10 ,
) ,
) ,
Texts (
Texts (
TranslationBase . of ( context ) . emergencyService ,
TranslationBase . of ( context )
. emergencyService ,
textAlign: TextAlign . center ,
textAlign: TextAlign . center ,
color: Colors . white ,
color: Colors . white ,
fontWeight: FontWeight . w700 ,
fontWeight: FontWeight . w700 ,
fontSize: SizeConfig . textMultiplier * 1.55 ,
fontSize:
SizeConfig . textMultiplier * 1.55 ,
)
)
] ,
] ,
) ,
) ,
@ -601,7 +639,7 @@ class _HomePageState extends State<HomePage> {
borderRadius: BorderRadius . circular ( 6.0 ) ,
borderRadius: BorderRadius . circular ( 6.0 ) ,
color: Colors . white ,
color: Colors . white ,
) ) ,
) ) ,
if ( projectViewModel . havePrivilege ( 60 ) )
if ( projectViewModel . havePrivilege ( 60 ) )
Container (
Container (
width: MediaQuery . of ( context ) . size . width * 0.29 ,
width: MediaQuery . of ( context ) . size . width * 0.29 ,
child: InkWell (
child: InkWell (
@ -630,7 +668,8 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign . center ,
textAlign: TextAlign . center ,
color: Colors . black87 ,
color: Colors . black87 ,
bold: false ,
bold: false ,
fontSize: SizeConfig . textMultiplier * 1.7 ,
fontSize:
SizeConfig . textMultiplier * 1.7 ,
)
)
] ,
] ,
) ,
) ,
@ -783,7 +822,9 @@ class DashboardItem extends StatelessWidget {
onTap: onTap ,
onTap: onTap ,
child: Container (
child: Container (
width: width ! = null ? width : MediaQuery . of ( context ) . size . width * 0.29 ,
width: width ! = null ? width : MediaQuery . of ( context ) . size . width * 0.29 ,
height: height ! = null ? height : MediaQuery . of ( context ) . orientation = = Orientation . portrait
height: height ! = null
? height
: MediaQuery . of ( context ) . orientation = = Orientation . portrait
? MediaQuery . of ( context ) . size . height * 0.17
? MediaQuery . of ( context ) . size . height * 0.17
: MediaQuery . of ( context ) . size . height * 0.35 ,
: MediaQuery . of ( context ) . size . height * 0.35 ,
decoration: BoxDecoration (
decoration: BoxDecoration (
@ -800,8 +841,10 @@ class DashboardItem extends StatelessWidget {
? DecorationImage (
? DecorationImage (
image: ExactAssetImage ( ' assets/images/ $ imageName ' ) ,
image: ExactAssetImage ( ' assets/images/ $ imageName ' ) ,
fit: BoxFit . cover ,
fit: BoxFit . cover ,
colorFilter: hasColorFilter ? new ColorFilter . mode (
colorFilter: hasColorFilter
Colors . black . withOpacity ( 0.2 ) , BlendMode . dstIn ) : null ,
? new ColorFilter . mode (
Colors . black . withOpacity ( 0.2 ) , BlendMode . dstIn )
: null ,
)
)
: null ,
: null ,
) ,
) ,