Skip to content

Commit 61a0471

Browse files
committed
fmt
1 parent 777acdb commit 61a0471

21 files changed

+34
-29
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ default: test
33
test:
44
cd example && flutter test integration_test/app_test.dart
55

6+
fmt:
7+
dart format . && dart fix --apply
8+
cd example && dart format . && dart fix --apply
9+
610
upgrade: upgrade-libs upgrade-flatbuffers
711

812
upgrade-libs:

example/lib/base64.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Base64 extends StatefulWidget {
99
super.key,
1010
required this.title,
1111
required PKCS12KeyPair keyPair,
12-
}) : keyPair = keyPair;
12+
}) : keyPair = keyPair;
1313

1414
final PKCS12KeyPair keyPair;
1515
final String title;

example/lib/convert_jwt.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class ConvertJWT extends StatefulWidget {
99
super.key,
1010
required this.title,
1111
required PKCS12KeyPair keyPair,
12-
}) : keyPair = keyPair;
12+
}) : keyPair = keyPair;
1313

1414
final PKCS12KeyPair keyPair;
1515
final String title;

example/lib/convert_keypair.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class ConvertKeyPair extends StatefulWidget {
1010
super.key,
1111
required this.title,
1212
required PKCS12KeyPair keyPair,
13-
}) : keyPair = keyPair;
13+
}) : keyPair = keyPair;
1414

1515
final PKCS12KeyPair keyPair;
1616
final String title;

example/lib/convert_private.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ConvertPrivate extends StatefulWidget {
1111
super.key,
1212
required this.title,
1313
required PKCS12KeyPair keyPair,
14-
}) : keyPair = keyPair;
14+
}) : keyPair = keyPair;
1515

1616
final PKCS12KeyPair keyPair;
1717
final String title;

example/lib/convert_public.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ConvertPublic extends StatefulWidget {
1111
super.key,
1212
required this.title,
1313
required PKCS12KeyPair keyPair,
14-
}) : keyPair = keyPair;
14+
}) : keyPair = keyPair;
1515

1616
final PKCS12KeyPair keyPair;
1717
final String title;

example/lib/encrypt_decrypt_oaep.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class EncryptAndDecryptOAEP extends StatefulWidget {
1010
super.key,
1111
required this.title,
1212
required PKCS12KeyPair keyPair,
13-
}) : keyPair = keyPair;
13+
}) : keyPair = keyPair;
1414

1515
final PKCS12KeyPair keyPair;
1616
final String title;

example/lib/encrypt_decrypt_oaep_bytes.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class EncryptAndDecryptOAEPBytes extends StatefulWidget {
1313
super.key,
1414
required this.title,
1515
required PKCS12KeyPair keyPair,
16-
}) : keyPair = keyPair;
16+
}) : keyPair = keyPair;
1717

1818
final PKCS12KeyPair keyPair;
1919
final String title;

example/lib/encrypt_decrypt_pkcs.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class EncryptAndDecryptPKCS extends StatefulWidget {
1010
super.key,
1111
required this.title,
1212
required PKCS12KeyPair keyPair,
13-
}) : keyPair = keyPair;
13+
}) : keyPair = keyPair;
1414

1515
final PKCS12KeyPair keyPair;
1616
final String title;

example/lib/encrypt_decrypt_pkcs_bytes.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class EncryptAndDecryptPKCSBytes extends StatefulWidget {
1313
super.key,
1414
required this.title,
1515
required PKCS12KeyPair keyPair,
16-
}) : keyPair = keyPair;
16+
}) : keyPair = keyPair;
1717

1818
final PKCS12KeyPair keyPair;
1919
final String title;

example/lib/encrypt_sign_pkcs.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class SignAndVerifyPKCS extends StatefulWidget {
1010
super.key,
1111
required this.title,
1212
required PKCS12KeyPair keyPair,
13-
}) : keyPair = keyPair;
13+
}) : keyPair = keyPair;
1414

1515
final PKCS12KeyPair keyPair;
1616
final String title;

example/lib/encrypt_sign_pkcs_bytes.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class SignAndVerifyPKCSBytes extends StatefulWidget {
1313
super.key,
1414
required this.title,
1515
required PKCS12KeyPair keyPair,
16-
}) : keyPair = keyPair;
16+
}) : keyPair = keyPair;
1717

1818
final PKCS12KeyPair keyPair;
1919
final String title;

example/lib/encrypt_sign_pss.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class SignAndVerifyPSS extends StatefulWidget {
1010
super.key,
1111
required this.title,
1212
required PKCS12KeyPair keyPair,
13-
}) : keyPair = keyPair;
13+
}) : keyPair = keyPair;
1414

1515
final PKCS12KeyPair keyPair;
1616
final String title;

example/lib/encrypt_sign_pss_bytes.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class SignAndVerifyPSSBytes extends StatefulWidget {
1313
super.key,
1414
required this.title,
1515
required PKCS12KeyPair keyPair,
16-
}) : keyPair = keyPair;
16+
}) : keyPair = keyPair;
1717

1818
final PKCS12KeyPair keyPair;
1919
final String title;

example/lib/generate.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Generate extends StatefulWidget {
99
super.key,
1010
required this.title,
1111
required PKCS12KeyPair keyPair,
12-
}) : keyPair = keyPair;
12+
}) : keyPair = keyPair;
1313

1414
final PKCS12KeyPair keyPair;
1515
final String title;

example/lib/hash.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class HashExample extends StatefulWidget {
88
super.key,
99
required this.title,
1010
required PKCS12KeyPair keyPair,
11-
}) : keyPair = keyPair;
11+
}) : keyPair = keyPair;
1212

1313
final PKCS12KeyPair keyPair;
1414
final String title;

example/pubspec.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ packages:
155155
dependency: "direct dev"
156156
description:
157157
name: flutter_lints
158-
sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
158+
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
159159
url: "https://pub.dev"
160160
source: hosted
161-
version: "4.0.0"
161+
version: "5.0.0"
162162
flutter_test:
163163
dependency: "direct dev"
164164
description: flutter
@@ -255,10 +255,10 @@ packages:
255255
dependency: transitive
256256
description:
257257
name: lints
258-
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
258+
sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413"
259259
url: "https://pub.dev"
260260
source: hosted
261-
version: "4.0.0"
261+
version: "5.0.0"
262262
logging:
263263
dependency: transitive
264264
description:

example/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dev_dependencies:
4040
# activated in the `analysis_options.yaml` file located at the root of your
4141
# package. See that file for information about deactivating specific lint
4242
# rules and activating additional ones.
43-
flutter_lints: ^4.0.0
43+
flutter_lints: ^5.0.0
4444

4545
test: any
4646

lib/fast_rsa.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class PKCS12KeyPair {
4040
}
4141

4242
class RSA {
43-
static const MethodChannel _channel = const MethodChannel('fast_rsa');
43+
static const MethodChannel _channel = MethodChannel('fast_rsa');
4444
static bool bindingEnabled = Binding().isSupported();
4545

4646
static Future<Uint8List> _call(String name, Uint8List payload) async {
@@ -55,7 +55,7 @@ class RSA {
5555
var data = await _call(name, payload);
5656
var response = model.BytesResponse(data);
5757
if (response.error != null && response.error != "") {
58-
throw new RSAException(response.error!);
58+
throw RSAException(response.error!);
5959
}
6060
return Uint8List.fromList(response.output!);
6161
}
@@ -64,7 +64,7 @@ class RSA {
6464
var data = await _call(name, payload);
6565
var response = model.StringResponse(data);
6666
if (response.error != null && response.error != "") {
67-
throw new RSAException(response.error!);
67+
throw RSAException(response.error!);
6868
}
6969
return response.output!;
7070
}
@@ -73,7 +73,7 @@ class RSA {
7373
var data = await _call(name, payload);
7474
var response = model.BoolResponse(data);
7575
if (response.error != null && response.error != "") {
76-
throw new RSAException(response.error!);
76+
throw RSAException(response.error!);
7777
}
7878
return response.output;
7979
}
@@ -83,7 +83,7 @@ class RSA {
8383
var data = await _call(name, payload);
8484
var response = model.KeyPairResponse(data);
8585
if (response.error != null && response.error != "") {
86-
throw new RSAException(response.error!);
86+
throw RSAException(response.error!);
8787
}
8888
var output = response.output!;
8989
return KeyPair(output.publicKey!, output.privateKey!);
@@ -94,7 +94,7 @@ class RSA {
9494
var data = await _call(name, payload);
9595
var response = model.Pkcs12KeyPairResponse(data);
9696
if (response.error != null && response.error != "") {
97-
throw new RSAException(response.error!);
97+
throw RSAException(response.error!);
9898
}
9999
var output = response.output!;
100100
return PKCS12KeyPair(

lib/web/rsa_web.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class FastRsaPlugin {
2929
}
3030

3131
void listen() async {
32-
void _onMessage(Event event) {
32+
void onMessage(Event event) {
3333
final msgEvent = event as MessageEvent;
3434
final data = msgEvent.data as RsaResponse;
3535
var completer = completers[data.id];
@@ -44,14 +44,14 @@ class FastRsaPlugin {
4444
completers.remove(data.id);
4545
}
4646

47-
worker.onmessage = _onMessage.toJS;
47+
worker.onmessage = onMessage.toJS;
4848
// worker.addEventListener('message', _onMessage.toJS);
4949
}
5050

5151
Future<Uint8List> bridgeCall(String name, Uint8List? /*!*/ request) async {
5252
_counter++;
5353
var id = _counter.toString();
54-
var completer = new Completer<Uint8List>();
54+
var completer = Completer<Uint8List>();
5555
completers[id] = completer;
5656
worker.postMessage(RsaRequest(
5757
id: id,

pubspec.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dependencies:
2020
path: ^1.9.0
2121
web: ">=0.5.0 <2.0.0"
2222
plugin_platform_interface: ^2.0.2
23+
flutter_lints: ^5.0.0
2324

2425
dev_dependencies:
2526
flutter_test:

0 commit comments

Comments
 (0)