copyWith method

Info copyWith({
  1. String? id,
  2. DateTime? date,
  3. int? views,
  4. String? name,
  5. String? userId,
  6. String? description,
  7. int? likes,
  8. ShaderPrivacy? privacy,
  9. int? flags,
  10. List<String>? tags,
  11. bool? hasLiked,
})

Builds a copy of a Info

  • id: The shader id
  • date: The publish date of the shader
  • views: The shader views
  • name: The shader name
  • userId: The id of the user that created the shader
  • description: The shader description
  • likes: The number of likes
  • privacy: The shader privacy
  • flags: The shader flags
  • tags: The shader tags
  • hasLiked: If the current logged user liked the shader

Implementation

Info copyWith({
  String? id,
  DateTime? date,
  int? views,
  String? name,
  String? userId,
  String? description,
  int? likes,
  ShaderPrivacy? privacy,
  int? flags,
  List<String>? tags,
  bool? hasLiked,
}) {
  return Info(
    id: id ?? this.id,
    date: date ?? this.date,
    views: views ?? this.views,
    name: name ?? this.name,
    userId: userId ?? this.userId,
    description: description ?? this.description,
    likes: likes ?? this.likes,
    privacy: privacy ?? this.privacy,
    flags: flags ?? this.flags,
    tags: tags ?? this.tags,
    hasLiked: hasLiked ?? this.hasLiked,
  );
}