Skip to content

Commit

Permalink
improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-virkus committed Nov 2, 2020
1 parent 3fba71f commit 624af07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -103,7 +103,7 @@ If you have a non-generic list, you define a corresponding function in the `list
listCreators['articles'] = () => <Article>[];
```
When you have nested objects, register a creation function in the `objectCreators` field. This function
receives a `Map<String,dynamic>` with the values of the nested child object. If needed, you can evaluate
receives a `Map<String,dynamic>` parameter with the values of the nested child object. If needed, you can evaluate
these values to determine which kind of object you need to create:
```dart
// simple:
Expand All @@ -124,6 +124,8 @@ objectCreators['articles'] = (map) {

Here's a complete example with nested objects and complex list elements:
```dart
enum ArticleArea { electronics, music }
class Article extends SerializableObject {
Article() {
transformers['area'] = (value) =>
Expand Down

0 comments on commit 624af07

Please sign in to comment.