match static method

String? Function(String?) match(
  1. String other, {
  2. String message = 'Values do not match',
})

Validates two values match (e.g. confirm password).

Implementation

static String? Function(String?) match(String other,
        {String message = 'Values do not match'}) =>
    (String? value) => value == other ? null : message;