flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Dart: Support for advanced union features

Open fatduckling opened this issue 3 months ago • 0 comments

Hi Thanks for the great library. Just a suggestion if we can support advanced union features in Dart?


bool Parser::SupportsAdvancedUnionFeatures() const {
  return (opts.lang_to_generate &
          ~(IDLOptions::kCpp | IDLOptions::kTs | IDLOptions::kPhp |
            IDLOptions::kJava | IDLOptions::kCSharp | IDLOptions::kKotlin |
            IDLOptions::kBinary | IDLOptions::kSwift | IDLOptions::kNim |
            IDLOptions::kJson | IDLOptions::kKotlinKmp)) == 0;
}

    if (!SupportsAdvancedUnionFeatures()) {
      return Error(
          "Vectors of unions are not yet supported in at least one of "
          "the specified programming languages.");
    }

EDIT: I just found #6899 which was closed as it's not planned. Any chance we can consider this again? It'll be helpful for those using Flutter/Dart in the frontend and Java as the backend, which is extremely common with enterprise apps.

Thanks

fatduckling avatar Sep 17 '25 12:09 fatduckling