getStrings static method
Retrieves multiple localized strings for the given list of stringIds.
If useDefaultString is true and a string ID is not available for the
currently selected TTS voice/language, the default string (English) will
be returned instead of an empty string. If a string ID does not exist,
an empty string is returned for that ID.
Parameters
stringIds: A list of string IDs to retrieve.useDefaultString: Whether to return the default string if an ID is not found for the current voice/language.
Returns
A list of localized strings corresponding to the given stringIds.
Also see:
- getString - Retrieve a single localized TTS string.
- SdkSettings.getVoice - Current voice/language setting used by TTS.
Implementation
static List<String> getStrings(
final List<int> stringIds, {
bool useDefaultString = false,
}) {
final OperationResult resultString = staticMethod(
'TTSLocalization',
'getStrings',
args: <String, Object>{
'stringIds': stringIds,
'useDefaultString': useDefaultString,
},
);
return List<String>.from(resultString['result']);
}