widgetSelector function Null safety

Widget widgetSelector(
  1. Object value,
  2. List<WidgetSelectorFactory> selector
)

Implementation

Widget widgetSelector(Object value, List<WidgetSelectorFactory> selector) {
  final xx = value.runtimeType;
  var builder = selector.firstWhereOrNull((item) => item.key == xx);
  return builder!.value();
}