TF-4236 Implement remove a label from an email when click on the cross on a tag in the opened mail

This commit is contained in:
dab246
2026-01-09 16:37:09 +07:00
committed by Dat H. Pham
parent 3ef66bbbda
commit b37359af03
9 changed files with 145 additions and 11 deletions
@@ -9,6 +9,8 @@ class LabelWidget extends StatelessWidget {
final double horizontalPadding;
final double? maxWidth;
final bool isTruncateLabel;
final Widget? actionWidget;
final EdgeInsetsGeometry? padding;
const LabelWidget({
super.key,
@@ -16,9 +18,20 @@ class LabelWidget extends StatelessWidget {
this.horizontalPadding = 4,
this.maxWidth,
this.isTruncateLabel = false,
this.actionWidget,
this.padding,
});
factory LabelWidget.create(Label label) => LabelWidget(label: label);
factory LabelWidget.create({
required Label label,
required Widget removeLabelAction,
EdgeInsetsGeometry? padding,
}) =>
LabelWidget(
label: label,
actionWidget: removeLabelAction,
padding: padding,
);
@override
Widget build(BuildContext context) {
@@ -33,6 +46,8 @@ class LabelWidget extends StatelessWidget {
maxWidth: maxWidth,
isTruncateText: isTruncateLabel,
showTooltip: showTooltip,
actionWidget: actionWidget,
padding: padding,
);
}
}