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

1 android dart woocommerce flutter

我的应用程序在调试模式下正常工作,但是当我发布时,它在屏幕上没有显示任何内容。我正在使用 woocommerce 插件来获取数据。

\n

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

\n

这些是日志。

\n

屏幕

\n
flutter run --release\nNo supported devices connected.\nPS C:\\Users\\emili\\OneDrive\\Documentos\\Flutter Proj\\ecommerce> flutter run --release\nRunning "flutter pub get" in ecommerce...                          27.8s\nLaunching lib\\main.dart on SM J610FN in release mode...\nParameter format not correct -\nNote: 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.\nNote: Recompile with -Xlint:deprecation for details.\nRunning Gradle task \'assembleRelease\'...\n\nRunning Gradle task \'assembleRelease\'... Done                     163.3s (!)\n\xe2\x88\x9a Built build\\app\\outputs\\flutter-apk\\app-release.apk (9.3MB).\nInstalling build\\app\\outputs\\flutter-apk\\app.apk...                14.1s\n\nFlutter run key commands.\nh Repeat this help message.\nc Clear the screen\nq Quit (terminate the application on the device).\nI/flutter ( 7256): Parameters: {page: 1, per_page: 50, status: publish, stock_status: instock}\nI/flutter ( 7256): \nI/flutter ( 7256): Another exception was thrown: Instance of \'DiagnosticsProperty<void>\'\nI/flutter ( 7256): Another exception was thrown: Instance of \'DiagnosticsProperty<void>\'\nI/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, \ndate_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>\nI/flutter ( 7256): <div class="ProductDescriptionContainer prodAccordionContent">\nI/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>\nI/flutter ( 7256): <p><strong>Included in the price:</strong></p>\nI/flutter ( 7256): <p>\xe2\x80\xa2 Single Lever Matte Black Faucet<br />\nI/flutter ( 7256): \xe2\x80\xa2 Extra Two Handles in Color Gold and Red.<br />\nI/flutter ( 7256): \xe2\x80\xa2 Flex Water Hoses Included for easy installatio\nI/flutter ( 7256): this is query oo : products?page=1&per_page=50&status=publish&stock_status=instock\nI/flutter ( 7256): prod gotten here : Aqua Loft Single Lever Bathroom Vanity Faucet with Side Handle - Matte Black\nI/flutter ( 7256): prod gotten here : Aqua Loft Single Lever Bathroom Vanity Faucet with Side Handle - Chrome     \nI/flutter ( 7256): prod gotten here : Aqua Loft Single Lever Bathroom Vanity Faucet - Chrome\nI/flutter ( 7256): prod gotten here : Aqua Loft Single Lever Bathroom Vanity Faucet - Matte Black\nI/flutter ( 7256): prod gotten here : Aqua Elegance Single Lever Wide Spread Faucet - Matte Black\nI/flutter ( 7256): prod gotten here : Vetro 30" Gloss White Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Vetro 36" Gloss White Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Vetro 48" Gloss White Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Vetro 60" Gloss White Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Vetro 60" Gloss Blue Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Vetro 48" Gloss Blue Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Vetro 36" Gloss Blue Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Vetro 30" Gloss Blue Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Divani 24" Gloss White Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Divani 30" Gloss White Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Divani 36" Gloss White Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Divani 48" Gloss White Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Divani 60" Gloss White Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Divani 60" Gloss Blue Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Divani 48" Gloss Blue Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Divani 36" Gloss Blue Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Divani 30" Gloss Blue Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Divani 24" Gloss Blue Vanity W/ Quartz Counter Top\nI/flutter ( 7256): prod gotten here : Kube 34" Stainless Steel Framed Mirror - Matte Black\nI/flutter ( 7256): prod gotten here : Kube 28" Stainless Steel Framed Mirror - Matte Black\nI/flutter ( 7256): prod gotten here : Kube 23" Stainless Steel Framed Mirror - Matte Black\nI/flutter ( 7256): prod gotten here : AQUA 59" Mirror - High Gloss White\nI/flutter ( 7256): prod gotten here : AQUA 59" Mirror - High Gloss Blue\nI/flutter ( 7256): prod gotten here : AQUA 47" Mirror - High Gloss Blue\nI/flutter ( 7256): prod gotten here : AQUA 47" Mirror - High Gloss White\nI/flutter ( 7256): prod gotten here : AQUA 35" Mirror - High Gloss White\nI/flutter ( 7256): prod gotten here : AQUA 35" Mirror - High Gloss Blue\nI/flutter ( 7256): prod gotten here : AQUA 28" Mirror - High Gloss White\nI/flutter ( 7256): prod gotten here : AQUA 28" Mirror - High Gloss Blue\nI/flutter ( 7256): prod gotten here : AQUA 22" Mirror - High Gloss White\nI/flutter ( 7256): prod gotten here : AQUA 22" Mirror - High Gloss Blue\nI/flutter ( 7256): prod gotten here : 60" Wide Mirror w/ Shelf - Butternut\nI/flutter ( 7256): prod gotten here : 48" Wide Mirror w/ Shelf - Butternut\nI/flutter ( 7256): prod gotten here : 40" Wide Mirror w/ Shelf - Butternut\nI/flutter ( 7256): prod gotten here : 36" Wide Mirror w/ Shelf - Butternut\nI/flutter ( 7256): prod gotten here : 30" Wide Mirror w/ Shelf - Butternut\nI/flutter ( 7256): prod gotten here : 24" Wide Mirror w/ Shelf - Butternut\nI/flutter ( 7256): prod gotten here : Levi 63" Butternut Double Sink Modern Bathroom Vanity w/ Cubby Hole\n\nI/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}]}}\nI/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}]}}\nI/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}]}}\nI/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}]}}\nI/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}]}}\nI/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}]}}\nI/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}]}}\nI/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}]}}\nI/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}]}}\nI/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, \n_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}]}}\nI/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}]}}\nI/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: }, \nmenu_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}]}}\nI/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: \n7, _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}]}}\nI/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}]}}\nI/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}]}}\nI/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}]}}\nI/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: \n2019-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}]}}\nI/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: \n2, _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}]}}\nI/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}]}}\nI/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}]}}\nI/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}]}}\nI/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}]}}       \nI/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, co

Nik*_*iya 5

当构建阶段发生错误时,将调用 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())
}
Run Code Online (Sandbox Code Playgroud)