I followed the Flutter official doc for Internationalization, but I haved the same problem. So, I have installed on my ide (Visual Studio Code) the plugin Flutter Intl (localizely.flutter-intl), it's available also in Android Studio.
To get the dynamic tranlsations, I haved use the ICU format type called: Select (https://support.crowdin.com/icu-message-syntax/#select).
For example:
main.dart
localizationsDelegates: [
S.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: S.delegate.supportedLocales,
init_it.arb
"gender": "{gender, select, male{Maschio} female{Femmina} other{entrambi}}",
"@gender": {
"description": "Gender type",
"placeholders": {
"gender": {}
}
}
myWidget.dart
Text(
S.of(context).gender(gender.name)
)