Open eseidel opened 1 year ago
For example (and maybe this is a separate issue?) Is this the shortest way to write (value) => value.toJson()
?
var toJson = Method((m) => m
..requiredParameters.add(Parameter((p) => p.name = 'value'))
..body = refer('value').property('toJson').call([]).code).closure;
I guess var toJson = Code('(value) => value.toJson()');
is the right way. :)
AFAICT, the shortest way to add (foo) to your parameter list is
Parameter((b) => b..name = 'foo'
, feels like there could be something shorter? Maybe there is an I just didn't find it in the code?