makeManyWithJsonArray method

  1. @override
List<FixtureTuple<Model>> makeManyWithJsonArray(
  1. int number, {
  2. bool growableList = false,
})
override

Create an array of both model and its relative JSON Object.

Implementation

@override
List<FixtureTuple<Model>> makeManyWithJsonArray(
  int number, {
  bool growableList = false,
}) {
  return fixtureDefinition
      .makeMany(number)
      .asMap()
      .entries
      .map((MapEntry<int, Model> entry) {
    final Map<String, dynamic> json = jsonDefinition(entry.value, entry.key);
    return FixtureTuple(object: entry.value, json: json);
  }).toList(growable: growableList);
}