@ -42,6 +42,7 @@ class _HomePageState extends State<HomePage> {
onModelReady: ( model ) = > model . getPatientRadOrders ( ) ,
builder: ( _ , model , wi ) = > AppScaffold (
isShowDecPage: false ,
isHelp: true ,
body: Container (
width: double . infinity ,
child: SingleChildScrollView (
@ -69,7 +70,7 @@ class _HomePageState extends State<HomePage> {
right: 5 ,
child: Container (
width:
MediaQuery . of ( context ) . size . width * 0.8 ,
MediaQuery . of ( context ) . size . width * 0.8 ,
child: Row (
children: < Widget > [
Expanded (
@ -84,54 +85,82 @@ class _HomePageState extends State<HomePage> {
fit: BoxFit . fill ,
) ,
color:
Colors . white . withOpacity ( 0.3 ) ,
Colors . white . withOpacity ( 0.3 ) ,
borderRadius: BorderRadius . all (
Radius . circular ( 5 ) ) ) ,
child: Container (
child: Column (
children: < Widget > [
Texts ( TranslationBase . of ( context ) . covidTest ,
color: Colors . white ,
fontWeight: FontWeight . w700 ,
) ,
Texts (
TranslationBase . of ( context )
. covidTest ,
color: Colors . white ,
fontWeight: FontWeight . w700 ,
) ,
Row (
mainAxisAlignment: MainAxisAlignment . spaceAround ,
mainAxisAlignment:
MainAxisAlignment
. spaceAround ,
children: < Widget > [
Container (
margin: EdgeInsets . only (
top: 15.0 , ) ,
top: 15.0 ,
) ,
child: SvgPicture . asset (
' assets/images/new-design/covid-19-car.svg ' ,
width: 45.0 ,
height: 45.0 ) ,
) ,
Container (
margin: EdgeInsets . only ( top: 5.0 ) ,
margin: EdgeInsets . only (
top: 5.0 ) ,
child: Column (
children: < Widget > [
Texts ( TranslationBase . of ( context ) . driveThru ,
fontWeight: FontWeight . w700 ,
color: Colors . white , ) ,
Texts (
TranslationBase . of (
context )
. driveThru ,
fontWeight:
FontWeight . w700 ,
color: Colors . white ,
) ,
ButtonTheme (
shape: RoundedRectangleBorder (
shape:
RoundedRectangleBorder (
borderRadius:
BorderRadius . circular ( 5.0 ) , ) ,
minWidth: MediaQuery . of ( context ) . size . width * 0.15 ,
BorderRadius
. circular (
5.0 ) ,
) ,
minWidth: MediaQuery . of (
context )
. size
. width *
0.15 ,
height: 25.0 ,
child: RaisedButton (
color: Colors . red [ 800 ] ,
textColor: Colors . white ,
disabledTextColor: Colors . white ,
disabledColor: new Color ( 0xFFbcc2c4 ) ,
color: Colors
. red [ 800 ] ,
textColor:
Colors . white ,
disabledTextColor:
Colors . white ,
disabledColor:
new Color (
0xFFbcc2c4 ) ,
onPressed: ( ) {
navigateToCovidDriveThru ( ) ;
} ,
child: Texts (
TranslationBase . of ( context ) . bookNow ,
fontWeight: FontWeight . w700 ,
color: Colors . white ,
) ,
TranslationBase . of (
context )
. bookNow ,
fontWeight:
FontWeight
. w700 ,
color: Colors
. white ,
) ,
) ,
) ,
] ,
@ -172,251 +201,255 @@ class _HomePageState extends State<HomePage> {
] ,
) ,
) ,
Container ( width: double . infinity , height: projectViewModel . isArabic ? 110 : 80 )
Container (
width: double . infinity ,
height: projectViewModel . isArabic ? 110 : 80 )
] ,
) ,
Positioned (
top: 155 ,
left: MediaQuery . of ( context ) . size . width *
( MediaQuery . of ( context ) . orientation = =
Orientation . landscape
Orientation . landscape
? 0.02
: 0.03 ) ,
right: MediaQuery . of ( context ) . size . width *
( MediaQuery . of ( context ) . orientation = =
Orientation . landscape
Orientation . landscape
? 0.02
: 0.03 ) ,
child: ( ! model . isLogin )
? Container (
width: double . infinity ,
height: 125 ,
decoration: BoxDecoration (
color: HexColor ( ' #A59E9E ' ) ,
shape: BoxShape . rectangle ,
border: Border . all (
color: Colors . transparent , width: 0.5 ) ,
borderRadius:
BorderRadius . all ( Radius . circular ( 9 ) ) ,
image: DecorationImage (
image: ExactAssetImage (
' assets/images/bg_graphic.png ' ) ,
fit: BoxFit . cover ) ) ,
child: Container (
margin: EdgeInsets . all ( 5 ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
SizedBox (
height: 2 ,
) ,
Texts (
TranslationBase . of ( context ) . myMedicalFile ,
color: Colors . black87 ,
fontWeight: FontWeight . w700 ,
fontSize: 23 ,
) ,
Texts (
TranslationBase . of ( context )
. myMedicalFileSubTitle ,
color: Colors . black ,
fontSize: 16 ,
) ,
Align (
alignment: projectViewModel . isArabic
? Alignment . bottomLeft
: Alignment . bottomRight ,
child: InkWell (
onTap: ( ) {
widget . goToMyProfile ( ) ;
} ,
child: Container (
margin: EdgeInsets . only ( left: 15 , right: 15 ) ,
width: 90 ,
height: 30 ,
decoration: BoxDecoration (
color: HexColor ( ' #D81A2E ' ) ,
shape: BoxShape . rectangle ,
border: Border . all (
color: Colors . transparent ,
width: 0.5 ) ,
borderRadius: BorderRadius . all (
Radius . circular ( 0 ) ) ,
width: double . infinity ,
height: 125 ,
decoration: BoxDecoration (
color: HexColor ( ' #A59E9E ' ) ,
shape: BoxShape . rectangle ,
border: Border . all (
color: Colors . transparent , width: 0.5 ) ,
borderRadius:
BorderRadius . all ( Radius . circular ( 9 ) ) ,
image: DecorationImage (
image: ExactAssetImage (
' assets/images/bg_graphic.png ' ) ,
fit: BoxFit . cover ) ) ,
child: Container (
margin: EdgeInsets . all ( 5 ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
SizedBox (
height: 2 ,
) ,
child: Center (
child: Texts (
TranslationBase . of ( context ) . viewMore ,
color: Colors . white ,
fontWeight: FontWeight . w700 ,
fontSize: 12 ,
) ,
Texts (
TranslationBase . of ( context ) . myMedicalFile ,
color: Colors . black87 ,
fontWeight: FontWeight . w700 ,
fontSize: 23 ,
) ,
) ,
) ,
)
] ,
) ,
) ,
)
: Container (
width: double . infinity ,
height: projectViewModel . isArabic ? 160 : 130 ,
decoration: BoxDecoration (
color: HexColor ( ' #A59E9E ' ) ,
shape: BoxShape . rectangle ,
border: Border . all (
color: Colors . transparent , width: 0.5 ) ,
borderRadius:
BorderRadius . all ( Radius . circular ( 9 ) ) ,
image: DecorationImage (
image: ExactAssetImage (
' assets/images/bg_graphic.png ' ) ,
fit: BoxFit . cover ) ,
) ,
child: Container (
margin: EdgeInsets . all ( 5 ) ,
child: Column (
children: < Widget > [
Row (
children: < Widget > [
if ( projectViewModel . user ! = null & & model . isLogin )
Expanded (
child: Column (
crossAxisAlignment:
CrossAxisAlignment . start ,
children: < Widget > [
SizedBox (
height: 8 ,
) ,
Texts (
model . user . firstName +
" " +
model . user . lastName ,
color: Colors . grey [ 100 ] ,
bold: true ,
fontSize: 15 ,
) ,
Texts (
' ${ model . user . patientID } ' ,
color: Colors . white ,
fontSize: 14 ,
) ,
SizedBox (
height: 5 ,
Texts (
TranslationBase . of ( context )
. myMedicalFileSubTitle ,
color: Colors . black ,
fontSize: 16 ,
) ,
Align (
alignment: projectViewModel . isArabic
? Alignment . bottomLeft
: Alignment . bottomRight ,
child: InkWell (
onTap: ( ) {
widget . goToMyProfile ( ) ;
} ,
child: Container (
margin: EdgeInsets . only (
left: 15 , right: 15 ) ,
width: 90 ,
height: 30 ,
decoration: BoxDecoration (
color: HexColor ( ' #D81A2E ' ) ,
shape: BoxShape . rectangle ,
border: Border . all (
color: Colors . transparent ,
width: 0.5 ) ,
borderRadius: BorderRadius . all (
Radius . circular ( 0 ) ) ,
) ,
Texts (
' ${ DateUtil . getMonthDayYearDateFormatted ( model . user . dateofBirthDataTime ) } , ${ model . user . genderDescription } ${ model . user . ageDesc } ' ,
color: Colors . grey [ 100 ] ,
fontWeight: FontWeight . normal ,
fontSize: 14 ,
child: Center (
child: Texts (
TranslationBase . of ( context )
. viewMore ,
color: Colors . white ,
fontWeight: FontWeight . w700 ,
fontSize: 12 ,
) ,
) ,
] ,
) ,
) ,
InkWell (
onTap: ( ) {
widget . goToMyProfile ( ) ;
} ,
child: Container (
margin: EdgeInsets . all ( 2 ) ,
width: 90 ,
height: 30 ,
decoration: BoxDecoration (
color: HexColor ( ' #D81A2E ' ) ,
shape: BoxShape . rectangle ,
border: Border . all (
color: Colors . transparent ,
width: 0.5 ) ,
borderRadius: BorderRadius . all (
Radius . circular ( 5 ) ,
) ,
) ,
child: Center (
child: Texts (
TranslationBase . of ( context )
. viewMore ,
color: Colors . white ,
fontSize: 12 ,
) ,
) ,
) ,
)
] ,
)
] ,
) ,
) ,
Row (
children: < Widget > [
Expanded (
child: Row (
)
: Container (
width: double . infinity ,
height: projectViewModel . isArabic ? 160 : 130 ,
decoration: BoxDecoration (
color: HexColor ( ' #A59E9E ' ) ,
shape: BoxShape . rectangle ,
border: Border . all (
color: Colors . transparent , width: 0.5 ) ,
borderRadius:
BorderRadius . all ( Radius . circular ( 9 ) ) ,
image: DecorationImage (
image: ExactAssetImage (
' assets/images/bg_graphic.png ' ) ,
fit: BoxFit . cover ) ,
) ,
child: Container (
margin: EdgeInsets . all ( 5 ) ,
child: Column (
children: < Widget > [
Row (
children: < Widget > [
Image . asset (
' assets/images/height_icon.png ' ,
width: 35 ,
height: 40 ,
) ,
Texts (
" ${ model . heightCm } " ,
color: Colors . white ,
fontSize: 17 ,
if ( projectViewModel . user ! = null & &
model . isLogin )
Expanded (
child: Column (
crossAxisAlignment:
CrossAxisAlignment . start ,
children: < Widget > [
SizedBox (
height: 8 ,
) ,
Texts (
model . user . firstName +
" " +
model . user . lastName ,
color: Colors . grey [ 100 ] ,
bold: true ,
fontSize: 15 ,
) ,
Texts (
' ${ model . user . patientID } ' ,
color: Colors . white ,
fontSize: 14 ,
) ,
SizedBox (
height: 5 ,
) ,
Texts (
' ${ DateUtil . getMonthDayYearDateFormatted ( model . user . dateofBirthDataTime ) } , ${ model . user . genderDescription } ${ model . user . ageDesc } ' ,
color: Colors . grey [ 100 ] ,
fontWeight: FontWeight . normal ,
fontSize: 14 ,
) ,
] ,
) ,
) ,
InkWell (
onTap: ( ) {
widget . goToMyProfile ( ) ;
} ,
child: Container (
margin: EdgeInsets . all ( 2 ) ,
width: 90 ,
height: 30 ,
decoration: BoxDecoration (
color: HexColor ( ' #D81A2E ' ) ,
shape: BoxShape . rectangle ,
border: Border . all (
color: Colors . transparent ,
width: 0.5 ) ,
borderRadius: BorderRadius . all (
Radius . circular ( 5 ) ,
) ,
) ,
child: Center (
child: Texts (
TranslationBase . of ( context )
. viewMore ,
color: Colors . white ,
fontSize: 12 ,
) ,
) ,
) ,
)
] ,
) ,
) ,
SizedBox (
width: 3 ,
) ,
Expanded (
child: Row (
Row (
children: < Widget > [
Image . asset (
' assets/images/weight_icon.png ' ,
width: 25 ,
height: 40 ,
Expanded (
child: Row (
children: < Widget > [
Image . asset (
' assets/images/height_icon.png ' ,
width: 35 ,
height: 40 ,
) ,
Texts (
" ${ model . heightCm } " ,
color: Colors . white ,
fontSize: 17 ,
)
] ,
) ,
) ,
Texts (
' ${ model . weightKg } ' ,
color: Colors . white ,
fontSize: 17
)
] ,
) ,
) ,
SizedBox (
width: 3 ,
) ,
Expanded (
child: Row (
mainAxisAlignment:
MainAxisAlignment . spaceBetween ,
children: < Widget > [
Image . asset (
' assets/images/blood_icon.png ' ,
width: 35 ,
height: 40 ,
SizedBox (
width: 3 ,
) ,
Expanded (
child: Row (
children: < Widget > [
Image . asset (
' assets/images/weight_icon.png ' ,
width: 25 ,
height: 40 ,
) ,
Texts ( ' ${ model . weightKg } ' ,
color: Colors . white ,
fontSize: 17 )
] ,
) ,
) ,
SizedBox (
width: 3 ,
) ,
Expanded (
child: Row (
mainAxisAlignment:
MainAxisAlignment . spaceBetween ,
children: < Widget > [
Image . asset (
' assets/images/blood_icon.png ' ,
width: 35 ,
height: 40 ,
) ,
Texts (
' ${ model . booldType } ' ,
color: Colors . white ,
)
] ,
) ,
) ,
Texts (
' ${ model . booldType } ' ,
color: Colors . white ,
)
] ,
) ,
) ,
] ,
)
] ,
) ,
) ,
) ,
)
] ,
) ,
) ,
) ,
) ,
] ,
) ,
if ( projectViewModel . havePrivilege ( 64 ) | | projectViewModel . havePrivilege ( 65 ) | | projectViewModel . havePrivilege ( 67 ) )
if ( projectViewModel . havePrivilege ( 64 ) | |
projectViewModel . havePrivilege ( 65 ) | |
projectViewModel . havePrivilege ( 67 ) )
Container (
margin: EdgeInsets . only ( left: 15 , right: 15 ) ,
child: Row (
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: < Widget > [
if ( projectViewModel . havePrivilege ( 64 ) )
if ( projectViewModel . havePrivilege ( 64 ) )
DashboardItem (
onTap: ( ) {
Navigator . push (
@ -444,7 +477,8 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign . center ,
color: Colors . white ,
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 ' ,
opacity: 0.5 ,
) ,
if ( projectViewModel . havePrivilege ( 65 ) )
if ( projectViewModel . havePrivilege ( 65 ) )
DashboardItem (
onTap: ( ) = > Navigator . push ( context , FadePage ( page: LandingPagePharmacy ( ) ) ) ,
onTap: ( ) = > Navigator . push (
context , FadePage ( page: LandingPagePharmacy ( ) ) ) ,
child: Center (
child: Padding (
padding: const EdgeInsets . all ( 15.0 ) ,
@ -472,11 +506,13 @@ class _HomePageState extends State<HomePage> {
height: 20 ,
) ,
Texts (
TranslationBase . of ( context ) . onlinePharmacy ,
TranslationBase . of ( context )
. onlinePharmacy ,
textAlign: TextAlign . center ,
color: Colors . white ,
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 ,
imageName: ' al-habib_onlne_pharmacy_bg.png ' ,
) ,
if ( projectViewModel . havePrivilege ( 67 ) )
if ( projectViewModel . havePrivilege ( 67 ) )
DashboardItem (
onTap: ( ) {
onTap: ( ) {
Navigator . push (
context ,
FadePage (
@ -506,14 +542,16 @@ class _HomePageState extends State<HomePage> {
height: 50 ,
) ,
SizedBox (
height: 10 ,
height: 10 ,
) ,
Texts (
TranslationBase . of ( context ) . emergencyService ,
TranslationBase . of ( context )
. emergencyService ,
textAlign: TextAlign . center ,
color: Colors . white ,
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 ) ,
color: Colors . white ,
) ) ,
if ( projectViewModel . havePrivilege ( 60 ) )
if ( projectViewModel . havePrivilege ( 60 ) )
Container (
width: MediaQuery . of ( context ) . size . width * 0.29 ,
child: InkWell (
@ -609,8 +647,8 @@ class _HomePageState extends State<HomePage> {
context ,
FadePage (
page: ErOptions (
isAppbar: true ,
) ) ) ,
isAppbar: true ,
) ) ) ,
child: Center (
child: Padding (
padding: const EdgeInsets . all ( 15.0 ) ,
@ -630,7 +668,8 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign . center ,
color: Colors . black87 ,
bold: false ,
fontSize: SizeConfig . textMultiplier * 1.7 ,
fontSize:
SizeConfig . textMultiplier * 1.7 ,
)
] ,
) ,
@ -757,15 +796,15 @@ class _HomePageState extends State<HomePage> {
class DashboardItem extends StatelessWidget {
const DashboardItem (
{ this . hasBorder = false ,
this . imageName ,
@ required this . child ,
this . onTap ,
Key key ,
this . width ,
this . height ,
this . color ,
this . opacity = 0.4 ,
this . hasColorFilter = true } )
this . imageName ,
@ required this . child ,
this . onTap ,
Key key ,
this . width ,
this . height ,
this . color ,
this . opacity = 0.4 ,
this . hasColorFilter = true } )
: super ( key: key ) ;
final bool hasBorder ;
final String imageName ;
@ -783,14 +822,16 @@ class DashboardItem extends StatelessWidget {
onTap: onTap ,
child: Container (
width: width ! = null ? width : MediaQuery . of ( context ) . size . width * 0.29 ,
height: height ! = null ? height : MediaQuery . of ( context ) . orientation = = Orientation . portrait
? MediaQuery . of ( context ) . size . height * 0.17
: MediaQuery . of ( context ) . size . height * 0.35 ,
height: height ! = null
? height
: MediaQuery . of ( context ) . orientation = = Orientation . portrait
? MediaQuery . of ( context ) . size . height * 0.17
: MediaQuery . of ( context ) . size . height * 0.35 ,
decoration: BoxDecoration (
color: ! hasBorder
? color ! = null
? color
: HexColor ( ' #050705 ' ) . withOpacity ( opacity )
? color
: HexColor ( ' #050705 ' ) . withOpacity ( opacity )
: Colors . white ,
borderRadius: BorderRadius . circular ( 6.0 ) ,
border: hasBorder
@ -798,11 +839,13 @@ class DashboardItem extends StatelessWidget {
: Border . all ( width: 0.0 , color: Colors . transparent ) ,
image: imageName ! = null
? DecorationImage (
image: ExactAssetImage ( ' assets/images/ $ imageName ' ) ,
fit: BoxFit . cover ,
colorFilter: hasColorFilter ? new ColorFilter . mode (
Colors . black . withOpacity ( 0.2 ) , BlendMode . dstIn ) : null ,
)
image: ExactAssetImage ( ' assets/images/ $ imageName ' ) ,
fit: BoxFit . cover ,
colorFilter: hasColorFilter
? new ColorFilter . mode (
Colors . black . withOpacity ( 0.2 ) , BlendMode . dstIn )
: null ,
)
: null ,
) ,
child: Center (