Marcin Szałek
Marcin Szałek

Reputation: 5069

Non-breaking space in Flutter arb file

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?

Upvotes: 2

Views: 1998

Answers (1)

Dominik Roszkowski
Dominik Roszkowski

Reputation: 2543

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

Upvotes: 6

Related Questions