DictionaryValue.parse constructor
DictionaryValue.parse(
- String value
parses the correct DictionaryValue implementor based on a given value
.
Implementation
factory DictionaryValue.parse(String value) {
final number = num.tryParse(value);
if (number != null) return NumberDictionaryValue(number);
final dateTime = DateTime.tryParse(value);
if (dateTime != null) return DateTimeDictionaryValue(dateTime);
return StringDictionaryValue(value);
}