From 8aca949f712d2332774ddbed71516f02ae3f9a86 Mon Sep 17 00:00:00 2001 From: phamconganh Date: Mon, 25 Sep 2023 20:57:24 +0700 Subject: [PATCH] fix FontFeature initial, ListStyleType initial --- lib/src/css_parser.dart | 12 +++++++++--- lib/src/style.dart | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/src/css_parser.dart b/lib/src/css_parser.dart index 57169787bc..e659a13e54 100644 --- a/lib/src/css_parser.dart +++ b/lib/src/css_parser.dart @@ -937,13 +937,19 @@ class ExpressionMapping { nextExp.text == "off" || nextExp.text == "1" || nextExp.text == "0")) { - fontFeatures.add(FontFeature(exp.text, + try { + fontFeatures.add(FontFeature(exp.text, nextExp.text == "on" || nextExp.text == "1" ? 1 : 0)); + } catch (_) {} } else { - fontFeatures.add(FontFeature.enable(exp.text)); + try { + fontFeatures.add(FontFeature.enable(exp.text)); + } catch (_) {} } } else { - fontFeatures.add(FontFeature.enable(exp.text)); + try { + fontFeatures.add(FontFeature.enable(exp.text)); + } catch (_) {} } } } diff --git a/lib/src/style.dart b/lib/src/style.dart index 3d293de8b0..b279a4b4a0 100644 --- a/lib/src/style.dart +++ b/lib/src/style.dart @@ -590,6 +590,7 @@ extension MergeBorders on Border? { } enum ListStyleType { + initial('initial'), arabicIndic('arabic-indic'), armenian('armenian'), lowerArmenian('lower-armenian'),