Seeking Advice on Non-blocking AES-CBC Decryption in Flutter Web App

Custom Code

Hi everyone,

I'm working on a Flutter web app where I need to decrypt JSON data sent from an API using the AES-CBC algorithm. I've implemented a custom action to handle the decryption on the client side. The decryption works correctly, but I'm facing an issue where it blocks the UI thread, causing delays in displaying the results.

What have you tried so far?

What I've Tried

  1. Async/Await: Used async/await to handle the decryption process asynchronously.

  2. Future Delays: Introduced delays using Future.delayed to manage execution.

  3. Dart Isolates: Considered using Dart isolates as suggested in the Flutter documentation. However, Dart isolates are not supported for Flutter web apps.

  4. Loading Indicator: Tried showing a loader until the decryption completes, but the loader freezes before the results are displayed.

Despite these approaches, the UI still freezes and then eventually shows the results after some time.

Did you check FlutterFlow's Documentation for this topic?
Yes
1