Repository constructor

const Repository({
  1. @JsonKey(name: 'created_at') required DateTime createdAt,
  2. @JsonKey(name: 'default_branch') required String defaultBranch,
  3. @JsonKey(name: 'fork_count') required int forkCount,
  4. @JsonKey(name: 'description') String? description,
  5. @JsonKey(name: 'full_name') required String fullName,
  6. @JsonKey(name: 'is_private') required bool isPrivate,
  7. @JsonKey(name: 'star_count') required int starCount,
  8. @JsonKey(name: 'watch_count') required int watchCount,
  9. required String id,
  10. required String name,
  11. required String provider,
})

Implementation

const factory Repository({
  @JsonKey(name: 'created_at') required DateTime createdAt,
  @JsonKey(name: 'default_branch') required String defaultBranch,
  @JsonKey(name: 'fork_count') required int forkCount,
  @JsonKey(name: 'description') String? description,
  @JsonKey(name: 'full_name') required String fullName,
  @JsonKey(name: 'is_private') required bool isPrivate,
  @JsonKey(name: 'star_count') required int starCount,
  @JsonKey(name: 'watch_count') required int watchCount,
  required String id,
  required String name,
  required String provider,
}) = _Repository;