JsonFixtureFactory<Model> class
abstract
This class defines the rules to create a JSON Object from a model.
- Inheritance
-
- Object
- FixtureFactory<
Model> - JsonFixtureFactory
- Implemented types
-
- JsonFixtureMaker<
Model>
- JsonFixtureMaker<
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
define(
FixtureDefinitionBuilder< Model> definition, {Faker? faker}) → FixtureDefinition<Model> -
Create a new model fixture definition.
inherited
-
defineJson(
JsonFixtureDefinitionBuilder< Model> jsonDefinition, {FixtureDefinition<Model> ? modelDefinition}) → JsonFixtureDefinition<Model> - Create a new JSON model fixture definition.
-
definition(
) → FixtureDefinition< Model> -
The default model definition.
inherited
-
jsonDefinition(
) → JsonFixtureDefinition< Model> - The default JSON model definition.
-
makeJsonArray(
int number, {bool growableList = false}) → List< Map< String, dynamic> > -
Create a JSON Array of models.
override
-
makeJsonArrayFromMany(
List< Model> objects, {bool growableList = false}) → List<Map< String, dynamic> > -
Create a JSON Array of a sequence of models.
override
-
makeJsonObject(
) → Map< String, dynamic> -
Create a JSON Object.
override
-
makeJsonObjectFromSingle(
Model object) → Map< String, dynamic> -
Create a JSON Object from a model.
override
-
makeMany(
int number, {bool growableList = false}) → List< Model> -
Create a list of models.
inherited
-
makeManyWithJsonArray(
int number, {bool growableList = false}) → List< FixtureTuple< Model> > -
Create an array of both model and its relative JSON Object.
override
-
makeSingle(
) → Model -
Create a single model.
inherited
-
makeSingleWithJsonObject(
) → FixtureTuple< Model> -
Create a tuple of model and its relative JSON Object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
redefine(
FixtureRedefinitionBuilder< Model> redefinition, {Faker? faker}) → FixtureDefinition<Model> -
Edit the default fixture definition.
inherited
-
redefineJson(
FixtureRedefinitionBuilder< Model> redefinition, {Faker? faker}) → JsonFixtureDefinition<Model> - Edit the default JSON fixture definition.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited