Ok, maybe the question is not very precise. But, I figured out that the only way to have something similar to Android's <string-array> for translation in Flutter is to use select. For instance,
"pronoun": "{gender, select, male{he} female{she} other{they}}",
"@pronoun": {
"description": "A gendered message",
"placeholders": {
"gender": {
"type": "String"
}
}
}
Now, how can I get the array of keys that are used in creating this definition? In the upper case, the answer should be [male, female, other].
If you look at the generated code in your localization language specific file (i.e.
localization_en.dart), you will see the following:Since the map is generated and stored directly in the method. Without any further research on my part: you have no external way of getting it.
Unless there is a localization specific builder option to generate it (look up the docs), then the above holds true.