From c12c73f20a3467f4580605f982a8e982dc0e6029 Mon Sep 17 00:00:00 2001 From: hannathkadher Date: Thu, 16 Jan 2025 00:10:45 +0400 Subject: [PATCH] add close button color --- .../views/assign_tag_models_dialog.dart | 71 ++++++++++++------- 1 file changed, 45 insertions(+), 26 deletions(-) diff --git a/lib/pages/spaces_management/assign_tag_models/views/assign_tag_models_dialog.dart b/lib/pages/spaces_management/assign_tag_models/views/assign_tag_models_dialog.dart index 1b162832..7a287fb7 100644 --- a/lib/pages/spaces_management/assign_tag_models/views/assign_tag_models_dialog.dart +++ b/lib/pages/spaces_management/assign_tag_models/views/assign_tag_models_dialog.dart @@ -23,17 +23,17 @@ class AssignTagModelsDialog extends StatelessWidget { final String spaceName; final String title; - const AssignTagModelsDialog({ - Key? key, - required this.products, - required this.subspaces, - required this.addedProducts, - required this.initialTags, - this.onTagsAssigned, - this.allTags, - required this.spaceName, - required this.title - }) : super(key: key); + const AssignTagModelsDialog( + {Key? key, + required this.products, + required this.subspaces, + required this.addedProducts, + required this.initialTags, + this.onTagsAssigned, + this.allTags, + required this.spaceName, + required this.title}) + : super(key: key); @override Widget build(BuildContext context) { @@ -123,19 +123,38 @@ class AssignTagModelsDialog extends StatelessWidget { tag.product?.name ?? 'Unknown', overflow: TextOverflow.ellipsis, )), - IconButton( - icon: const Icon(Icons.close, - color: ColorsManager.warningRed, - size: 16), - onPressed: () { - context - .read() - .add(DeleteTagModel( - tagToDelete: tag, - tags: state.tags)); - }, - tooltip: 'Delete Tag', - ) + const SizedBox(width: 10), + Container( + width: 20.0, + height: 20.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + border: Border.all( + color: ColorsManager + .lightGrayColor, + width: 1.0, + ), + ), + child: IconButton( + icon: const Icon( + Icons.close, + color: ColorsManager + .lightGreyColor, + size: 16, + ), + onPressed: () { + context + .read() + .add(DeleteTagModel( + tagToDelete: tag, + tags: state.tags)); + }, + tooltip: 'Delete Tag', + padding: EdgeInsets.zero, + constraints: + const BoxConstraints(), + ), + ), ], ), ), @@ -154,7 +173,6 @@ class AssignTagModelsDialog extends StatelessWidget { )); }, decoration: const InputDecoration( - hintText: 'Enter Tag', border: InputBorder.none, ), style: const TextStyle( @@ -172,7 +190,8 @@ class AssignTagModelsDialog extends StatelessWidget { color: ColorsManager.whiteColors, icon: const Icon( Icons.arrow_drop_down, - color: ColorsManager.blackColor), + color: + ColorsManager.blackColor), onSelected: (value) { controller.text = value; context