@ -1,4 +1,5 @@
import ' package:diplomaticquarterapp/config/shared_pref_kay.dart ' ;
import ' package:diplomaticquarterapp/theme/colors.dart ' ;
import ' package:diplomaticquarterapp/uitl/app_shared_preferences.dart ' ;
import ' package:diplomaticquarterapp/uitl/translations_delegate_base.dart ' ;
import ' package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart ' ;
@ -28,188 +29,71 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
showNewAppBarTitle: true ,
showNewAppBar: true ,
appBarTitle: TranslationBase . of ( context ) . livecare . toUpperCase ( ) ,
/ / appBar: AppBar (
/ / leading: InkWell (
/ / onTap: ( ) {
/ / Navigator . pop ( context , null ) ;
/ / } ,
/ / child: Icon (
/ / Icons . close ,
/ / color: Colors . white ,
/ / ) ,
/ / ) ,
/ / title: Text ( TranslationBase . of ( context ) . bookAppo ,
/ / style: TextStyle ( color: Colors . white ) ) ,
/ / ) ,
body: SingleChildScrollView (
child: Container (
margin: EdgeInsets . only ( left: 20.0 , right: 20.0 ),
margin: EdgeInsets . only ( left: 20.0 , right: 20.0 , top: 20.0 ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
Container ( child: Text ( TranslationBase . of ( context ) . livecareService , style: TextStyle ( fontWeight: FontWeight . bold , fontSize: 20.0 , letterSpacing: - 0.64 , color: CustomColors . darkGrey ) ) ) ,
Container (
alignment: Alignment . center ,
margin: EdgeInsets . only ( top: 15.0 , bottom: 10.0 ) ,
child: Image . asset (
languageID = = ' ar '
? " assets/images/new-design/liveCare_ar_bg.png "
: " assets/images/new-design/liveCare_en_bg.png " ,
width: 120 ) ,
) ,
Container (
alignment: Alignment . center ,
child: Text ( TranslationBase . of ( context ) . livecareService ,
style: TextStyle (
fontWeight: FontWeight . bold , fontSize: 20.0 ) ) ) ,
Container (
margin: EdgeInsets . only ( top: 0.0 ) ,
alignment: Alignment . center ,
child: Text (
TranslationBase . of ( context ) . livecareServiceDesc ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 18.0 ) ) ) ,
margin: EdgeInsets . only ( top: 7.0 ) ,
child: Text ( TranslationBase . of ( context ) . livecareServiceDesc , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.64 , color: CustomColors . textColor , fontWeight: FontWeight . w600 ) ) ) ,
Container (
margin: EdgeInsets . only ( top: 5.0 ) ,
child: Text ( TranslationBase . of ( context ) . whyLivecare ,
style: TextStyle (
fontWeight: FontWeight . bold , fontSize: 20.0 ) ) ) ,
margin: EdgeInsets . only ( top: 20.0 ) ,
child: Text ( TranslationBase . of ( context ) . whyLivecare , style: TextStyle ( fontWeight: FontWeight . bold , fontSize: 20.0 , letterSpacing: - 0.64 , color: CustomColors . darkGrey ) ) ) ,
Container (
margin: EdgeInsets . only ( top: 0.0 , left: 20.0 ) ,
child: Row (
children: < Widget > [
SvgPicture . asset ( " assets/images/new-design/check_icon.svg " ,
width: 25 ) ,
SvgPicture . asset ( " assets/images/new-design/allow.svg " , width: 20 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.72 ,
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
TranslationBase . of ( context ) . livecarePoint1 ,
overflow: TextOverflow . clip ,
style: TextStyle ( fontSize: 14.0 ) ) ,
margin: EdgeInsets . fromLTRB ( 10.0 , 10.0 , 10.0 , 0.0 ) ,
child: Text ( TranslationBase . of ( context ) . livecarePoint1 ,
overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 , letterSpacing: - 0.64 , color: CustomColors . black , fontWeight: FontWeight . w600 ) ) ,
)
] ,
) ,
) ,
Container (
margin: EdgeInsets . only ( top: 5.0 , left: 20.0 ) ,
child: Row (
children: < Widget > [
SvgPicture . asset ( " assets/images/new-design/check_icon.svg " ,
width: 25 ) ,
SvgPicture . asset ( " assets/images/new-design/allow.svg " , width: 20 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.72 ,
margin: EdgeInsets . all( 1 0.0) ,
margin: EdgeInsets . fromLTRB( 10.0 , 10.0 , 10.0 , 0.0) ,
child: Text ( TranslationBase . of ( context ) . docVirtualAppoIns4 ,
overflow: TextOverflow . clip ,
style: TextStyle ( fontSize: 14.0 ) ) ,
overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 , letterSpacing: - 0.64 , color: CustomColors . black , fontWeight: FontWeight . w600 ) ) ,
)
] ,
) ,
) ,
Container (
margin: EdgeInsets . only ( top: 5.0 , left: 20.0 ) ,
child: Row (
children: < Widget > [
SvgPicture . asset ( " assets/images/new-design/check_icon.svg " ,
width: 25 ) ,
SvgPicture . asset ( " assets/images/new-design/allow.svg " , width: 20 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.72 ,
margin: EdgeInsets . all( 1 0.0) ,
margin: EdgeInsets . fromLTRB( 10.0 , 10.0 , 10.0 , 0.0) ,
child: Text ( TranslationBase . of ( context ) . docVirtualAppoIns5 ,
overflow: TextOverflow . clip ,
style: TextStyle ( fontSize: 14.0 ) ) ,
overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 , letterSpacing: - 0.64 , color: CustomColors . black , fontWeight: FontWeight . w600 ) ) ,
)
] ,
) ,
) ,
Container (
margin: EdgeInsets . only ( top: 10.0 ) ,
child: Text (
TranslationBase . of ( context ) . livecareSummary ,
style: TextStyle ( fontSize: 12.0 ) ) ) ,
InkWell (
onTap: ( ) {
Navigator . pop ( context , " immediate " ) ;
} ,
child: Container (
decoration: BoxDecoration (
color: Colors . red [ 900 ] ,
borderRadius: BorderRadius . all ( Radius . circular ( 10.0 ) ) ) ,
height: 100.0 ,
margin: EdgeInsets . only ( top: 20.0 ) ,
child: Row (
children: < Widget > [
Container (
margin: EdgeInsets . only ( left: 10.0 , right: 10.0 ) ,
child: SvgPicture . asset (
" assets/images/new-design/liveCare_logo_icon_white.svg " ,
width: 80 ) ,
) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.56 ,
margin: EdgeInsets . fromLTRB ( 30.0 , 10.0 , 0.0 , 0.0 ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
Text ( TranslationBase . of ( context ) . livecareOption1 ,
overflow: TextOverflow . clip ,
style: TextStyle (
fontWeight: FontWeight . bold ,
fontSize: 18.0 ,
color: Colors . white ) ) ,
Container (
margin: EdgeInsets . only ( top: 0.0 ) ,
child: Text ( TranslationBase . of ( context ) . livecareOption2 , textAlign: TextAlign . start ,
style: TextStyle (
fontSize: 18.0 , color: Colors . white ) ) ,
)
] ,
) ,
) ,
] ,
) ) ,
) ,
InkWell (
onTap: ( ) {
Navigator . pop ( context , " schedule " ) ;
} ,
child: Container (
decoration: BoxDecoration (
color: Colors . grey [ 600 ] ,
borderRadius: BorderRadius . all ( Radius . circular ( 10.0 ) ) ) ,
height: 100.0 ,
margin: EdgeInsets . only ( top: 20.0 ) ,
child: Row (
children: < Widget > [
Container (
margin: EdgeInsets . only ( left: 10.0 , right: 10.0 ) ,
child: Image . asset (
" assets/images/new-design/calendar.png " ,
width: 60 ) ,
) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.53 ,
margin: EdgeInsets . fromLTRB ( 30.0 , 10.0 , 0.0 , 0.0 ) ,
child: Column (
children: < Widget > [
Container (
child: Text ( TranslationBase . of ( context ) . livecareOption3 ,
overflow: TextOverflow . clip ,
style: TextStyle (
fontWeight: FontWeight . bold ,
fontSize: 18.0 ,
color: Colors . white ) ) ,
) ,
Container (
margin: EdgeInsets . only ( top: 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . livecareOption4 ,
style: TextStyle (
fontSize: 18.0 , color: Colors . white ) ) ,
)
] ,
) ,
) ,
] ,
) ) ,
margin: EdgeInsets . only ( top: 20.0 ) ,
child: Text ( TranslationBase . of ( context ) . livecareSummary , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.64 , color: CustomColors . textColor , fontWeight: FontWeight . w600 ) ) ) ,
GridView (
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount ( crossAxisCount: 2 , crossAxisSpacing: 13 , mainAxisSpacing: 9 ) ,
physics: NeverScrollableScrollPhysics ( ) ,
padding: EdgeInsets . only ( top: 40.0 ) ,
shrinkWrap: true ,
children: [
_loginOptionButton ( TranslationBase . of ( context ) . livecareOption1 , ' assets/images/new/Live_Care.svg ' , 1 ) ,
_loginOptionButton ( TranslationBase . of ( context ) . livecareOption4 , ' assets/images/new/book appointment.svg ' , 2 ) ,
] ,
) ,
SizedBox (
height: 40.0 ,
@ -221,6 +105,44 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
) ;
}
Widget _loginOptionButton ( String _title , String _icon , int _loginIndex ) {
return InkWell (
onTap: ( ) {
if ( _loginIndex = = 1 ) {
Navigator . pop ( context , " immediate " ) ;
} else {
Navigator . pop ( context , " schedule " ) ;
}
} ,
child: Container (
padding: EdgeInsets . only ( left: 20 , right: 20 , bottom: 15 , top: 28 ) ,
decoration: BoxDecoration (
borderRadius: BorderRadius . circular ( 15 ) ,
color: Colors . white ,
border: Border . all (
color: Color ( 0xffefefef ) ,
width: 1 ,
) ,
) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: < Widget > [
SvgPicture . asset (
_icon ,
height: _loginIndex = = 1 ? 60 : 50 ,
width: _loginIndex = = 1 ? 60 : 50 ,
) ,
Text (
_title ,
style: TextStyle ( fontSize: 16 , fontWeight: FontWeight . w600 , color: Color ( 0xff2B353E ) , letterSpacing: - 0.48 , height: 20 / 16 ) ,
) ,
] ,
) ,
) ,
) ;
}
getLanguageID ( ) async {
var languageID = await sharedPref . getStringWithDefaultValue ( APP_LANGUAGE , ' ar ' ) ;
setState ( ( ) {