refactor(llc, ui): migrate enums to v3
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user