Flutter WebView Checkout Page Shows Empty Cart After App Restart

I am customizing an eCommerce app built with Flutter (integrated with WooCommerce/WordPress backend). There is a persistent issue I can’t solve:

  • When a user adds a product to the cart in the app, everything works fine initially.
  • If the app is force killed or closed completely and reopened, the checkout WebView page shows an empty cart, even though the cart should still have items.
  • No errors are shown in the console or logs.
  • I have tested multiple solutions, including clearing cache, cookies, and debugging cart persistence logic, but nothing has fixed the problem.

Steps to Reproduce:

  1. Open the Flutter app.
  2. Add any product to the cart.
  3. Navigate to the checkout page (WebView).
  4. Force close the app completely.
  5. Reopen the app and go to checkout.
  6. The WebView checkout page shows an empty cart.

check the reference link