GitReference.fromJson constructor

GitReference.fromJson(
  1. Map json
)

Implementation

factory GitReference.fromJson(Map json) {
  final git = json['git'];
  if (git is String) {
    return GitReference(git, null);
  } else if (git is Map) {
    Map m = git;
    return GitReference(m['url'], m['ref'], m['path']);
  } else {
    throw StateError('Unexpected format for git dependency $git');
  }
}