regCon<Model extends Pub> method

void regCon<Model extends Pub>(
  1. Object o,
  2. CreatorFn<Model> con
)

Add a create method to the conMap with the key:o.

Implementation

void regCon<Model extends Pub>(Object o, CreatorFn<Model> con) {
  assert(ifModelTypeCorrect(Model, 'regCon'));
  assert(shouldNull(_conMap[o], 'regCon: Duplicate key, conMap[$o]'));

  _conMap[o] = con;
}