Not sure how performance critical this is, but would something like the following be faster?

```dart
var argsCache = const ["", "a0", "a0, a1", "a0, a1, a2", "a0, a1, a2, a3", "a0, a1, a2, a3, a4", "a0, a1, a2, a3, a4, a5"];

assert(i < args.length);

var args = argsCache[i];
var p = args.isEmpty ? '' : ',$args';

var lines = new StringBuffer(names.map((name) => 'r"$name": (o$p) => o.$name($args)'), ",\n    ").toString();
maps.add('{\n    $lines\n  }');
```