Skip to content

Glossary: Flutter

factory constructor

Also written: fromJson, toJson

A constructor that builds an object some other way. `Product.fromJson` builds a `Product` from a JSON map, and `toJson` goes the other way.

Where the book teaches it

Related terms

JSONas (cast)