removeDataModifiedSince method
Removes all website data of the given types that has been modified since the given date.
dataTypes represents the website data types that should be removed.
date represents a date. All website data modified after this date will be removed.
Officially Supported Platforms/Implementations:
Implementation
@override
Future<void> removeDataModifiedSince(
{required Set<WebsiteDataType> dataTypes, required DateTime date}) async {
List<String> dataTypesList = [];
for (var dataType in dataTypes) {
dataTypesList.add(dataType.toNativeValue());
}
var timestamp = date.millisecondsSinceEpoch;
Map<String, dynamic> args = <String, dynamic>{};
args.putIfAbsent("dataTypes", () => dataTypesList);
args.putIfAbsent("timestamp", () => timestamp);
await channel?.invokeMethod('removeDataModifiedSince', args);
}