fromSection static method

CompactionEngine? fromSection(
  1. Object? node, {
  2. required String label,
})

Parses a raw compaction: section node ({engine: structured}).

Implementation

static CompactionEngine? fromSection(Object? node, {required String label}) {
  if (node == null) return null;
  if (node is! Map) {
    throw ConfigException(
      '$label: compaction must be a map with an engine key, got: $node',
    );
  }
  return tryParse(node['engine'], label: label);
}