stateKeyFor static method

String stateKeyFor(
  1. Object o
)

Implementation

static String stateKeyFor(Object o) {
  if(o is AFModelWithCustomID) {
    final customSK = o.customStateId;
    if(customSK != null) {
      return customSK;
    }
  }

  if(o is AFWrapModelWithCustomID) {
    return o.id;
  }

  if(o is AFObjectWithKey) {
    return o.key;
  }

  if(o is AFRouteParam) {
    final wid = o.wid;
    if(wid == AFUIWidgetID.useScreenParam) {
      return o.screenId.toString();
    } else {
      return wid.toString();
    }
  }

  return o.runtimeType.toString();
}