[Fix] error: stored properties cannot be marked potentially unavailable with ‘@available’

The problem “error: stored properties cannot be marked potentially unavailable with ‘@available'” is seen when you are working on flutter on a iOS device and are trying to run the flutter_inappwebview.

Given below is the snippet of the problem “error: stored properties cannot be marked potentially unavailable with ‘@available'” :

error: stored properties cannot be marked potentially unavailable with '@available'

The problem, “error: stored properties cannot be marked potentially unavailable with ‘@available'” is seen because of recent bug into Xcode 14 beta version.

There is nothing much we can do from our side rather to wait till development team fix the issue and release the next update to fix error.

Till then there are some temporary workarounds which could work to fix the error.

To fix “error: stored properties cannot be marked potentially unavailable with ‘@available'”, you will have to edit your pubspec.yaml using the code which is appropriate for your system and update version in Podfile platform: ios, ‘14.0’, pod update && Pod install.

Steps to Fix the problem “error: stored properties cannot be marked potentially unavailable with ‘@available'”:

There is an temporary solution available wherein we have to override the pubspec.yaml with the correct code which is mentioned below:

...

dependency_overrides:
  ...
  flutter_inappwebview:
    git: https://github.com/CodeEagle/flutter_inappwebview
  ...

The issue, is a result of a development team error that occurred during the package’s development. We will have to wait till the development team releases the following update, in which they should correct the issue.

This should help you fix and understand the problem, “error: stored properties cannot be marked potentially unavailable with ‘@available'”.

Conclusion

The issue is a result of a development team error that occurred during the package’s development.

We will have to wait till the development team releases the following update, in which they should correct the problem.

Till then you will have to edit your pubspec.yaml using the code which is appropriate for your system.