fromPatternToHex method

String fromPatternToHex (
  1. List pattern
)

Generates a random set of numbers from the given pattern. Returns this pattern as hex.

Example:

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

Implementation

String fromPatternToHex(List pattern) => element(pattern).splitMapJoin('#',
    onMatch: (_) =>
        numbers(16, 1).map((number) => number.toRadixString(16)).join());