refactor(llc, ui): migrate enums to v3

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2022-05-20 14:18:30 +05:30
committed by xsahil03x
parent 715f70a246
commit 0213fa6f1f
12 changed files with 66 additions and 108 deletions
@@ -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,