getString static method

String getString(
  1. int stringId, {
  2. bool useDefaultString = false,
})

Text-to-speech localization service used to retrieve localized strings for voice synthesis.

Methods on this class return strings localized according to the current SdkSettings.getVoice language/voice settings. These strings are intended for text-to-speech output and may differ from UI strings where a voice- specific variant exists.

Also see:

{@category Core}

Implementation

static String getString(final int stringId, {bool useDefaultString = false}) {
  final OperationResult resultString = staticMethod(
    'TTSLocalization',
    'getString',
    args: <String, Object>{
      'stringId': stringId,
      'useDefaultString': useDefaultString,
    },
  );

  return resultString['result'];
}