decode static method

SharedAttachment decode(
  1. Object message
)

Implementation

static SharedAttachment decode(Object message) {
  final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
  String path = pigeonMap['path']! as String;
  if (Platform.isIOS) {
    return SharedAttachment(
      path: Uri.decodeFull(path),
      type: SharedAttachmentType.values[pigeonMap['type']! as int],
    );
  } else {
    return SharedAttachment(
      path: path,
      type: SharedAttachmentType.values[pigeonMap['type']! as int],
    );
  }
}