check method

  1. @override
Future<String> check({
  1. required String serverURL,
  2. required SHA sha,
  3. required List<String> allowedSHAFingerprints,
  4. Map<String, String>? headerHttp,
  5. int? timeout,
  6. required bool releaseMode,
})
override

Implementation

@override
Future<String> check({
  required String serverURL,
  required SHA sha,
  required List<String> allowedSHAFingerprints,
  Map<String, String>? headerHttp,
  int? timeout,
  required bool releaseMode
}) async {
  final Map<String, dynamic> params = <String, dynamic>{
    "url": serverURL,
    "headers": headerHttp ?? {},
    "type": sha.toString().split(".").last,
    "fingerprints":
        allowedSHAFingerprints.map((a) => a.replaceAll(":", "")).toList(),
    "timeout": timeout,
    "releaseMode" : releaseMode
  };
  String resp = await methodChannel.invokeMethod('check', params);
  return resp;
}