constructPathForClassAndID static method

String constructPathForClassAndID(
  1. Type type,
  2. String id, {
  3. String? subcollection,
})

Constructs a path for a RDB object based on its type and ID.

Implementation

static String constructPathForClassAndID(Type type, String id, {String? subcollection}) {
  if (subcollection == null) {
    return "${type.toString()}/$id";
  }
  return "${type.toString()}:$subcollection/$id";
}