validate method

Widget validate({
  1. Widget value = const SizedBox(),
})

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

Implementation

Widget validate({Widget value = const SizedBox()}) => this ?? value;