appendExtension function

Map<String, List<String>> appendExtension(
  1. String postFix, {
  2. String from = '',
  3. int numCopies = 1,
})

A Builder.buildExtensions which operats on assets ending in from and creates outputs with postFix appended as the extension.

If numCopies is greater than 1 the postFix will also get a .0, .1...

Implementation

Map<String, List<String>> appendExtension(String postFix,
        {String from = '', int numCopies = 1}) =>
    {
      from: numCopies == 1
          ? ['$from$postFix']
          : List.generate(numCopies, (i) => '$from$postFix.$i')
    };