copyWith method
ChatMedia
copyWith({})
Creates a copy of this media with the given fields replaced with new values
Implementation
ChatMedia copyWith({
String? url,
ChatMediaType? type,
String? fileName,
int? size,
String? extension,
Map<String, dynamic>? metadata,
Widget Function(BuildContext, ChatMedia)? customBuilder,
}) =>
ChatMedia(
url: url ?? this.url,
type: type ?? this.type,
fileName: fileName ?? this.fileName,
size: size ?? this.size,
extension: extension ?? this.extension,
metadata: metadata ?? this.metadata,
customBuilder: customBuilder ?? this.customBuilder,
);