Skip to content

Commit

Permalink
Merge pull request #26 from rosera/tastethedream-patch-24
Browse files Browse the repository at this point in the history
Create ex5.7.md
  • Loading branch information
rosera authored Dec 15, 2022
2 parents 65088ed + ebbefa7 commit 3b0810c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ch05/ex5.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Printing Complex Data Types

## Example

```dart
import 'dart:convert';
void main() {
// Create JSON value
Map<String, dynamic> data = {
jsonEncode('title'): json.encode('Star Wars'),
jsonEncode('year'): json.encode(1979)
};
// Decode the JSON
Map<String, dynamic> items = json.decode(data.toString());
print(items);
print(items['title']);
print("This is the title: $items['title']");
print('This is the title: ${items['title']}');
}
```

0 comments on commit 3b0810c

Please sign in to comment.