deleteRequest method
Deletes a task and all related files by ID
requestId - task ID to delete
Returns true if the task was deleted, false if it could not be deleted, null if the task does not exist
Implementation
@override
Future<bool?> deleteRequest(String requestId) async {
try {
final result = await methodChannel.invokeMethod<bool>(
'deleteRequest',
{'requestId': requestId},
);
return result;
} on PlatformException catch (e) {
// If the task is not found, return null
if (e.code == 'NOT_FOUND') {
return null;
}
rethrow;
}
}