buildValue method
Builds the value for the specific type.
Make sure to only override this method with any new DesignTokenParser you create. Please avoid directly calling this method outside DesignTokenParser. Prefer DesignTokenParser.parse.
Implementation
@override
String buildValue(value) {
if (value is String) {
if (value.contains('%')) {
return '${parsePercentage(value)}';
} else {
throw Exception(
'Unable to parse line height that does not contain "%". Value: $value',
);
}
}
throw Exception('Unable to parse line height with data: $value');
}