Skip to content

Commit 7b28eff

Browse files
committed
migrated files
1 parent e8c7179 commit 7b28eff

30 files changed

+462
-454
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.4.0-nullsafety.1
2+
3+
- First version with initial support working
4+
15
## 1.4.0-nullsafety.0
26

37
- Initial support for null safety

example/lib/base64.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1212

1313
class Base64 extends StatefulWidget {
1414
const Base64({
15-
Key key,
16-
@required this.title,
17-
@required PKCS12KeyPair keyPair,
18-
}) : keyPair = keyPair,
15+
Key? key,
16+
required this.title,
17+
required PKCS12KeyPair keyPair,
18+
}) : keyPair = keyPair,
1919
super(key: key);
2020

2121
final PKCS12KeyPair keyPair;

example/lib/convert_jwt.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1313

1414
class ConvertJWT extends StatefulWidget {
1515
const ConvertJWT({
16-
Key key,
17-
@required this.title,
18-
@required PKCS12KeyPair keyPair,
19-
}) : keyPair = keyPair,
16+
Key? key,
17+
required this.title,
18+
required PKCS12KeyPair keyPair,
19+
}) : keyPair = keyPair,
2020
super(key: key);
2121

2222
final PKCS12KeyPair keyPair;

example/lib/convert_keypair.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1313

1414
class ConvertKeyPair extends StatefulWidget {
1515
const ConvertKeyPair({
16-
Key key,
17-
@required this.title,
18-
@required PKCS12KeyPair keyPair,
19-
}) : keyPair = keyPair,
16+
Key? key,
17+
required this.title,
18+
required PKCS12KeyPair keyPair,
19+
}) : keyPair = keyPair,
2020
super(key: key);
2121

2222
final PKCS12KeyPair keyPair;

example/lib/convert_private.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1313

1414
class ConvertPrivate extends StatefulWidget {
1515
const ConvertPrivate({
16-
Key key,
17-
@required this.title,
18-
@required PKCS12KeyPair keyPair,
19-
}) : keyPair = keyPair,
16+
Key? key,
17+
required this.title,
18+
required PKCS12KeyPair keyPair,
19+
}) : keyPair = keyPair,
2020
super(key: key);
2121

2222
final PKCS12KeyPair keyPair;

example/lib/convert_public.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1313

1414
class ConvertPublic extends StatefulWidget {
1515
const ConvertPublic({
16-
Key key,
17-
@required this.title,
18-
@required PKCS12KeyPair keyPair,
19-
}) : keyPair = keyPair,
16+
Key? key,
17+
required this.title,
18+
required PKCS12KeyPair keyPair,
19+
}) : keyPair = keyPair,
2020
super(key: key);
2121

2222
final PKCS12KeyPair keyPair;

example/lib/encrypt_decrypt_oaep.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1212

1313
class EncryptAndDecryptOAEP extends StatefulWidget {
1414
const EncryptAndDecryptOAEP({
15-
Key key,
16-
@required this.title,
17-
@required PKCS12KeyPair keyPair,
18-
}) : keyPair = keyPair,
15+
Key? key,
16+
required this.title,
17+
required PKCS12KeyPair keyPair,
18+
}) : keyPair = keyPair,
1919
super(key: key);
2020

2121
final PKCS12KeyPair keyPair;

example/lib/encrypt_decrypt_oaep_bytes.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1313

1414
class EncryptAndDecryptOAEPBytes extends StatefulWidget {
1515
const EncryptAndDecryptOAEPBytes({
16-
Key key,
17-
@required this.title,
18-
@required PKCS12KeyPair keyPair,
19-
}) : keyPair = keyPair,
16+
Key? key,
17+
required this.title,
18+
required PKCS12KeyPair keyPair,
19+
}) : keyPair = keyPair,
2020
super(key: key);
2121

2222
final PKCS12KeyPair keyPair;

example/lib/encrypt_decrypt_pkcs.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1212

1313
class EncryptAndDecryptPKCS extends StatefulWidget {
1414
const EncryptAndDecryptPKCS({
15-
Key key,
16-
@required this.title,
17-
@required PKCS12KeyPair keyPair,
18-
}) : keyPair = keyPair,
15+
Key? key,
16+
required this.title,
17+
required PKCS12KeyPair keyPair,
18+
}) : keyPair = keyPair,
1919
super(key: key);
2020

2121
final PKCS12KeyPair keyPair;

example/lib/encrypt_decrypt_pkcs_bytes.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1313

1414
class EncryptAndDecryptPKCSBytes extends StatefulWidget {
1515
const EncryptAndDecryptPKCSBytes({
16-
Key key,
17-
@required this.title,
18-
@required PKCS12KeyPair keyPair,
19-
}) : keyPair = keyPair,
16+
Key? key,
17+
required this.title,
18+
required PKCS12KeyPair keyPair,
19+
}) : keyPair = keyPair,
2020
super(key: key);
2121

2222
final PKCS12KeyPair keyPair;

example/lib/encrypt_sign_pkcs.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1212

1313
class SignAndVerifyPKCS extends StatefulWidget {
1414
const SignAndVerifyPKCS({
15-
Key key,
16-
@required this.title,
17-
@required PKCS12KeyPair keyPair,
18-
}) : keyPair = keyPair,
15+
Key? key,
16+
required this.title,
17+
required PKCS12KeyPair keyPair,
18+
}) : keyPair = keyPair,
1919
super(key: key);
2020

2121
final PKCS12KeyPair keyPair;

example/lib/encrypt_sign_pkcs_bytes.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1313

1414
class SignAndVerifyPKCSBytes extends StatefulWidget {
1515
const SignAndVerifyPKCSBytes({
16-
Key key,
17-
@required this.title,
18-
@required PKCS12KeyPair keyPair,
19-
}) : keyPair = keyPair,
16+
Key? key,
17+
required this.title,
18+
required PKCS12KeyPair keyPair,
19+
}) : keyPair = keyPair,
2020
super(key: key);
2121

2222
final PKCS12KeyPair keyPair;

example/lib/encrypt_sign_pss.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1212

1313
class SignAndVerifyPSS extends StatefulWidget {
1414
const SignAndVerifyPSS({
15-
Key key,
16-
@required this.title,
17-
@required PKCS12KeyPair keyPair,
18-
}) : keyPair = keyPair,
15+
Key? key,
16+
required this.title,
17+
required PKCS12KeyPair keyPair,
18+
}) : keyPair = keyPair,
1919
super(key: key);
2020

2121
final PKCS12KeyPair keyPair;

example/lib/encrypt_sign_pss_bytes.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1313

1414
class SignAndVerifyPSSBytes extends StatefulWidget {
1515
const SignAndVerifyPSSBytes({
16-
Key key,
17-
@required this.title,
18-
@required PKCS12KeyPair keyPair,
19-
}) : keyPair = keyPair,
16+
Key? key,
17+
required this.title,
18+
required PKCS12KeyPair keyPair,
19+
}) : keyPair = keyPair,
2020
super(key: key);
2121

2222
final PKCS12KeyPair keyPair;

example/lib/generate.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1111

1212
class Generate extends StatefulWidget {
1313
const Generate({
14-
Key key,
15-
@required this.title,
16-
@required PKCS12KeyPair keyPair,
17-
}) : keyPair = keyPair,
14+
Key? key,
15+
required this.title,
16+
required PKCS12KeyPair keyPair,
17+
}) : keyPair = keyPair,
1818
super(key: key);
1919

2020
final PKCS12KeyPair keyPair;

example/lib/hash.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import 'package:rsa_example/shared/title_widget.dart';
1212

1313
class Hash extends StatefulWidget {
1414
const Hash({
15-
Key key,
16-
@required this.title,
17-
@required pb.PKCS12KeyPair keyPair,
18-
}) : keyPair = keyPair,
15+
Key? key,
16+
required this.title,
17+
required pb.PKCS12KeyPair keyPair,
18+
}) : keyPair = keyPair,
1919
super(key: key);
2020

2121
final pb.PKCS12KeyPair keyPair;

example/lib/shared/button_widget.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
33

44
class ButtonWidget extends StatefulWidget {
55
const ButtonWidget({
6-
Key key,
7-
@required this.result,
8-
@required String title,
9-
@required Function onPressed,
10-
}) : onPressed = onPressed,
6+
Key? key,
7+
required this.result,
8+
required String title,
9+
required Function onPressed,
10+
}) : onPressed = onPressed,
1111
title = title,
1212
super(key: key);
1313

example/lib/shared/input_widget.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
33

44
class InputWidget extends StatefulWidget {
55
const InputWidget({
6-
Key key,
7-
@required this.result,
8-
@required String title,
9-
@required Function(TextEditingController) onPressed,
10-
}) : onPressed = onPressed,
6+
Key? key,
7+
required this.result,
8+
required String title,
9+
required Function(TextEditingController) onPressed,
10+
}) : onPressed = onPressed,
1111
title = title,
1212
super(key: key);
1313

@@ -21,7 +21,7 @@ class InputWidget extends StatefulWidget {
2121

2222
class _InputWidgetState extends State<InputWidget> {
2323
final _controller = TextEditingController();
24-
FocusNode _focusNode;
24+
FocusNode? _focusNode;
2525
bool _loading = true;
2626

2727
@override
@@ -33,7 +33,7 @@ class _InputWidgetState extends State<InputWidget> {
3333

3434
@override
3535
void dispose() {
36-
_focusNode.dispose();
36+
_focusNode!.dispose();
3737
_controller.dispose();
3838
super.dispose();
3939
}
@@ -54,7 +54,7 @@ class _InputWidgetState extends State<InputWidget> {
5454
RaisedButton(
5555
child: Text(widget.title),
5656
onPressed: () async {
57-
_focusNode.unfocus();
57+
_focusNode!.unfocus();
5858
await widget.onPressed(_controller);
5959
setState(() {
6060
_loading = false;

example/lib/shared/title_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:flutter/cupertino.dart';
33
class TitleWidget extends StatelessWidget {
44
const TitleWidget(
55
this.title, {
6-
Key key,
6+
Key? key,
77
}) : super(key: key);
88

99
final String title;

example/pubspec.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ packages:
105105
name: cupertino_icons
106106
url: "https://pub.dartlang.org"
107107
source: hosted
108-
version: "0.1.3"
108+
version: "1.0.2"
109109
fake_async:
110110
dependency: transitive
111111
description:
@@ -116,17 +116,17 @@ packages:
116116
fast_rsa:
117117
dependency: "direct dev"
118118
description:
119-
name: fast_rsa
120-
url: "https://pub.dartlang.org"
121-
source: hosted
122-
version: "1.3.3"
119+
path: ".."
120+
relative: true
121+
source: path
122+
version: "1.4.0-nullsafety.1"
123123
ffi:
124124
dependency: transitive
125125
description:
126126
name: ffi
127127
url: "https://pub.dartlang.org"
128128
source: hosted
129-
version: "0.1.3"
129+
version: "0.3.0-nullsafety.1"
130130
file:
131131
dependency: transitive
132132
description:
@@ -140,7 +140,7 @@ packages:
140140
name: fixnum
141141
url: "https://pub.dartlang.org"
142142
source: hosted
143-
version: "0.10.11"
143+
version: "1.0.0"
144144
flutter:
145145
dependency: "direct main"
146146
description: flutter
@@ -305,7 +305,7 @@ packages:
305305
name: protobuf
306306
url: "https://pub.dartlang.org"
307307
source: hosted
308-
version: "1.1.1"
308+
version: "2.0.0-nullsafety.1"
309309
pub_semver:
310310
dependency: transitive
311311
description:
@@ -480,5 +480,5 @@ packages:
480480
source: hosted
481481
version: "2.2.1"
482482
sdks:
483-
dart: ">=2.12.0-0.0 <3.0.0"
483+
dart: ">=2.12.0-259.8.beta <3.0.0"
484484
flutter: ">=1.10.0"

example/pubspec.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ description: Demonstrates how to use the rsa plugin.
33
publish_to: "none"
44

55
environment:
6-
sdk: ">=2.10.0 <3.0.0"
6+
sdk: '>=2.12.0-259.8.beta <3.0.0'
77

88
dependencies:
99
flutter:
1010
sdk: flutter
1111

1212
# The following adds the Cupertino Icons font to your application.
1313
# Use with the CupertinoIcons class for iOS style icons.
14-
cupertino_icons: ^0.1.2
14+
cupertino_icons: ^1.0.2
1515

1616
dev_dependencies:
1717
flutter_test:
@@ -20,7 +20,8 @@ dev_dependencies:
2020
sdk: flutter
2121
test: any
2222

23-
fast_rsa: ^1.3.3
23+
fast_rsa:
24+
path: ../
2425

2526
# For information on the generic Dart part of this file, see the
2627
# following page: https://dart.dev/tools/pub/pubspec

0 commit comments

Comments
 (0)