TF-4171 Display tag in mailbox list

This commit is contained in:
dab246
2025-11-25 14:02:50 +07:00
committed by Dat H. Pham
parent f4302e06e8
commit 31ed2feae4
19 changed files with 1865 additions and 38 deletions
@@ -0,0 +1,26 @@
import 'package:core/presentation/extensions/color_extension.dart';
import 'package:core/presentation/extensions/hex_color_extension.dart';
import 'package:flutter/material.dart';
import 'package:labels/model/label.dart';
extension LabelExtension on Label {
static const String moreLabelId = 'more-btn';
String get safeDisplayName => displayName ?? '';
Color? get backgroundColor {
if (id?.value == moreLabelId) {
return AppColor.grayBackgroundColor;
} else {
return color?.value.toColor();
}
}
Color get textColor {
if (id?.value == moreLabelId) {
return Colors.black;
} else {
return Colors.white;
}
}
}