copyWith method
TaskViewModel
copyWith({
- int? id,
- String? title,
- String? description,
- TaskState? state,
- double? distance,
- DateTime? createdAt,
- DateTime? updatedAt,
- List<
double> ? location, - String? locationName,
- List<
CategoryViewModel> ? categories, - TaskType? type,
- TaskFrequency? frequency,
- UserViewModel? user,
- UserViewModel? assignee,
- DateTime? idealDate,
- TaskIdealDateCompletionWhen? idealDateCompletion,
- bool? isInterested,
Implementation
TaskViewModel copyWith(
{int? id,
String? title,
String? description,
enums.TaskState? state,
double? distance,
DateTime? createdAt,
DateTime? updatedAt,
List<double>? location,
String? locationName,
List<CategoryViewModel>? categories,
enums.TaskType? type,
enums.TaskFrequency? frequency,
UserViewModel? user,
UserViewModel? assignee,
DateTime? idealDate,
enums.TaskIdealDateCompletionWhen? idealDateCompletion,
bool? isInterested}) {
return TaskViewModel(
id: id ?? this.id,
title: title ?? this.title,
description: description ?? this.description,
state: state ?? this.state,
distance: distance ?? this.distance,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
location: location ?? this.location,
locationName: locationName ?? this.locationName,
categories: categories ?? this.categories,
type: type ?? this.type,
frequency: frequency ?? this.frequency,
user: user ?? this.user,
assignee: assignee ?? this.assignee,
idealDate: idealDate ?? this.idealDate,
idealDateCompletion: idealDateCompletion ?? this.idealDateCompletion,
isInterested: isInterested ?? this.isInterested);
}