validate method

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

Validate given bool is not null and returns given value if null.

Implementation

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