autoId static method

String? autoId(
  1. dynamic source, [
  2. String? key
])

Extracts and returns the auto-generated ID from the source.

Implementation

static String? autoId(dynamic source, [String? key]) {
  final data = _v(key ?? EntityKey.i.id, source);
  if (data is int || data is String) {
    return "$data";
  } else {
    return null;
  }
}