This PR swaps out getters for final strings in the generated strings.g.dart file, e.g.
- String get pages => 'Pages';
+ late final String pages = 'Pages';
Reasoning:
Might unlock some performance optimizations in the dart compiler (just speculating here)
Semantically, final fields represent that these strings don't change (in a given locale) more clearly than getters
Note that fields are marked as late final not just final to avoid an error about implicit this references:
lib/i18n/strings.g.dart:700:34: Error: Can't access 'this' in a field initializer to read '_root'.
final String a = 'Tap on the "${_root.profile.quickLinks.deleteAccount}" button above';
^^^^^
I'm interested to see what you think about this (whether it's necessary or will make any difference) since this is just speculation
Hello, slang actually had final earlier. The reason why getters are used is because hot-reloading didn't work.
You can try to update the i18n file, then generate, and then the strings should be updated.
This PR swaps out getters for final strings in the generated
strings.g.dart
file, e.g.Reasoning:
late final
not justfinal
to avoid an error about implicitthis
references:I'm interested to see what you think about this (whether it's necessary or will make any difference) since this is just speculation