Non-breaking space in Flutter arb file

1.5k Views Asked by At

I am trying to add the non-breaking space in my arb file in Flutter app, however, I can't find any way to put the Unicode characters to the arb file.

I need something like:

{
  "@@locale": "en",
  "helloWorld": "Hello world!",
}

Is it possible to add custom characters other than \n etc to arb files?

1

There are 1 best solutions below

1
On BEST ANSWER

You should be able to use \u00A0 in arb:

  "forceUpgradeButtonText": "Hello\u00A0world",

Then in Dart app_localizations_en.dart:

  @override
  String get forceUpgradeButtonText => 'Hello world';

the character between is NO-BREAK SPACE according to this page