divisibleBy method Null safety

String? divisibleBy(
  1. String? value,
  2. {String? message,
  3. required int divisor}
)

Checks if the value is divisible by a given divisor

Implementation

static String? divisibleBy(String? value, {String? message, required int divisor}) =>
    value == null || value.isEmpty || validations.isDivisibleBy(value, divisor)
        ? null
        : message ?? 'Please enter a valid number that is divisible by $divisor';