diff --git a/lib/pages/spaces_management/space_model/widgets/button_content_widget.dart b/lib/pages/spaces_management/space_model/widgets/button_content_widget.dart index a3ccad7c..2cd338e4 100644 --- a/lib/pages/spaces_management/space_model/widgets/button_content_widget.dart +++ b/lib/pages/spaces_management/space_model/widgets/button_content_widget.dart @@ -6,55 +6,64 @@ class ButtonContentWidget extends StatelessWidget { final IconData? icon; final String label; final String? svgAssets; + final bool disabled; - const ButtonContentWidget( - {Key? key, this.icon, required this.label, this.svgAssets}) - : super(key: key); + const ButtonContentWidget({ + Key? key, + this.icon, + required this.label, + this.svgAssets, + this.disabled = false, + }) : super(key: key); @override Widget build(BuildContext context) { final screenWidth = MediaQuery.of(context).size.width; - return SizedBox( - width: screenWidth * 0.25, - child: Container( - decoration: BoxDecoration( - color: ColorsManager.textFieldGreyColor, - border: Border.all( - color: ColorsManager.neutralGray, - width: 3.0, + return Opacity( + opacity: disabled ? 0.5 : 1.0, + child: SizedBox( + width: screenWidth * 0.25, + child: Container( + decoration: BoxDecoration( + color: ColorsManager.textFieldGreyColor, + border: Border.all( + color: ColorsManager.neutralGray, + width: 3.0, + ), + borderRadius: BorderRadius.circular(20), ), - borderRadius: BorderRadius.circular(20), - ), - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 16.0), - child: Row( - children: [ - if (icon != null) - Icon( - icon, - color: ColorsManager.spaceColor, - ), - if (svgAssets != null) - Padding( - padding: const EdgeInsets.only(left: 6.0), - child: SvgPicture.asset( - svgAssets!, - width: screenWidth * 0.015, // Adjust icon size - height: screenWidth * 0.015, + child: Padding( + padding: + const EdgeInsets.symmetric(vertical: 10.0, horizontal: 16.0), + child: Row( + children: [ + if (icon != null) + Icon( + icon, + color: ColorsManager.spaceColor, + ), + if (svgAssets != null) + Padding( + padding: const EdgeInsets.only(left: 6.0), + child: SvgPicture.asset( + svgAssets!, + width: screenWidth * 0.015, // Adjust icon size + height: screenWidth * 0.015, + ), + ), + const SizedBox(width: 10), + Expanded( + child: Text( + label, + style: const TextStyle( + color: ColorsManager.blackColor, + fontSize: 16, + ), ), ), - const SizedBox(width: 10), - Expanded( - child: Text( - label, - style: const TextStyle( - color: ColorsManager.blackColor, - fontSize: 16, - ), - ), - ), - ], + ], + ), ), ), ),