fromPattern method

String fromPattern (
  1. List pattern
)

Generates a random set of numbers from the given pattern.

Example:

  fromPattern(['#####', '#####-####']);

Implementation

String fromPattern(List pattern) =>
    element(pattern).splitMapJoin('#', onMatch: (_) => numbers(9, 1).join());