aesDecrypt function
Implementation
String aesDecrypt(String encryptedText, String key) {
final keyBytes = utf8.encode(key);
final paddedKey = Uint8List.fromList(List<int>.from(keyBytes)
..addAll(List<int>.filled(32 - keyBytes.length, 0)));
final encrypterKey = encrypt.Key(paddedKey);
final iv = encrypt.IV(Uint8List.fromList(List<int>.filled(16, 0)));
final encrypter = encrypt.Encrypter(encrypt.AES(encrypterKey));
final decrypted = encrypter
.decrypt(encrypt.Encrypted(base64.decode(encryptedText)), iv: iv);
return decrypted;
}