如何在发布模式下解决Flutter问题?

时间:2020-10-27 10:39:24

标签: android flutter dart woocommerce

我的应用程序在调试模式下可以正常工作,但是当我释放它时,屏幕上什么都没有显示。我正在使用woocommerce插件来获取数据。

我尝试了不同版本的不同软件包,我不知道我是否尝试了足够,但是我确实需要帮助,我在Android Studio和Vs Code Studio上进行了测试,但是得到的错误是相同的。

这些是日志。

screen

flutter run --release
No supported devices connected.
PS C:\Users\emili\OneDrive\Documentos\Flutter Proj\ecommerce> flutter run --release
Running "flutter pub get" in ecommerce...                          27.8s
Launching lib\main.dart on SM J610FN in release mode...
Parameter format not correct -
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_secure_storage-3.3.5\android\src\main\java\com\it_nomads\fluttersecurestorage\ciphers\RSACipher18Implementation.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Running Gradle task 'assembleRelease'...

Running Gradle task 'assembleRelease'... Done                     163.3s (!)
√ Built build\app\outputs\flutter-apk\app-release.apk (9.3MB).
Installing build\app\outputs\flutter-apk\app.apk...                14.1s

Flutter run key commands.
h Repeat this help message.
c Clear the screen
q Quit (terminate the application on the device).
I/flutter ( 7256): Parameters: {page: 1, per_page: 50, status: publish, stock_status: instock}
I/flutter ( 7256): 
I/flutter ( 7256): Another exception was thrown: Instance of 'DiagnosticsProperty<void>'
I/flutter ( 7256): Another exception was thrown: Instance of 'DiagnosticsProperty<void>'
I/flutter ( 7256): response gotten : [{id: 8025, name: Aqua Loft Single Lever Bathroom Vanity Faucet with Side Handle - Matte Black, slug: aqua-loft-single-lever-bathroom-vanity-faucet-with-side-handle-matte-black, permalink: https://www.kubebath.com/product/aqua-loft-single-lever-bathroom-vanity-faucet-with-side-handle-matte-black/, date_created: 2020-10-23T16:30:38, date_created_gmt: 2020-10-23T16:30:38, 
date_modified: 2020-10-23T16:35:39, date_modified_gmt: 2020-10-23T16:35:39, type: simple, status: publish, featured: false, catalog_visibility: visible, description: <h2 class="subtitle">PRODUCT DESCRIPTION</h2>
I/flutter ( 7256): <div class="ProductDescriptionContainer prodAccordionContent">
I/flutter ( 7256): <div>This single hole faucet is made from heavy duty brass with a matte black finish. Features ceramic disc valve for longevity and watertight functionality.</div>
I/flutter ( 7256): <p><strong>Included in the price:</strong></p>
I/flutter ( 7256): <p>• Single Lever Matte Black Faucet<br />
I/flutter ( 7256): • Extra Two Handles in Color Gold and Red.<br />
I/flutter ( 7256): • Flex Water Hoses Included for easy installatio
I/flutter ( 7256): this is query oo : products?page=1&per_page=50&status=publish&stock_status=instock
I/flutter ( 7256): prod gotten here : Aqua Loft Single Lever Bathroom Vanity Faucet with Side Handle - Matte Black
I/flutter ( 7256): prod gotten here : Aqua Loft Single Lever Bathroom Vanity Faucet with Side Handle - Chrome     
I/flutter ( 7256): prod gotten here : Aqua Loft Single Lever Bathroom Vanity Faucet - Chrome
I/flutter ( 7256): prod gotten here : Aqua Loft Single Lever Bathroom Vanity Faucet - Matte Black
I/flutter ( 7256): prod gotten here : Aqua Elegance Single Lever Wide Spread Faucet - Matte Black
I/flutter ( 7256): prod gotten here : Vetro 30" Gloss White Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Vetro 36" Gloss White Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Vetro 48" Gloss White Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Vetro 60" Gloss White Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Vetro 60" Gloss Blue Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Vetro 48" Gloss Blue Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Vetro 36" Gloss Blue Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Vetro 30" Gloss Blue Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Divani 24" Gloss White Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Divani 30" Gloss White Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Divani 36" Gloss White Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Divani 48" Gloss White Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Divani 60" Gloss White Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Divani 60" Gloss Blue Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Divani 48" Gloss Blue Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Divani 36" Gloss Blue Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Divani 30" Gloss Blue Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Divani 24" Gloss Blue Vanity W/ Quartz Counter Top
I/flutter ( 7256): prod gotten here : Kube 34" Stainless Steel Framed Mirror - Matte Black
I/flutter ( 7256): prod gotten here : Kube 28" Stainless Steel Framed Mirror - Matte Black
I/flutter ( 7256): prod gotten here : Kube 23" Stainless Steel Framed Mirror - Matte Black
I/flutter ( 7256): prod gotten here : AQUA 59" Mirror - High Gloss White
I/flutter ( 7256): prod gotten here : AQUA 59" Mirror - High Gloss Blue
I/flutter ( 7256): prod gotten here : AQUA 47" Mirror - High Gloss Blue
I/flutter ( 7256): prod gotten here : AQUA 47" Mirror - High Gloss White
I/flutter ( 7256): prod gotten here : AQUA 35" Mirror - High Gloss White
I/flutter ( 7256): prod gotten here : AQUA 35" Mirror - High Gloss Blue
I/flutter ( 7256): prod gotten here : AQUA 28" Mirror - High Gloss White
I/flutter ( 7256): prod gotten here : AQUA 28" Mirror - High Gloss Blue
I/flutter ( 7256): prod gotten here : AQUA 22" Mirror - High Gloss White
I/flutter ( 7256): prod gotten here : AQUA 22" Mirror - High Gloss Blue
I/flutter ( 7256): prod gotten here : 60" Wide Mirror w/ Shelf - Butternut
I/flutter ( 7256): prod gotten here : 48" Wide Mirror w/ Shelf - Butternut
I/flutter ( 7256): prod gotten here : 40" Wide Mirror w/ Shelf - Butternut
I/flutter ( 7256): prod gotten here : 36" Wide Mirror w/ Shelf - Butternut
I/flutter ( 7256): prod gotten here : 30" Wide Mirror w/ Shelf - Butternut
I/flutter ( 7256): prod gotten here : 24" Wide Mirror w/ Shelf - Butternut
I/flutter ( 7256): prod gotten here : Levi 63" Butternut Double Sink Modern Bathroom Vanity w/ Cubby Hole

I/flutter ( 7256): category gotten here : {id: 932, name: Cotton Dispenser, slug: cotton-dispenser, parent: 104, description: , display: products, image: {id: 5719, date_created: 2018-08-01T23:46:03, date_created_gmt: 2018-08-01T23:46:03, date_modified: 2018-08-01T23:46:03, date_modified_gmt: 2018-08-01T23:46:03, src: https://www.kubebath.com/wp-content/uploads/8187.jpg, name: 8187, alt: }, menu_order: 0, count: 1, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/932}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 649, name: De Lusso, slug: delusso, parent: 53, description: , display: default, image: {id: 6527, date_created: 2019-03-11T21:54:21, date_created_gmt: 2019-03-11T21:54:21, date_modified: 2019-03-11T21:54:21, date_modified_gmt: 2019-03-11T21:54:21, src: https://www.kubebath.com/wp-content/uploads/DL48D-GW-4-1.jpg, name: DL48D-GW-4, alt: }, menu_order: 0, count: 24, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/649}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 1281, name: Divani, slug: divani, parent: 53, description: , display: default, image: {id: 7887, date_created: 2020-10-22T15:52:15, date_created_gmt: 2020-10-22T15:52:15, date_modified: 2020-10-22T16:59:25, date_modified_gmt: 2020-10-22T16:59:25, src: https://www.kubebath.com/wp-content/uploads/KD9948BLUE-2.jpg, name: KD9948BLUE-2, alt: Divani 48" Gloss Blue Vanity W/ Quartz Counter Top}, menu_order: 0, count: 10, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/1281}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 718, name: Divario, slug: divario, parent: 53, description: , display: default, image: {id: 4647, date_created: 2017-09-13T20:50:48, date_created_gmt: 2017-09-13T20:50:48, date_modified: 2017-09-13T20:50:48, date_modified_gmt: 2017-09-13T20:50:48, src: https://www.kubebath.com/wp-content/uploads/D48DNW-2.jpg, name: D48DNW-2, alt: }, menu_order: 0, count: 4, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/718}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 59, name: Dolce, slug: dolce, parent: 53, description: , display: products, image: {id: 5946, date_created: 2018-10-10T17:37:16, date_created_gmt: 2018-10-10T17:37:16, date_modified: 2019-11-28T22:55:33, date_modified_gmt: 2019-11-28T22:55:33, src: https://www.kubebath.com/wp-content/uploads/AD648DNW-4-Copy.jpg, name: AD648DNW-4, alt: }, menu_order: 3, count: 32, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/59}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 64, name: Double Sink Vanities, slug: double-sink-vanities, parent: 53, description: , display: products, image: {id: 4193, date_created: 2017-07-04T20:46:12, date_created_gmt: 2017-07-04T20:46:12, date_modified: 2017-07-04T20:46:33, date_modified_gmt: 2017-07-04T20:46:33, src: https://www.kubebath.com/wp-content/uploads/BSL48GW-1.jpg, name: BSL48-GW, alt: Bliss 48" High Gloss White Wall Mount Modern Bathroom Vanity}, menu_order: 11, count: 60, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/64}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 128, name: Drains and Parts, slug: drains-and-parts, parent: 78, description: , display: both, image: {id: 2499, date_created: 2016-04-12T22:07:33, date_created_gmt: 2016-04-12T22:07:33, date_modified: 2016-04-12T22:07:33, date_modified_gmt: 2016-04-12T22:07:33, src: https://www.kubebath.com/wp-content/uploads/P101NO-3.jpg, name: P101NO-3, alt: }, menu_order: 0, count: 21, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/128}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 564, name: Eiffel, slug: eiffel, parent: 53, description: , display: products, image: {id: 3778, date_created: 2016-12-22T20:24:11, date_created_gmt: 2016-12-22T20:24:11, date_modified: 2016-12-22T20:24:11, date_modified_gmt: 2016-12-22T20:24:11, src: https://www.kubebath.com/wp-content/uploads/E72-4.jpg, name: E72-4, alt: }, menu_order: 0, count: 3, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/564}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 78, name: Faucets, slug: faucets, parent: 0, description: , display: both, menu_order: 0, count: 54, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/78}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 482, name: Fitto, slug: fitto, parent: 53, description: , display: products, image: {id: 3171, date_created: 2016-06-06T19:07:34, date_created_gmt: 2016-06-06T19:07:34, date_modified: 2016-06-06T19:07:34, date_modified_gmt: 2016-06-06T19:07:34, src: https://www.kubebath.com/wp-content/uploads/S-1200SRW-3.jpg, name: S-1200SRW-3, alt: }, menu_order: 0, count: 6, 
_links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/482}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 771, name: Framed Mirrors, slug: framedmirrors, parent: 129, description: , display: products, image: {id: 4928, date_created: 2017-10-06T20:14:29, date_created_gmt: 2017-10-06T20:14:29, date_modified: 2017-10-06T20:14:35, date_modified_gmt: 2017-10-06T20:14:35, src: https://www.kubebath.com/wp-content/uploads/KB36GW-M-2.jpg, name: KB36GW-M, alt: }, menu_order: 0, count: 72, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/771}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 936, name: Free Standing Towel Rack, slug: free-standing-towel-rack, parent: 104, description: , display: products, image: {id: 5729, date_created: 2018-08-02T00:05:29, date_created_gmt: 2018-08-02T00:05:29, date_modified: 2018-08-02T00:05:29, date_modified_gmt: 2018-08-02T00:05:29, src: https://www.kubebath.com/wp-content/uploads/8216.jpg, name: 8216, alt: }, 
menu_order: 0, count: 2, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/936}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 906, name: Handheld, slug: handheld, parent: 882, description: , display: default, image: {id: 5651, date_created: 2018-07-31T03:20:57, date_created_gmt: 2018-07-31T03:20:57, date_modified: 2018-07-31T03:20:57, date_modified_gmt: 2018-07-31T03:20:57, src: https://www.kubebath.com/wp-content/uploads/AHHS1423-12.jpg, name: AHHS1423, alt: }, menu_order: 0, count: 
7, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/906}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 619, name: Haus, slug: haus, parent: 53, description: , display: default, image: {id: 4064, date_created: 2017-06-21T19:54:38, date_created_gmt: 2017-06-21T19:54:38, date_modified: 2017-06-21T19:54:38, date_modified_gmt: 2017-06-21T19:54:38, src: https://www.kubebath.com/wp-content/uploads/CH60D-2-Copy.jpg, name: CH60D-2 &#8211; Copy, alt: }, menu_order: 0, count: 14, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/619}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 118, name: Kono, slug: kono, parent: 113, description: , display: products, image: {id: 4972, date_created: 2017-11-17T17:57:52, date_created_gmt: 2017-11-17T17:57:52, date_modified: 2017-11-17T17:57:52, date_modified_gmt: 2017-11-17T17:57:52, src: https://www.kubebath.com/wp-content/uploads/KFST7567-2-1.jpg, name: KFST7567-2, alt: }, menu_order: 0, count: 1, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/118}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 60, name: Kube, slug: kube, parent: 53, description: , display: products, image: {id: 2135, date_created: 2016-04-09T19:41:48, date_created_gmt: 2016-04-09T19:41:48, date_modified: 2016-04-09T19:41:48, date_modified_gmt: 2016-04-09T19:41:48, src: https://www.kubebath.com/wp-content/uploads/LN600GW-4.jpg, name: LN600GW-4, alt: }, menu_order: 6, count: 1, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/60}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 1195, name: Kube Elize, slug: kube-elize, parent: 53, description: , display: default, image: {id: 7031, date_created: 2019-08-02T21:29:47, date_created_gmt: 
2019-08-02T21:29:47, date_modified: 2019-08-02T21:30:27, date_modified_gmt: 2019-08-02T21:30:27, src: https://www.kubebath.com/wp-content/uploads/KE1100-NW_1.jpg, name: KE1100-NW, alt: Kube Elise 44" Nature Wood Wall Mount Modern Bathroom Vanity}, menu_order: 0, count: 2, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/1195}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 119, name: Lavello, slug: lavello, parent: 113, description: , display: products, image: {id: 4640, date_created: 2017-09-12T22:43:01, date_created_gmt: 2017-09-12T22:43:01, date_modified: 2017-09-12T22:43:01, date_modified_gmt: 2017-09-12T22:43:01, src: https://www.kubebath.com/wp-content/uploads/AFST9867-2.jpg, name: AFST9867-2, alt: }, menu_order: 0, count: 
2, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/119}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 439, name: LED, slug: led, parent: 129, description: , display: products, image: {id: 5455, date_created: 2018-05-18T15:38:33, date_created_gmt: 2018-05-18T15:38:33, date_modified: 2018-05-18T15:38:33, date_modified_gmt: 2018-05-18T15:38:33, src: https://www.kubebath.com/wp-content/uploads/KMLED48-2.jpg, name: KMLED48-2, alt: }, menu_order: 0, count: 10, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/439}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 481, name: Levi, slug: levi, parent: 53, description: , display: products, image: {id: 7599, date_created: 2020-01-23T21:47:39, date_created_gmt: 2020-01-23T21:47:39, date_modified: 2020-01-23T21:47:39, date_modified_gmt: 2020-01-23T21:47:39, src: https://www.kubebath.com/wp-content/uploads/L600RW-2.jpg, name: L600RW-2, alt: }, menu_order: 0, count: 26, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/481}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 548, name: Linear Shower Drains, slug: linear-shower-drains, parent: 83, description: , display: products, image: {id: 3738, date_created: 2016-12-01T23:02:03, date_created_gmt: 2016-12-01T23:02:03, date_modified: 2016-12-01T23:02:03, date_modified_gmt: 2016-12-01T23:02:03, src: https://www.kubebath.com/wp-content/uploads/kube-linear-drain.jpg, name: kube-linear-drain, alt: }, menu_order: 0, count: 15, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/548}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 76, name: Linen Side Cabinets, slug: linen-side-cabinets, parent: 75, description: , display: products, image: {id: 4770, date_created: 2017-09-23T18:51:28, date_created_gmt: 2017-09-23T18:51:28, date_modified: 2017-09-23T18:51:28, date_modified_gmt: 2017-09-23T18:51:28, src: https://www.kubebath.com/wp-content/uploads/SLBS59-NW-4.jpg, name: SLBS59-NW-4, alt: }, menu_order: 0, count: 18, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/76}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}       
I/flutter ( 7256): category gotten here : {id: 124, name: Luna, slug: luna, parent: 113, description: , display: products, image: {id: 7678, date_created: 2020-01-24T17:08:54, date_created_gmt: 2020-01-24T17:08:54, date_modified: 2020-01-24T17:08:54, date_modified_gmt: 2020-01-24T17:08:54, src: https://www.kubebath.com/wp-content/uploads/KFST2768-3.jpg, name: KFST2768-3, alt: }, menu_order: 0, count: 1, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/124}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 927, name: Magnifying Mirror, slug: magnifying-mirror, parent: 104, description: , display: products, image: {id: 5710, date_created: 2018-08-01T22:58:53, date_created_gmt: 2018-08-01T22:58:53, date_modified: 2018-08-01T22:58:53, date_modified_gmt: 2018-08-01T22:58:53, src: https://www.kubebath.com/wp-content/uploads/8166.jpg, name: 8166, alt: }, menu_order: 0, count: 5, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/927}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}

I/flutter ( 7256): category gotten here : {id: 682, name: Milano, slug: milano, parent: 53, description: , display: default, image: {id: 6529, date_created: 2019-03-11T21:58:04, date_created_gmt: 2019-03-11T21:58:04, date_modified: 2019-03-11T21:58:04, date_modified_gmt: 2019-03-11T21:58:04, src: https://www.kubebath.com/wp-content/uploads/KFM48SGW-5-1.jpg, name: KFM48SGW-5, alt: }, menu_order: 0, count: 11, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/682}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}

I/flutter ( 7256): category gotten here : {id: 117, name: Solato, slug: solato, parent: 113, description: , display: products, image: {id: 3901, date_created: 2017-03-15T17:57:21, date_created_gmt: 2017-03-15T17:57:21, date_modified: 2017-03-15T17:57:21, date_modified_gmt: 2017-03-15T17:57:21, src: https://www.kubebath.com/wp-content/uploads/KFST7867-2.jpg, name: KFST7867-2, alt: }, menu_order: 0, count: 1, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/117}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}
I/flutter ( 7256): category gotten here : {id: 116, name: Squadra, slug: squadra, parent: 113, description: , display: products, image: {id: 7644, date_created: 2020-01-23T22:26:21, date_created_gmt: 2020-01-23T22:26:21, date_modified: 2020-01-23T22:26:21, date_modified_gmt: 2020-01-23T22:26:21, src: https://www.kubebath.com/wp-content/uploads/KFST5063-2.jpg, name: KFST5063-2, alt: }, menu_order: 0, count: 

I/flutter ( 7256): [{id: 54, name: Anziano - Available in Canada Only, slug: anziano, parent: 53, description: , display: products, image: {id: 3626, date_created: 2016-11-23T05:00:41, date_created_gmt: 2016-11-23T05:00:41, date_modified: 2016-11-23T05:00:41, date_modified_gmt: 2016-11-23T05:00:41, src: https://www.kubebath.com/wp-content/uploads/ASL1560-GW-3-1.jpg, name: asl1560-gw-3, alt: }, menu_order: 4, count: 7, _links: {self: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories/54}], collection: [{href: https://www.kubebath.com/wp-json/wc/v3/products/categories}]}}, {id: 1023, name: Aqua Chiaro, slug: aqua-chiaro, parent: 104, description: , display: products, image: {id: 6010, date_created: 2018-11-03T02:24:48, date_created_gmt: 2018-11-03T02:24:48, date_modified: 2018-11-03T02:25:05, date_modified_gmt: 2018-11-03T02:25:05, src: https://www.kubebath.com/wp-content/uploads/8220-3.jpg, name: 8220-3, alt: Aqua Chiaro by KubeBath Robe Hook With 3 Hooks - Chrome}, menu_order: 0, count: 11, _links: {self: [{hre
I/flutter ( 7256): Another exception was thrown: Instance of 'DiagnosticsProperty<void>'
I/flutter ( 7256): Another exception was thrown: Instance of 'DiagnosticsProperty<void>'

2 个答案:

答案 0 :(得分:0)

在构建阶段发生错误时,将调用ErrorWidget.builder回调来构建所使用的小部件,而不是失败的小部件。默认情况下,在调试模式下,此错误消息显示为红色,在发布模式下,此消息显示为灰色背景。

因此,您可以通过以下代码在发布版本应用中更改错误UI。您只需在runApp()之前添加此代码,然后在发布模式下更改错误小部件即可。

void main() {
  ErrorWidget.builder = (FlutterErrorDetails details) {
    bool inDebug = false;
    assert(() { inDebug = true; return true; }());
    // In debug mode, use the normal error widget which shows
    // the error message:
    if (inDebug)
      return ErrorWidget(details.exception);
    // In release builds, show a yellow-on-blue message instead:
    return Container(
      alignment: Alignment.center,
      child: Text(
       'Error! ${details.exception}',
        style: TextStyle(color: Colors.yellow),
        textDirection: TextDirection.ltr,
      ),
    );
  };
  // Here we would normally runApp() the root widget, but to demonstrate
  // the error handling we artificially fail:
  return runApp(AppRun())
}

答案 1 :(得分:0)

看最后两行。

Another exception was thrown: Instance of 'DiagnosticsProperty<void>'

这意味着你的代码中有一些关于 UI 的错误。一个常见的错误是

Expanded widgets are placed directly inside Flex widgets.

尝试修复所有不影响调试但出现在控制台中的错误。然后再试一次。 我希望它对你有用