generateKey<T extends Object?> static method

dynamic generateKey<T extends Object?>([
  1. String? id
])

It generates a unique key for a given object T and optional id

Implementation

static generateKey<T extends Object?>([String? id]) {
  return "${T.hashCode}${id != null ? '[$id]' : ''}";
}