selectWidget static method

dynamic selectWidget(
  1. dynamic local,
  2. dynamic clint,
  3. dynamic store
)

Implementation

static selectWidget(local, clint, store) {
  Object? widget = Object();
  if (local is EmptyRF) {
    widget = null;
  } else if (local.runtimeType.toString().lastIndexOf('RF') > 1) {
    if (local is TextRF || local is ContainerRF || local is DrawerRF) {
      if (local?.template?.version == 'EmptyRF') {
        widget = null;
      }
    }
  }

  if (clint is EmptyRF) {
    widget = null;
  } else if (clint.runtimeType.toString().lastIndexOf('RF') > 1) {
    if (clint is TextRF || clint is ContainerRF || clint is DrawerRF) {
      if (clint?.template?.version == 'EmptyRF') {
        widget = null;
      }
    }
  }

  if (widget == null) {
    return null;
  } else {
    return local ?? clint ?? store;
  }
}