From 3856629db2806216163058ef2c2489a48327c2c4 Mon Sep 17 00:00:00 2001 From: 93cgutierrez <34190481+93cgutierrez@users.noreply.github.com> Date: Mon, 31 Jan 2022 22:30:52 -0500 Subject: [PATCH] Update null safety dart Change String to String? (null) --- Flutter/cryptlib/lib/cryptlib.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Flutter/cryptlib/lib/cryptlib.dart b/Flutter/cryptlib/lib/cryptlib.dart index 9df9b51..2911b06 100644 --- a/Flutter/cryptlib/lib/cryptlib.dart +++ b/Flutter/cryptlib/lib/cryptlib.dart @@ -10,21 +10,21 @@ class Cryptlib { return version; } - static Future getEncryptedString(String key, String text) async { + static Future getEncryptedString(String key, String text) async { Map args = {}; args.putIfAbsent("key", () => key); args.putIfAbsent("text", () => text); - final String encrypted = + final String? encrypted = await _channel.invokeMethod('getEncryptedString', args); return encrypted; } - static Future getDecryptedString( + static Future getDecryptedString( String key, String encryptedText) async { Map args = {}; args.putIfAbsent("key", () => key); args.putIfAbsent("encryptedText", () => encryptedText); - final String encrypted = + final String? encrypted = await _channel.invokeMethod('getDecryptedString', args); return encrypted; }