Fix runtime errors in catalog_gallery example #436
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Converting object to an encodable object failed: Instance of 'TextPart'
#0 _JsonStringifier.writeObject (dart:convert/json.dart:824:7)
json.dart:824
#1 _JsonStringStringifier.printOn (dart:convert/json.dart:1024:17)
json.dart:1024
#2 _JsonStringStringifier.stringify (dart:convert/json.dart:1005:5)
json.dart:1005
#3 JsonEncoder.convert (dart:convert/json.dart:353:30)
json.dart:353
#4 JsonCodec.encode (dart:convert/json.dart:238:45)
json.dart:238
#5 jsonEncode (dart:convert/json.dart:118:12)
json.dart:118
#6 _CatalogGalleryHome.build. (package:catalog_gallery/main.dart:57:28)
main.dart:57
#7 _RootZone.runUnaryGuarded (dart:async/zone.dart:1778:10)
zone.dart:1778
#8 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381:11)
stream_impl.dart:381
#9 _DelayedData.perform (dart:async/stream_impl.dart:573:14)
stream_impl.dart:573
#10 _PendingEvents.handleNext (dart:async/stream_impl.dart:678:11)
stream_impl.dart:678
#11 _PendingEvents.schedule. (dart:async/stream_impl.dart:649:7)
stream_impl.dart:649
#12 _microtaskLo<…>