From e54787eb23eed89f6510358b9a0653554894e003 Mon Sep 17 00:00:00 2001 From: li3317 Date: Wed, 13 Jan 2021 01:03:50 -0500 Subject: [PATCH] throw error for invalid color code --- lib/widgets/text_line.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/widgets/text_line.dart b/lib/widgets/text_line.dart index 3cb9cb5a..d060437d 100644 --- a/lib/widgets/text_line.dart +++ b/lib/widgets/text_line.dart @@ -221,8 +221,7 @@ class TextLine extends StatelessWidget { } if (!s.startsWith('#')) { - // give a default color - return Colors.transparent; + throw("Color code not supported"); } String hex = s.replaceFirst('#', '');