generated from dellevin/template
新增阅读器功能,待优化
This commit is contained in:
6
lib/utils/color_converter.dart
Normal file
6
lib/utils/color_converter.dart
Normal file
@@ -0,0 +1,6 @@
|
||||
/// Dart ARGB 颜色字符串转换为 JS RGBA 格式
|
||||
/// dartColor: "FF0066FF" (AARRGGBB) → jsColor: "0066FFFF" (RRGGBBAA)
|
||||
String convertDartColorToJs(String dartColor) {
|
||||
if (dartColor.length < 8) return dartColor;
|
||||
return dartColor.substring(2) + dartColor.substring(0, 2);
|
||||
}
|
||||
Reference in New Issue
Block a user