Skip to content

Conversation

@jacksonrl
Copy link

@jacksonrl jacksonrl commented Dec 9, 2025

Fixes #2784. Until now I was (unknowingly) using an old version that already supported this:

(old bindings)
final class WGPUVertexAttribute extends ffi.Struct {
  external ffi.Pointer<WGPUChainedStruct> nextInChain;

  @ffi.Int32()
  external int format;

  @ffi.Uint64()
  external int offset;

  @ffi.Uint32()
  external int shaderLocation;
}

This adds support for directly setting an enum without having to use enumAsInt.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Note: The Dart team is trialing Gemini Code Assist. Don't take its comments as final Dart team feedback. Use the suggestions if they're helpful; otherwise, wait for a human reviewer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Structs are missing setters for dart-style enum members

1 participant