copyWith method

EditWidgetData copyWith({
  1. int? widgetId,
  2. String? publicData,
  3. int? cacheTime,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

EditWidgetData copyWith({
  int? widgetId,
  String? publicData,
  int? cacheTime,
}) => EditWidgetData(
  widgetId: widgetId ?? this.widgetId,
  publicData: publicData ?? this.publicData,
  cacheTime: cacheTime ?? this.cacheTime,
);