copyWith method

WidgetData copyWith({
  1. String? title,
  2. String? subtitle,
  3. String? body,
  4. String? imageUrl,
  5. String? iconName,
  6. Map<String, dynamic>? customData,
  7. DateTime? timestamp,
})

Creates a copy of this WidgetData with updated fields.

Implementation

WidgetData copyWith({
  String? title,
  String? subtitle,
  String? body,
  String? imageUrl,
  String? iconName,
  Map<String, dynamic>? customData,
  DateTime? timestamp,
}) {
  return WidgetData(
    title: title ?? this.title,
    subtitle: subtitle ?? this.subtitle,
    body: body ?? this.body,
    imageUrl: imageUrl ?? this.imageUrl,
    iconName: iconName ?? this.iconName,
    customData: customData ?? this.customData,
    timestamp: timestamp ?? this.timestamp,
  );
}