flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

[Dart] Support for optional scalar types

Open arieroos opened this issue 1 month ago • 1 comments

It seems that optional scalar types are not supported for Dart

❯ ./flatc --dart --gen-object-api -o lib flatbuffer/*


error:
  /home/arie/Workspace/eab-solutions/Farmcon/liblink/flatbuffer/animals.fbs:12: 35: error: Optional scalars are not yet supported in at least one of the specified programming languages.

I couldn't find any reference to this in the documentation or in existing issues.

Are there any plans to support them in the future?

P.S. I am running on the latest flatc version:

❯ ./flatc --version
flatc version 25.9.23

arieroos avatar Nov 12 '25 15:11 arieroos

I manged to get it working locally for my own project. I am willing to open PR if someone else can take over and get my changes up to the quality standards.

arieroos avatar Nov 12 '25 19:11 arieroos

Hey @arieroos, I am getting the same error and wanted to use optional scalars in my project too. I won't be able to help in improving the quality standards further but could you please share the source/fork of your repo. I'd really like to see the changes and if I can use that. Thanks!

YashMakan avatar Dec 07 '25 07:12 YashMakan

@vaind poking you for awareness on this topic :)

jtdavis777 avatar Dec 13 '25 23:12 jtdavis777