validate method

bool validate({
  1. bool value = false,
})

Validates the given boolean value.

If the value is not null, it returns the value itself. If the value is null, it returns the provided value.

Implementation

bool validate({bool value = false}) => this ?? value;