collectReferences method

  1. @override
Future<List<ModelReference>> collectReferences({
  1. String? appId,
})
override

Implementation

@override
Future<List<ModelReference>> collectReferences({String? appId}) async {
  List<ModelReference> referencesCollector = [];
  if (customer != null) {
    referencesCollector.add(
        ModelReference(MemberModel.packageName, MemberModel.id, customer!));
  }
  if (customer != null) {
    referencesCollector
        .addAll(await customer!.collectReferences(appId: appId));
  }
  if (products != null) {
    for (var item in products!) {
      referencesCollector.addAll(await item.collectReferences(appId: appId));
    }
  }
  return referencesCollector;
}