signFile method
Future<SuccessSign>
signFile({
- required File file,
- required Certificate certificate,
- required String password,
- required CAdESFormat format,
- bool isDetached = true,
- bool disableOnlineValidation = false,
- String? tsaUrl,
- String? storageName,
override
Подписать файл
Implementation
@override
Future<SuccessSign> signFile({
required File file,
required Certificate certificate,
required String password,
required CAdESFormat format,
bool isDetached = true,
bool disableOnlineValidation = false,
String? tsaUrl,
String? storageName,
}) async {
return callWithHandler(() async {
String response = await methodChannel.invokeMethod(
"signFile",
{
"path": file.path,
"alias": certificate.alias,
"password": password,
"isDetached": isDetached,
"disableOnlineValidation": disableOnlineValidation,
"format": format.name,
"tsaUrl": tsaUrl,
"storageName": storageName,
},
);
Map<String, dynamic> map = json.decode(response);
return SuccessSign.fromMap(map);
});
}