validate method

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

Returns the current value if it is not null; otherwise returns value.

This method acts as the foundation for all nullable boolean operations.

Example: `dart bool? flag = null;

flag.validate(); // false flag.validate(value: true); // true `

Implementation

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