widgetExpr property Null safety

WidgetExpr? widgetExpr

Try to turn this expression into a WidgetExpr.

Implementation

WidgetExpr? get widgetExpr {
  if (this is WidgetExpr) {
    return this as WidgetExpr;
  } else if (this is EvaluatedListExpr) {
    return (this as EvaluatedListExpr)[0].widgetExpr;
  } else {
    return null;
  }
}