瀏覽代碼

migrated key_attributes.dart to null safety

ashilkn 2 年之前
父節點
當前提交
b301302ff6
共有 2 個文件被更改,包括 16 次插入19 次删除
  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';
 
 class KeyAttributes {
@@ -71,18 +69,18 @@ class KeyAttributes {
       KeyAttributes.fromMap(json.decode(source));
 
   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(
       kekSalt ?? this.kekSalt,

+ 4 - 5
lib/ui/status_bar_widget.dart

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