@ -1,8 +1,7 @@
import ' package:diplomaticquarterapp/core/viewModels/project_view_model.dart ' ;
import ' package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart ' ;
import ' package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart ' ;
import ' package:diplomaticquarterapp/uitl/location_util.dart ' ;
import ' package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart ' ;
import ' package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart ' ;
import ' package:diplomaticquarterapp/widgets/transitions/fade_page.dart ' ;
import ' package:flutter/material.dart ' ;
@ -37,7 +36,7 @@ class _ErOptionsState extends State<ErOptions> {
@ override
Widget build ( BuildContext context ) {
projectViewModel = Provider . of < ProjectViewModel > ( context ) ;
final rrtLocked = ! projectViewModel . havePrivilege ( 68 ) ;
final rrtLocked = projectViewModel . havePrivilege ( 68 ) ;
return AppScaffold (
isShowAppBar: widget . isAppbar ,
@ -47,129 +46,58 @@ class _ErOptionsState extends State<ErOptions> {
showNewAppBarTitle: true ,
backgroundColor: Color ( 0xffF8F8F8 ) ,
body: GridView (
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount ( crossAxisCount: 2, crossAxisSpacing: 13 , mainAxisSpacing: 9 ) ,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount ( crossAxisCount: 3, childAspectRatio: 2 / 2 , crossAxisSpacing: 12 , mainAxisSpacing: 12 ) ,
physics: NeverScrollableScrollPhysics ( ) ,
padding: EdgeInsets . all ( 21 ) ,
shrinkWrap: true ,
children: [
CardCommonEr (
image: ' assets/images/new-design/AM.PNG ' ,
text: TranslationBase . of ( context ) . ambulancerequest ,
subText: TranslationBase . of ( context ) . requestA ,
InkWell (
onTap: ( ) {
Navigator . push ( context , FadePage ( page: AmbulanceReq ( ) ) ) ;
} ,
child: MedicalProfileItem (
title: TranslationBase . of ( context ) . ambulancerequest ,
imagePath: ' assets/images/new-design/AM.PNG ' ,
subTitle: TranslationBase . of ( context ) . requestA ,
isPngImage: true ,
) ,
) ,
InkWell (
onTap: ( ) {
Navigator . push ( context , FadePage ( page: NearestEr ( ) ) ) ;
} ,
child: MedicalProfileItem (
title: TranslationBase . of ( context ) . nearester ,
imagePath: ' assets/images/new-design/emergency_icon.png ' ,
subTitle: TranslationBase . of ( context ) . locationa ,
isPngImage: true ,
) ,
) ,
CardCommonEr (
image: ' assets/images/new-design/emergency_icon.png ' ,
text: TranslationBase . of ( context ) . nearester ,
subText: TranslationBase . of ( context ) . locationa ,
onTap: ( ) {
Navigator . push ( context , FadePage ( page: NearestEr ( ) ) ) ;
} ) ,
CardCommonEr (
image: ' assets/images/new-design/AM.PNG ' ,
text: ' ED service ' ,
subText: ' ED service ' ,
InkWell (
onTap: ( ) {
Navigator . push ( context , FadePage ( page: DdServicesPage ( ) ) ) ;
} ,
child: MedicalProfileItem (
title: " ED " ,
imagePath: ' assets/images/new-design/AM.PNG ' ,
subTitle: TranslationBase . of ( context ) . service ,
isPngImage: true ,
) ,
) ,
InkWell (
onTap: ( ) {
Navigator . push ( context , FadePage ( page: RRTMainScreen ( ) ) ) ;
} ,
child: MedicalProfileItem (
title: TranslationBase . of ( context ) . rrtService ,
imagePath: ' assets/images/new-design/AM.PNG ' ,
subTitle: TranslationBase . of ( context ) . service ,
isPngImage: true ,
isEnable: rrtLocked ,
) ,
) ,
CardCommonEr (
locked: rrtLocked ,
image: ' assets/images/new-design/AM.PNG ' ,
text: TranslationBase . of ( context ) . rrtService ,
subText: TranslationBase . of ( context ) . rapidResponseTeam ,
onTap: ( ) {
Navigator . push ( context , FadePage ( page: RRTMainScreen ( ) ) ) ;
} ) ,
] ,
) ,
/ /
/ / body: Container (
/ / margin: EdgeInsets . fromLTRB ( 10.0 , 20.0 , 10.0 , 10.0 ) ,
/ / child: Column (
/ / crossAxisAlignment: CrossAxisAlignment . start ,
/ / children: < Widget > [
/ /
/ / Container (
/ / height: 170 ,
/ / margin: EdgeInsets . fromLTRB ( 0.0 , 10.0 , 0.0 , 10.0 ) ,
/ / child: Row (
/ / mainAxisSize: MainAxisSize . max ,
/ / mainAxisAlignment: MainAxisAlignment . start ,
/ / children: < Widget > [
/ / Expanded (
/ / child: CardCommonEr (
/ / image: ' assets/images/new-design/AM.PNG ' ,
/ / text: TranslationBase . of ( context ) . ambulancerequest ,
/ / subText: TranslationBase . of ( context ) . requestA ,
/ / onTap: ( ) {
/ / Navigator . push (
/ / context ,
/ / FadePage (
/ / page: AmbulanceReq ( ) ) ) ;
/ / } ,
/ /
/ / ) ,
/ / ) ,
/ / Expanded (
/ / child: CardCommonEr (
/ / image: ' assets/images/new-design/emergency_icon.png ' ,
/ / text: TranslationBase . of ( context ) . nearester ,
/ / subText: TranslationBase . of ( context ) . locationa ,
/ / onTap: ( ) {
/ / Navigator . push (
/ / context ,
/ / FadePage (
/ / page: NearestEr ( ) ) ) ;
/ / } ) ,
/ /
/ / )
/ / ] ,
/ / ) ,
/ / ) ,
/ / Container (
/ / margin: EdgeInsets . fromLTRB ( 0.0 , 10.0 , 0.0 , 10.0 ) ,
/ / height: 170 ,
/ / child: Row (
/ / mainAxisSize: MainAxisSize . max ,
/ / mainAxisAlignment: MainAxisAlignment . start ,
/ / children: < Widget > [
/ / Expanded (
/ / child: CardCommonEr (
/ / image: ' assets/images/new-design/AM.PNG ' ,
/ / text: ' ED service ' ,
/ / subText: ' ED service ' ,
/ / onTap: ( ) {
/ / Navigator . push (
/ / context ,
/ / FadePage ( page: DdServicesPage ( ) )
/ / ) ;
/ / } ,
/ /
/ / ) ,
/ / ) ,
/ / Expanded (
/ / child: CardCommonEr (
/ / locked: rrtLocked ,
/ / image: ' assets/images/new-design/AM.PNG ' ,
/ / text: TranslationBase . of ( context ) . rrtService ,
/ / subText: TranslationBase . of ( context ) . rapidResponseTeam ,
/ / onTap: ( ) {
/ / Navigator . push (
/ / context ,
/ / FadePage (
/ / page: RRTMainScreen ( ) ) ) ;
/ / } ) ,
/ / )
/ / ] ,
/ / ) ,
/ / ) ,
/ / ] ,
/ / ) ,
/ / ) ,
) ;
}
}