typeFromTypeString static method Null safety

ManagedPropertyType? typeFromTypeString(
  1. String? type
)

Returns inverse of typeStringForType.

Implementation

static ManagedPropertyType? typeFromTypeString(String? type) {
  switch (type) {
    case "integer":
      return ManagedPropertyType.integer;
    case "double":
      return ManagedPropertyType.doublePrecision;
    case "bigInteger":
      return ManagedPropertyType.bigInteger;
    case "boolean":
      return ManagedPropertyType.boolean;
    case "datetime":
      return ManagedPropertyType.datetime;
    case "string":
      return ManagedPropertyType.string;
    case "document":
      return ManagedPropertyType.document;
    default:
      return null;
  }
}