@ -32,11 +32,16 @@ Widget getPaymentMethods() {
mainAxisSize: MainAxisSize . max ,
mainAxisSize: MainAxisSize . max ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
children: [
Image . asset ( " assets/images/new/payment/Mada.png " , width: 50 , height: 50 ) ,
Image . asset ( " assets/images/new/payment/Mada.png " ,
Image . asset ( " assets/images/new/payment/visa.png " , width: 50 , height: 50 ) ,
width: 50 , height: 50 ) ,
Image . asset ( " assets/images/new/payment/Mastercard.png " , width: 50 , height: 50 ) ,
Image . asset ( " assets/images/new/payment/visa.png " ,
Image . asset ( " assets/images/new/payment/Apple_Pay.png " , width: 50 , height: 50 ) ,
width: 50 , height: 50 ) ,
Image . asset ( " assets/images/new/payment/installments.png " , width: 50 , height: 50 ) ,
Image . asset ( " assets/images/new/payment/Mastercard.png " ,
width: 50 , height: 50 ) ,
Image . asset ( " assets/images/new/payment/Apple_Pay.png " ,
width: 50 , height: 50 ) ,
Image . asset ( " assets/images/new/payment/installments.png " ,
width: 50 , height: 50 ) ,
] ,
] ,
) ,
) ,
) ;
) ;
@ -48,10 +53,15 @@ Widget getNoDataWidget(BuildContext context) {
child: Column (
child: Column (
mainAxisAlignment: MainAxisAlignment . center ,
mainAxisAlignment: MainAxisAlignment . center ,
children: [
children: [
SvgPicture . asset ( ' assets/images/new/not_found.svg ' , width: 110.0 , height: 110.0 ) ,
SvgPicture . asset ( ' assets/images/new/not_found.svg ' ,
width: 110.0 , height: 110.0 ) ,
Container (
Container (
margin: EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Text ( TranslationBase . of ( context ) . noResultFound , style: TextStyle ( fontSize: 14 , fontWeight: FontWeight . w600 , color: Color ( 0xFFBABABA ) ) ) ) ,
child: Text ( TranslationBase . of ( context ) . noResultFound ,
style: TextStyle (
fontSize: 14 ,
fontWeight: FontWeight . w600 ,
color: Color ( 0xFFBABABA ) ) ) ) ,
] ,
] ,
) ,
) ,
) ,
) ,
@ -79,7 +89,8 @@ spacer() {
}
}
Future navigateTo ( context , page ) async {
Future navigateTo ( context , page ) async {
return await Navigator . push ( context , MaterialPageRoute ( builder: ( context ) = > page ) ) ;
return await Navigator . push (
context , MaterialPageRoute ( builder: ( context ) = > page ) ) ;
}
}
/ / Future navigateToReplace ( context , page ) async {
/ / Future navigateToReplace ( context , page ) async {
@ -137,7 +148,11 @@ Widget circularAviator(
child: Container (
child: Container (
width: s ,
width: s ,
height: s ,
height: s ,
decoration: containerColorRadiusBorderWidth ( bcColor = = null ? Colors . grey [ 200 ] : bcColor , 2000 , brColor = = null ? Colors . blueGrey [ 800 ] : brColor , borderWidth = = null ? 2 : borderWidth ) ,
decoration: containerColorRadiusBorderWidth (
bcColor = = null ? Colors . grey [ 200 ] : bcColor ,
2000 ,
brColor = = null ? Colors . blueGrey [ 800 ] : brColor ,
borderWidth = = null ? 2 : borderWidth ) ,
child: Icon (
child: Icon (
icon = = null ? Icons . person : icon ,
icon = = null ? Icons . person : icon ,
size: s / 1.7 ,
size: s / 1.7 ,
@ -219,13 +234,14 @@ RoundedRectangleBorder buttonShape() {
) ;
) ;
}
}
Decoration containerRadiusWithGradient ( double radius , { Color color1 , Color color2 } ) {
Decoration containerRadiusWithGradient ( double radius ,
{ Color color1 , Color color2 } ) {
return BoxDecoration (
return BoxDecoration (
borderRadius: BorderRadius . circular ( radius ) ,
borderRadius: BorderRadius . circular ( radius ) ,
gradient: LinearGradient (
gradient: LinearGradient (
colors: [
colors: [
color1 ? ? Color ( 0xFFF71787E ) ,
color1 ? ? Color ( 0xFFF71787E ) ,
color2 ? ? Color ( 0xFFF2B353E ) ,
color2 ? ? Color ( 0xFFF2B353E ) ,
] ,
] ,
begin: Alignment . centerLeft ,
begin: Alignment . centerLeft ,
end: Alignment . centerRight ,
end: Alignment . centerRight ,
@ -233,7 +249,8 @@ Decoration containerRadiusWithGradient(double radius,{Color color1,Color color2}
) ;
) ;
}
}
Decoration containerBottomRightRadiusWithGradient ( double radius , { Color darkColor , Color lightColor } ) {
Decoration containerBottomRightRadiusWithGradient ( double radius ,
{ Color darkColor , Color lightColor } ) {
return BoxDecoration (
return BoxDecoration (
borderRadius: BorderRadius . only ( bottomRight: Radius . circular ( radius ) ) ,
borderRadius: BorderRadius . only ( bottomRight: Radius . circular ( radius ) ) ,
gradient: LinearGradient (
gradient: LinearGradient (
@ -247,7 +264,8 @@ Decoration containerBottomRightRadiusWithGradient(double radius, {Color darkColo
) ;
) ;
}
}
Decoration containerBottomRightRadiusWithGradientForAr ( double radius , { Color darkColor , Color lightColor } ) {
Decoration containerBottomRightRadiusWithGradientForAr ( double radius ,
{ Color darkColor , Color lightColor } ) {
return BoxDecoration (
return BoxDecoration (
borderRadius: BorderRadius . only ( bottomLeft: Radius . circular ( radius ) ) ,
borderRadius: BorderRadius . only ( bottomLeft: Radius . circular ( radius ) ) ,
gradient: LinearGradient (
gradient: LinearGradient (
@ -261,9 +279,24 @@ Decoration containerBottomRightRadiusWithGradientForAr(double radius, {Color dar
) ;
) ;
}
}
Decoration containerRadiusWithGradientServices ( double radius , { Color darkColor , Color lightColor } ) {
Decoration containerRadiusWithGradientServices (
double radius , {
Color darkColor ,
Color lightColor ,
bool isProduct = false ,
bool prescriptionRequired = false ,
bool isEnglish = true ,
} ) {
return BoxDecoration (
return BoxDecoration (
borderRadius: BorderRadius . all ( Radius . circular ( radius ) ) ,
borderRadius: ! isProduct | | ! prescriptionRequired
? BorderRadius . all ( Radius . circular ( radius ) )
: isEnglish
? BorderRadius . only (
topLeft: Radius . circular ( 26 ) ,
)
: BorderRadius . only (
topRight: Radius . circular ( 26 ) ,
) ,
gradient: LinearGradient (
gradient: LinearGradient (
colors: [
colors: [
darkColor = = null ? Color ( 0xFF2B353E ) : darkColor ,
darkColor = = null ? Color ( 0xFF2B353E ) : darkColor ,
@ -275,7 +308,11 @@ Decoration containerRadiusWithGradientServices(double radius, {Color darkColor,
) ;
) ;
}
}
Decoration containerBottomRightRadiusWithGradientBorder ( double radius , { Color darkColor , Color lightColor , Color borderColor = Colors . transparent , double w = 0 } ) {
Decoration containerBottomRightRadiusWithGradientBorder ( double radius ,
{ Color darkColor ,
Color lightColor ,
Color borderColor = Colors . transparent ,
double w = 0 } ) {
return BoxDecoration (
return BoxDecoration (
borderRadius: BorderRadius . all ( Radius . circular ( radius ) ) ,
borderRadius: BorderRadius . all ( Radius . circular ( radius ) ) ,
border: Border . all (
border: Border . all (
@ -304,7 +341,8 @@ Decoration containerRadius(Color background, double radius) {
) ;
) ;
}
}
Decoration containerColorRadiusBorder ( Color background , double radius , Color color ) {
Decoration containerColorRadiusBorder (
Color background , double radius , Color color ) {
return BoxDecoration (
return BoxDecoration (
color: background ,
color: background ,
border: Border . all (
border: Border . all (
@ -315,7 +353,8 @@ Decoration containerColorRadiusBorder(Color background, double radius, Color col
) ;
) ;
}
}
Decoration containerColorRadiusBorderWidth ( Color background , double radius , Color color , double w ) {
Decoration containerColorRadiusBorderWidth (
Color background , double radius , Color color , double w ) {
return BoxDecoration (
return BoxDecoration (
color: background ,
color: background ,
border: Border . all (
border: Border . all (
@ -326,7 +365,8 @@ Decoration containerColorRadiusBorderWidth(Color background, double radius, Colo
) ;
) ;
}
}
Decoration containerColorRadiusBorderWidthCircular ( Color background , double radius , Color color , double w ) {
Decoration containerColorRadiusBorderWidthCircular (
Color background , double radius , Color color , double w ) {
return BoxDecoration (
return BoxDecoration (
color: background ,
color: background ,
border: Border . all (
border: Border . all (
@ -341,29 +381,36 @@ Decoration containerColorRadiusBorderWidthCircular(Color background, double radi
Decoration containerColorRadiusRight ( Color background , double radius ) {
Decoration containerColorRadiusRight ( Color background , double radius ) {
return BoxDecoration (
return BoxDecoration (
color: background ,
color: background ,
borderRadius: BorderRadius . only ( topRight: Radius . circular ( radius ) , bottomRight: Radius . circular ( radius ) ) ,
borderRadius: BorderRadius . only (
topRight: Radius . circular ( radius ) ,
bottomRight: Radius . circular ( radius ) ) ,
) ;
) ;
}
}
Decoration containerColorRadiusLeft ( Color background , double radius ) {
Decoration containerColorRadiusLeft ( Color background , double radius ) {
return BoxDecoration (
return BoxDecoration (
color: background ,
color: background ,
borderRadius: BorderRadius . only ( topLeft: Radius . circular ( radius ) , bottomLeft: Radius . circular ( radius ) ) ,
borderRadius: BorderRadius . only (
topLeft: Radius . circular ( radius ) , bottomLeft: Radius . circular ( radius ) ) ,
) ;
) ;
}
}
Decoration containerColorRadiusRightBorder ( Color background , double radius , double w ) {
Decoration containerColorRadiusRightBorder (
Color background , double radius , double w ) {
return BoxDecoration (
return BoxDecoration (
color: background ,
color: background ,
border: Border . all (
border: Border . all (
width: w , / /
width: w , / /
color: Colors . white / / < - - - border width here
color: Colors . white / / < - - - border width here
) ,
) ,
borderRadius: BorderRadius . only ( topRight: Radius . circular ( radius ) , bottomRight: Radius . circular ( radius ) ) ,
borderRadius: BorderRadius . only (
topRight: Radius . circular ( radius ) ,
bottomRight: Radius . circular ( radius ) ) ,
) ;
) ;
}
}
Decoration containerColorRadiusRightBorderc ( Color background , double radius , double w , Color borderColor ) {
Decoration containerColorRadiusRightBorderc (
Color background , double radius , double w , Color borderColor ) {
return BoxDecoration (
return BoxDecoration (
color: background ,
color: background ,
border: Border . all (
border: Border . all (
@ -394,21 +441,23 @@ Decoration containerColorRadiusBottom(Color color, double radius) {
) ;
) ;
}
}
Decoration containerColorRadiusLeftBorder ( Color background , double radius , double w ) {
Decoration containerColorRadiusLeftBorder (
Color background , double radius , double w ) {
return BoxDecoration (
return BoxDecoration (
color: background ,
color: background ,
border: Border . all (
border: Border . all (
width: w , / /
width: w , / /
color: Colors . white / / < - - - border width here
color: Colors . white / / < - - - border width here
) ,
) ,
borderRadius: BorderRadius . only ( topLeft: Radius . circular ( radius ) , bottomLeft: Radius . circular ( radius ) ) ,
borderRadius: BorderRadius . only (
topLeft: Radius . circular ( radius ) , bottomLeft: Radius . circular ( radius ) ) ,
) ;
) ;
}
}
BoxDecoration cardRadius ( double radius , { Color color , double elevation } ) {
BoxDecoration cardRadius ( double radius , { Color color , double elevation } ) {
return BoxDecoration (
return BoxDecoration (
shape: BoxShape . rectangle ,
shape: BoxShape . rectangle ,
color: color ? ? Colors . white ,
color: color ? ? Colors . white ,
borderRadius: BorderRadius . all (
borderRadius: BorderRadius . all (
Radius . circular ( radius ) ,
Radius . circular ( radius ) ,
) ,
) ,
@ -416,7 +465,7 @@ BoxDecoration cardRadius(double radius,{Color color,double elevation}) {
BoxShadow (
BoxShadow (
color: Color ( 0xff000000 ) . withOpacity ( . 05 ) ,
color: Color ( 0xff000000 ) . withOpacity ( . 05 ) ,
/ / spreadRadius: 5 ,
/ / spreadRadius: 5 ,
blurRadius: elevation ? ? 27 ,
blurRadius: elevation ? ? 27 ,
offset: Offset ( - 2 , 3 ) ,
offset: Offset ( - 2 , 3 ) ,
) ,
) ,
] ,
] ,
@ -433,19 +482,23 @@ ShapeBorder cardRadiusNew(double radius) {
ShapeBorder cardRadiusTop ( double radius ) {
ShapeBorder cardRadiusTop ( double radius ) {
return RoundedRectangleBorder (
return RoundedRectangleBorder (
side: BorderSide ( color: Colors . transparent , width: 0 ) ,
side: BorderSide ( color: Colors . transparent , width: 0 ) ,
borderRadius: BorderRadius . only ( topLeft: Radius . circular ( radius ) , topRight: Radius . circular ( radius ) ) ,
borderRadius: BorderRadius . only (
topLeft: Radius . circular ( radius ) , topRight: Radius . circular ( radius ) ) ,
) ;
) ;
}
}
ShapeBorder cardRadiusTop2 ( double radius ) {
ShapeBorder cardRadiusTop2 ( double radius ) {
return RoundedRectangleBorder (
return RoundedRectangleBorder (
borderRadius: BorderRadius . only ( topLeft: Radius . circular ( radius ) , topRight: Radius . circular ( radius ) ) ,
borderRadius: BorderRadius . only (
topLeft: Radius . circular ( radius ) , topRight: Radius . circular ( radius ) ) ,
) ;
) ;
}
}
ShapeBorder cardRadiusBottom ( double radius ) {
ShapeBorder cardRadiusBottom ( double radius ) {
return RoundedRectangleBorder (
return RoundedRectangleBorder (
borderRadius: BorderRadius . only ( bottomLeft: Radius . circular ( radius ) , bottomRight: Radius . circular ( radius ) ) ,
borderRadius: BorderRadius . only (
bottomLeft: Radius . circular ( radius ) ,
bottomRight: Radius . circular ( radius ) ) ,
) ;
) ;
}
}
@ -568,7 +621,8 @@ FontStyle getFontStyle(String fontStyle) {
bool timeCalculator ( int startHour , int startMint , int endHour , int endMint ) {
bool timeCalculator ( int startHour , int startMint , int endHour , int endMint ) {
DateTime now = DateTime . now ( ) ;
DateTime now = DateTime . now ( ) ;
DateTime startDate = DateTime ( now . year , now . month , now . day , startHour , startHour ) ;
DateTime startDate =
DateTime ( now . year , now . month , now . day , startHour , startHour ) ;
DateTime endDate = DateTime ( now . year , now . month , now . day , endHour , endMint ) ;
DateTime endDate = DateTime ( now . year , now . month , now . day , endHour , endMint ) ;
if ( startDate . isBefore ( now ) & & endDate . isAfter ( now ) )
if ( startDate . isBefore ( now ) & & endDate . isAfter ( now ) )
return true ;
return true ;