TF-4178 Fix Nitpick comments from coderabbit

This commit is contained in:
dab246
2025-12-10 10:30:09 +07:00
committed by Dat H. Pham
parent 833df56cd8
commit 95831054b2
4 changed files with 9 additions and 4 deletions
@@ -320,7 +320,12 @@ class _ColorPickerModalState extends State<ColorPickerModal> {
}
void _onHexColorChanged(String value) {
_hsvColorNotifier.value = HSVColor.fromColor(value.toColor);
final hex = value.trim();
if (hex.isEmpty) return;
try {
_hsvColorNotifier.value = HSVColor.fromColor(hex.toColor);
} catch (_) {}
}
@override