NativeHelloCapabilities.fromHello constructor

NativeHelloCapabilities.fromHello(
  1. Map<String, Object?> hello
)

Implementation

NativeHelloCapabilities.fromHello(Map<String, Object?> hello)
  : abi = hello['abi'] as int?,
    protocol = hello['protocol'] as int?,
    polars = hello['polars'] as String?,
    datatypes = List<Object?>.unmodifiable(
      (hello['datatypes'] as List? ?? const []).map(_freezeHelloValue),
    ),
    datatypeCapabilities = List<Object?>.unmodifiable(
      (hello['datatypeCapabilities'] as List? ?? const []).map(
        _freezeHelloValue,
      ),
    ),
    resources = List<String>.unmodifiable(
      (hello['resources'] as List? ?? const []).cast<String>(),
    ),
    interchange = _freezeStringMap(hello['interchange'], 'interchange'),
    commands = _freezeStringMap(hello['commands'], 'commands'),
    operations = _freezeOperations(hello['operations']),
    raw = Map<String, Object?>.unmodifiable({
      for (final entry in hello.entries)
        entry.key: _freezeHelloValue(entry.value),
    });