AndroidConfig constructor

AndroidConfig({
  1. required String? expectedPackageName,
  2. required String? expectedSigningCertificateHash,
  3. List<String>? supportedAlternativeStores = const <String>[],
})

Constructor checks whether expectedPackageName and expectedSigningCertificateHash are provided. Both arguments are MANDATORY.

Implementation

AndroidConfig(
    {required final this.expectedPackageName,
    required final this.expectedSigningCertificateHash,
    final this.supportedAlternativeStores = const <String>[]})
    : assert(
          expectedPackageName != null, 'expectedPackageName cannot be null.'),
      assert(expectedSigningCertificateHash != null,
          'expectedSigningCertificateHash cannot be null.'),
      assert(supportedAlternativeStores != null,
          'supportedAlternativeStores cannot be null.'),
      assert(_isSigningHashBase64(expectedSigningCertificateHash!),
          'expectedSigningCertificateHash is not in base64 form.'),
      assert(_isSigningHashValid(expectedSigningCertificateHash!),
          'expectedSigningCertificateHash does NOT contain SHA-256 value.');