ConvertToValueWithStringValue static method

Object? ConvertToValueWithStringValue(
  1. MapiPropertyType? mapiPropType,
  2. String? stringValue
)
Converts a String to value consistent with MAPI type. Type of the MAPI property. String to convert to a value.

Implementation

static Object? ConvertToValueWithStringValue(
  MapiPropertyType? mapiPropType,
  String? stringValue,
) {
  if (!MapiTypeConverterMap.Member!.containsKey(mapiPropType)) {
    throw UnsupportedError(
      "MAPI property type $mapiPropType is not supported",
    );
  }
  return MapiTypeConverterMap.Member![mapiPropType!]!.ConvertToValue(
    stringValue,
  );
}