schemaFromString function
PIComposer APIPIComposer API

schemaFromString#

SupportedSchema schemaFromString(String enumName)

Converts a string representation to a SupportedSchema enum value.

enumName: The string representation of the schema (case-insensitive)

Returns the corresponding SupportedSchema value, or SupportedSchema.unknown if no matching schema is found.

Example:#

final schema = schemaFromString('ap242');  // Returns SupportedSchema.ap242
final ifcSchema = schemaFromString('IFC4'); // Returns SupportedSchema.ifc4x3