ConfigModel.fromMap constructor

ConfigModel.fromMap(
  1. Map<String, dynamic> map
)

Factory constructor to create a ConfigModel from a raw Map.

Each key in the map represents a string expression type, and the value is a string that will be parsed into an DiagnosticSeverity using the ErrorSeverityExt.fromString extension.

Implementation

factory ConfigModel.fromMap(Map<String, dynamic> map) => ConfigModel(
      simple: ErrorSeverityExt.fromString(map['simple'] as String?),
      prefixedIdentifier:
          ErrorSeverityExt.fromString(map['prefixed_identifier'] as String?),
      interpolation:
          ErrorSeverityExt.fromString(map['interpolation'] as String?),
      binary: ErrorSeverityExt.fromString(map['binary'] as String?),
      adjacent: ErrorSeverityExt.fromString(map['adjacent'] as String?),
      method: ErrorSeverityExt.fromString(map['method'] as String?),
      simpleIdentifier:
          ErrorSeverityExt.fromString(map['simple_identifier'] as String?),
      function: ErrorSeverityExt.fromString(map['function'] as String?),
    );