Map<String, dynamic> toMap() { return <String, dynamic>{ 'type': type, 'path': path, 'byteArray': byteArray, }; }