diff --git a/lib/widgets/text_line.dart b/lib/widgets/text_line.dart index bdc1454e..b9aa195d 100644 --- a/lib/widgets/text_line.dart +++ b/lib/widgets/text_line.dart @@ -123,6 +123,11 @@ class TextLine extends StatelessWidget { int.parse(arr[2]), double.parse(arr[3])); } + if (!s.startsWith('#')) { + // give a default color + return Colors.transparent; + } + String hex = s.replaceFirst('#', ''); hex = hex.length == 6 ? 'ff' + hex : hex; int val = int.parse(hex, radix: 16);