Quellcode durchsuchen

migrated key_attributes.dart to null safety

ashilkn vor 2 Jahren
Ursprung
Commit
b301302ff6
2 geänderte Dateien mit 16 neuen und 19 gelöschten Zeilen
  1. 12 14
      lib/models/key_attributes.dart
  2. 4 5
      lib/ui/status_bar_widget.dart

+ 12 - 14
lib/models/key_attributes.dart

@@ -1,5 +1,3 @@
-// @dart=2.9
-
 import 'dart:convert';
 import 'dart:convert';
 
 
 class KeyAttributes {
 class KeyAttributes {
@@ -71,18 +69,18 @@ class KeyAttributes {
       KeyAttributes.fromMap(json.decode(source));
       KeyAttributes.fromMap(json.decode(source));
 
 
   KeyAttributes copyWith({
   KeyAttributes copyWith({
-    String kekSalt,
-    String encryptedKey,
-    String keyDecryptionNonce,
-    String publicKey,
-    String encryptedSecretKey,
-    String secretKeyDecryptionNonce,
-    int memLimit,
-    int opsLimit,
-    String masterKeyEncryptedWithRecoveryKey,
-    String masterKeyDecryptionNonce,
-    String recoveryKeyEncryptedWithMasterKey,
-    String recoveryKeyDecryptionNonce,
+    String? kekSalt,
+    String? encryptedKey,
+    String? keyDecryptionNonce,
+    String? publicKey,
+    String? encryptedSecretKey,
+    String? secretKeyDecryptionNonce,
+    int? memLimit,
+    int? opsLimit,
+    String? masterKeyEncryptedWithRecoveryKey,
+    String? masterKeyDecryptionNonce,
+    String? recoveryKeyEncryptedWithMasterKey,
+    String? recoveryKeyDecryptionNonce,
   }) {
   }) {
     return KeyAttributes(
     return KeyAttributes(
       kekSalt ?? this.kekSalt,
       kekSalt ?? this.kekSalt,

+ 4 - 5
lib/ui/status_bar_widget.dart

@@ -85,11 +85,10 @@ class _StatusBarWidgetState extends State<StatusBarWidget> {
               right: 0,
               right: 0,
               top: 0,
               top: 0,
               child: Container(
               child: Container(
-                      color:
-                          Theme.of(context).colorScheme.defaultBackgroundColor,
-                      height: kContainerHeight,
-                      child: const SearchIconWidget(),
-                    ),
+                color: Theme.of(context).colorScheme.defaultBackgroundColor,
+                height: kContainerHeight,
+                child: const SearchIconWidget(),
+              ),
             ),
             ),
           ],
           ],
         ),
         ),