writeMetadata method
Writes metadata to the file at filePath.
Returns true if the write succeeded.
Implementation
@override
Future<bool> writeMetadata(String filePath, Metadata metadata) async {
try {
final result = await methodChannel.invokeMethod<bool>(
'writeMetadata',
{
'filePath': filePath,
'metadata': metadata.toMap(),
},
);
return result ?? false;
} on PlatformException catch (e) {
debugPrint('[media_metadata] PlatformException: ${e.message}');
return false;
}
}