gen_lang
gen_lang copied to clipboard
allow multiple parameters
I really love this package and would like to use it instead of my own hand-rolled solution, but I need to be able to pass in multiple parameters for some messages. Would it be possible to add that as an option?
Any example to present your idea?
Yes sorry fo the lack of detail. What I had in mind was being able to have thins like:
{
"messageWithMultiParams": "Hi ${yourName} its ${now} and the temperature outside is ${temp}"
}
I'm not sure about what the best function signature, ideally we could have:
S.of(context).messageWithMultiParams(yourname: 'Maks', now: '10:12am', temp: '21C');
with the named params also being marked with @required
but even just passing in a List or Map as the param would be ok.