HostedDependency.fromMap constructor

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

Implementation

factory HostedDependency.fromMap(Map<String, dynamic> map) {
  return HostedDependency(
    name: map['name'] as String,
    hosted: map['hosted'] is String
        ? map['hosted']
        : map['hosted'] is Map
            ? jsonEncode(map['hosted'])
            : map['hosted'].toString(),
    version: map['version'] as String,
  );
}