Open
Description
@jonasfj suggested that we should check the SDK constraint for the package we're generating to and give an error if we generate dart:ffi
code that does not work on the oldest version.
- Unions should only work for SDK constraint 2.14 and higher.
- Packed structs and inline arrays should only work for SDK constraint 2.13 and higher.
- etc.
Then we tell our users to bump their SDK version to the one that the generated code will work for so that they don't accidentally upload code to pub which contains dart:ffi
constructs that will only work on the latest stable release while their pubspec says it would work on older stable releases.