Closed porfirioribeiro closed 4 years ago
Thanks for the suggestion.
I don't think I will implement this behavior since it will have to be added as an option and it will just bloat the configuration, considering that generally there should be no missing translations.
In the next couple of days I`m going to implement https://github.com/bratan/flutter_translate_gen/issues/1 which will make sure there are no missing translation keys.
Ok, i understand, for my use case i was dealing with the possibility of having a missing key and wanted to actually specify a default value. But i made a workaround in my code that fits my needs, you can close this if you feel it's the best for the project ;)
Thanks!
First of all, thanks for this nice project :)
Currently
translate('key')
returns thekey
is it didn't find a translation, but would be nice to be able to specify a default value likeOr have a function that returns
null
so we can do: