Merge branch 'develop' into release/4.2.0

This commit is contained in:
Salvatore Giordano
2022-05-20 12:37:53 +02:00
15 changed files with 92 additions and 124 deletions
@@ -1,6 +1,5 @@
export 'attachment_upload_state_builder.dart';
export 'attachment_widget.dart'
show AttachmentError, AttachmentSource, AttachmentSourceX;
export 'attachment_widget.dart' show AttachmentError, AttachmentSource;
export 'file_attachment.dart';
export 'giphy_attachment.dart';
export 'image_attachment.dart';
@@ -7,14 +7,10 @@ enum AttachmentSource {
local,
/// Attachment is uploaded
network,
}
network;
/// Extension for identifying type of attachment
extension AttachmentSourceX on AttachmentSource {
/// The [when] method is the equivalent to pattern matching.
/// Its prototype depends on the AttachmentSource defined.
// ignore: missing_return
T when<T>({
required T Function() local,
required T Function() network,