parseColorStr function
create_user: zhengzaihong email:1096877329@qq.com create_date: 2023/5/12 create_time: 9:35 describe: 颜色工具
#FFE6E6E6(argb) 格式转 dart 颜色
Implementation
///#FFE6E6E6(argb) 格式转 dart 颜色
Color parseColorStr(String? colorStr) {
if (null == colorStr || colorStr.isEmpty) {
return Colors.transparent;
}
return Color(int.parse(colorStr.replaceFirst('#', ''), radix: 16));
}