keyByExtensionId function

Map<String, AMapExtension> keyByExtensionId(
  1. Iterable<AMapExtension> extensions
)

Implementation

Map<String, AMapExtension> keyByExtensionId(
    Iterable<AMapExtension> extensions) {
  // ignore: unnecessary_null_comparison
  if (extensions == null) {
    return <String, AMapExtension>{};
  }
  return Map<String, AMapExtension>.fromEntries(extensions.map(
      (AMapExtension extension) =>
          MapEntry<String, AMapExtension>(extension.id, extension)));
}