Skip to content

Commit 3656276

Browse files
authored
Upgrade flutter_lints (#96)
* Upgrade flutter_lints * Replace `part of <library>` with `part of '<file>.dart'` * Avoid using deprecated property * Avoid `Pointer.elementAt` in favor of + operator
1 parent de8dbd9 commit 3656276

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+52
-53
lines changed

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ packages:
490490
path: ".."
491491
relative: true
492492
source: path
493-
version: "0.5.4"
493+
version: "0.5.5"
494494
webdriver:
495495
dependency: transitive
496496
description:

lib/src/flutter/webcrypto_plugin.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class WebcryptoPlugin {
3838
final channel = MethodChannel(
3939
'plugins.flutter.io/webcrypto',
4040
const StandardMethodCodec(),
41-
registrar.messenger,
41+
registrar,
4242
);
4343
final instance = WebcryptoPlugin();
4444
channel.setMethodCallHandler(instance.handleMethodCall);

lib/src/impl_ffi/impl_ffi.aes_common.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
part of impl_ffi;
15+
part of 'impl_ffi.dart';
1616

1717
Uint8List _aesImportRawKey(List<int> keyData) {
1818
if (keyData.length == 24) {

lib/src/impl_ffi/impl_ffi.aescbc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
// ignore_for_file: non_constant_identifier_names
1616

17-
part of impl_ffi;
17+
part of 'impl_ffi.dart';
1818

1919
Future<AesCbcSecretKey> aesCbc_importRawKey(List<int> keyData) async =>
2020
_AesCbcSecretKey(_aesImportRawKey(keyData));

lib/src/impl_ffi/impl_ffi.aesctr.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
// ignore_for_file: non_constant_identifier_names
1616

17-
part of impl_ffi;
17+
part of 'impl_ffi.dart';
1818

1919
Future<AesCtrSecretKey> aesCtr_importRawKey(List<int> keyData) async =>
2020
_AesCtrSecretKey(_aesImportRawKey(keyData));

lib/src/impl_ffi/impl_ffi.aesgcm.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
// ignore_for_file: non_constant_identifier_names
1616

17-
part of impl_ffi;
17+
part of 'impl_ffi.dart';
1818

1919
Future<AesGcmSecretKey> aesGcm_importRawKey(List<int> keyData) async =>
2020
_AesGcmSecretKey(_aesImportRawKey(keyData));

lib/src/impl_ffi/impl_ffi.digest.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
part of impl_ffi;
15+
part of 'impl_ffi.dart';
1616

1717
abstract class _Hash implements Hash {
1818
const _Hash();

lib/src/impl_ffi/impl_ffi.ec_common.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
part of impl_ffi;
15+
part of 'impl_ffi.dart';
1616

1717
/// Get `ssl.NID_...` from BoringSSL matching the given [curve].
1818
int _ecCurveToNID(EllipticCurve curve) {

lib/src/impl_ffi/impl_ffi.ecdh.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
// ignore_for_file: non_constant_identifier_names
1616

17-
part of impl_ffi;
17+
part of 'impl_ffi.dart';
1818

1919
Future<EcdhPrivateKey> ecdhPrivateKey_importPkcs8Key(
2020
List<int> keyData,

lib/src/impl_ffi/impl_ffi.ecdsa.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
// ignore_for_file: non_constant_identifier_names
1616

17-
part of impl_ffi;
17+
part of 'impl_ffi.dart';
1818

1919
/// Get valid value for `jwk.alg` property given an [EllipticCurve] for ECDSA.
2020
String _ecdsaCurveToJwkAlg(EllipticCurve curve) {
@@ -116,11 +116,11 @@ Uint8List _convertEcdsaDerSignatureToWebCryptoSignature(
116116
// Dump R and S to return value.
117117
final out = scope<ffi.Uint8>(N * 2);
118118
_checkOpIsOne(
119-
ssl.BN_bn2bin_padded(out.elementAt(0), N, R.value),
119+
ssl.BN_bn2bin_padded(out + 0, N, R.value),
120120
fallback: 'internal error formatting R in signature',
121121
);
122122
_checkOpIsOne(
123-
ssl.BN_bn2bin_padded(out.elementAt(N), N, S.value),
123+
ssl.BN_bn2bin_padded(out + N, N, S.value),
124124
fallback: 'internal error formatting S in signature',
125125
);
126126
return out.copy(N * 2);
@@ -163,11 +163,11 @@ Uint8List? _convertEcdsaWebCryptoSignatureToDerSignature(
163163

164164
final psig = scope.dataAsPointer<ffi.Uint8>(signature);
165165
_checkOp(
166-
ssl.BN_bin2bn(psig.elementAt(0), N, R.value).address != 0,
166+
ssl.BN_bin2bn(psig + 0, N, R.value).address != 0,
167167
fallback: 'allocation failure',
168168
);
169169
_checkOp(
170-
ssl.BN_bin2bn(psig.elementAt(N), N, S.value).address != 0,
170+
ssl.BN_bin2bn(psig + N, N, S.value).address != 0,
171171
fallback: 'allocation failure',
172172
);
173173

0 commit comments

Comments
 (0)