Description
Currently config.codeConfig
(or renamed to be config.code
) returns a CodeConfig
object which no longer has access to the underlying JSON.
native/pkgs/native_assets_cli/lib/src/code_assets/config.dart
Lines 24 to 26 in 9596c1f
This makes it impossible for Flutter to extend the code config (#1836). We should consider fully leaning in to extensibility so that Flutter can introduce a config.codeConfig.flutterConfig
.
Some ideas:
- Have all
XxxConfig
classes have a.json
as escape hatch that gives access to the root JSON or nested JSON - Have all
.xxxConfig
return an extension type around the root JSON rather than a class with the syntactically parsed fields.
Since we want the JSON format to be extensible, we should make it extensible not only at the root but also in nested keys. And for the Dart code belonging to those extensions to be able to provide extensions to those APIs they need to be able to access the JSON from the API object.
cc @mkustermann
Metadata
Metadata
Assignees
Type
Projects
Status