text:
When the exception was thrown, this was the stack:

May I ask how to solve this
: #0      NetworkImage._loadAsync (package:flutter/src/painting/_network_image_io.dart:100:9)
I/flutter ( 5079):
I/flutter ( 5079): #1      NetworkImage.load (package:flutter/src/painting/_network_image_io.dart:51:14)
I/flutter ( 5079): #2      ImageProvider.resolveStreamForKey. (package:flutter/src/painting/image_provider.dart:505:13)
I/flutter ( 5079): #3      ImageCache.putIfAbsent (package:flutter/src/painting/image_cache.dart:360:22)
I/flutter ( 5079): #4      ImageProvider.resolveStreamForKey (package:flutter/src/painting/image_provider.dart:503:80)
I/flutter ( 5079): #5      ScrollAwareImageProvider.resolveStreamForKey (package:flutter/src/widgets/scroll_aware_image_provider.dart:108:19)
I/flutter ( 5079): #6      ImageProvider.resolve. (package:flutter/src/painting/image_provider.dart:334:9)
I/flutter ( 5079): #7      ImageProvider._createErrorHandlerAndKey.. (package:flutter/src/painting/image_provider.dart:464:26)
I/flutter ( 5079): #8      SynchronousFuture.then (package:flutter/src/foundation/synchronous_future.dart:43:29)
I/flutter ( 5079): #9      ImageProvider._createErrorHandlerAndKey. (package:flutter/src/painting/image_provider.dart:461:11)
I/flutter ( 5079): #13     ImageProvider._createErrorHandlerAndKey (package:flutter/src/painting/image_provider.dart:453:16)
I/flutter ( 5079): #14     ImageProvider.resolve (package:flutter/src/painting/image_provider.dart:331:5)
I/flutter ( 5079): #15     _ImageState._resolveImage (package:flutter/src/widgets/image.dart:1116:16)
I/flutter ( 5079): #16     _ImageState.didChangeDependencies (package:flutter/src/widgets/image.dart:1069:5)
I/flutter ( 5079): #17     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4738:12)
I/flutter ( 5079): #18     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4553:5)
I/flutter ( 5079): #19     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3524:14)
I/flutter ( 5079): #20     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6069:32)
I/flutter ( 5079): ...     Normal element mounting (71 frames)
I/flutter ( 5079): #91     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3524:14)
I/flutter ( 5079): #92     Element.updateChild (package:flutter/src/widgets/framework.dart:3283:18)
I/flutter ( 5079): #93     SliverMultiBoxAdaptorElement.updateChild (package:flutter/src/widgets/sliver.dart:1164:36)
I/flutter ( 5079): #94     SliverMultiBoxAdaptorElement.performRebuild.processElement (package:flutter/src/widgets/sliver.dart:1082:34)
I/flutter ( 5079): #95     SliverMultiBoxAdaptorElement.performRebuild (package:flutter/src/widgets/sliver.dart:1127:23)
I/flutter ( 5079): #96     SliverMultiBoxAdaptorElement.update (package:flutter/src/widgets/sliver.dart:1052:7)
I/flutter ( 5079): #97     Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #98     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #99     Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #100    ProxyElement.update (package:flutter/src/widgets/framework.dart:4937:5)
I/flutter ( 5079): #101    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #102    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5950:14)
I/flutter ( 5079): #103    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #104    RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5613:32)
I/flutter ( 5079): #105    MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6080:17)
I/flutter ( 5079): #106    _ViewportElement.update (package:flutter/src/widgets/viewport.dart:213:11)
I/flutter ( 5079): #107    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #108    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5950:14)
I/flutter ( 5079): #109    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #110    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5950:14)
I/flutter ( 5079): #111    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #112    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5950:14)
I/flutter ( 5079): #113    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #114    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #115    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #116    StatelessElement.update (package:flutter/src/widgets/framework.dart:4659:5)
I/flutter ( 5079): #117    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #118    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5950:14)
I/flutter ( 5079): #119    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #120    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #121    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4752:11)
I/flutter ( 5079): #122    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #123    StatefulElement.update (package:flutter/src/widgets/framework.dart:4786:5)
I/flutter ( 5079): #124    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #125    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5950:14)
I/flutter ( 5079): #126    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #127    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #128    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #129    StatelessElement.update (package:flutter/src/widgets/framework.dart:4659:5)
I/flutter ( 5079): #130    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #131    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #132    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #133    ProxyElement.update (package:flutter/src/widgets/framework.dart:4937:5)
I/flutter ( 5079): #134    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #135    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5950:14)
I/flutter ( 5079): #136    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #137    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5950:14)
I/flutter ( 5079): #138    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #139    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5950:14)
I/flutter ( 5079): #140    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #141    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5950:14)
I/flutter ( 5079): #142    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #143    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #144    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #145    StatelessElement.update (package:flutter/src/widgets/framework.dart:4659:5)
I/flutter ( 5079): #146    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #147    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #148    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4752:11)
I/flutter ( 5079): #149    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #150    StatefulElement.update (package:flutter/src/widgets/framework.dart:4786:5)
I/flutter ( 5079): #151    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #152    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #153    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4752:11)
I/flutter ( 5079): #154    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #155    StatefulElement.update (package:flutter/src/widgets/framework.dart:4786:5)
I/flutter ( 5079): #156    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #157    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #158    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #159    ProxyElement.update (package:flutter/src/widgets/framework.dart:4937:5)
I/flutter ( 5079): #160    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #161    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #162    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #163    StatelessElement.update (package:flutter/src/widgets/framework.dart:4659:5)
I/flutter ( 5079): #164    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #165    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #166    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #167    StatelessElement.update (package:flutter/src/widgets/framework.dart:4659:5)
I/flutter ( 5079): #168    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #169    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #170    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #171    ProxyElement.update (package:flutter/src/widgets/framework.dart:4937:5)
I/flutter ( 5079): #172    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #173    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #174    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #175    ProxyElement.update (package:flutter/src/widgets/framework.dart:4937:5)
I/flutter ( 5079): #176    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #177    RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5613:32)
I/flutter ( 5079): #178    MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6080:17)
I/flutter ( 5079): #179    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #180    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #181    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4752:11)
I/flutter ( 5079): #182    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #183    StatefulElement.update (package:flutter/src/widgets/framework.dart:4786:5)
I/flutter ( 5079): #184    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #185    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #186    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #187    ProxyElement.update (package:flutter/src/widgets/framework.dart:4937:5)
I/flutter ( 5079): #188    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #189    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #190    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4752:11)
I/flutter ( 5079): #191    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #192    StatefulElement.update (package:flutter/src/widgets/framework.dart:4786:5)
I/flutter ( 5079): #193    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #194    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5950:14)
I/flutter ( 5079): #195    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #196    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #197    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #198    StatelessElement.update (package:flutter/src/widgets/framework.dart:4659:5)
I/flutter ( 5079): #199    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #200    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5950:14)
I/flutter ( 5079): #201    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #202    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #203    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4752:11)
I/flutter ( 5079): #204    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #205    StatefulElement.update (package:flutter/src/widgets/framework.dart:4786:5)
I/flutter ( 5079): #206    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #207    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #208    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4752:11)
I/flutter ( 5079): #209    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #210    StatefulElement.update (package:flutter/src/widgets/framework.dart:4786:5)
I/flutter ( 5079): #211    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #212    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #213    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #214    ProxyElement.update (package:flutter/src/widgets/framework.dart:4937:5)
I/flutter ( 5079): #215    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #216    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #217    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #218    ProxyElement.update (package:flutter/src/widgets/framework.dart:4937:5)
I/flutter ( 5079): #219    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #220    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #221    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4752:11)
I/flutter ( 5079): #222    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #223    StatefulElement.update (package:flutter/src/widgets/framework.dart:4786:5)
I/flutter ( 5079): #224    Element.updateChild (package:flutter/src/widgets/framework.dart:3270:15)
I/flutter ( 5079): #225    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4605:16)
I/flutter ( 5079): #226    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4752:11)
I/flutter ( 5079): #227    Element.rebuild (package:flutter/src/widgets/framework.dart:4291:5)
I/flutter ( 5079): #228    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2665:33)
I/flutter ( 5079): #229    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:866:20)
I/flutter ( 5079): #230    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:286:5)
I/flutter ( 5079): #231    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15)
I/flutter ( 5079): #232    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1056:9)
I/flutter ( 5079): #233    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:972:5)
I/flutter ( 5079): #237    _invoke (dart:ui/hooks.dart:253:10)
I/flutter ( 5079): #238    _drawFrame (dart:ui/hooks.dart:211:3)
I/flutter ( 5079): (elided 6 frames from dart:async)

Hello @,
Could you please post the output of flutter doctor -v
Thank you!

您好@ alin25730，
请发表flutter doctor -v
您的感谢信息！

Flutter (Channel stable, 1.20.2, on Microsoft Windows [Version 10.0.18362.836], locale en-US)
• Flutter version 1.20.2 at D:\常用应用\Flutter\flutter_windows_1.20.2-stable\flutter
• Framework revision bbfbf1770c (9 weeks ago), 2020-08-13 08:33:09 -0700
• Engine revision 9d5b21729f
• Dart version 2.9.1
• Pub download mirror https://mirrors.tuna.tsinghua.edu.cn/dart-pub
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at D:\sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = D:\sdk
• Java binary at: D:\Android\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed
instructions.
[√] Android Studio (version 3.5)
• Android Studio at D:\Android
• Flutter plugin version 44.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] IntelliJ IDEA Ultimate Edition (version 2019.2)
• IntelliJ at D:\src\IDEA\IntelliJ IDEA 2019.2.2
• Flutter plugin version 43.0.2
• Dart plugin version 192.8052
[√] VS Code (version 1.50.1)
• VS Code at C:\Users\Niko'C'\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.15.1
[√] Connected device (1 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)
! Doctor found issues in 1 category.

Hello @sidrao2006
Flutter (Channel stable, 1.20.2, on Microsoft Windows [Version 10.0.18362.836], locale en-US)
• Flutter version 1.20.2 at D:\常用应用\Flutter\flutter_windows_1.20.2-stable\flutter
• Framework revision bbfbf17 (9 weeks ago), 2020-08-13 08:33:09 -0700
• Engine revision 9d5b21729f
• Dart version 2.9.1
• Pub download mirror https://mirrors.tuna.tsinghua.edu.cn/dart-pub
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at D:\sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = D:\sdk
• Java binary at: D:\Android\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed
instructions.
[√] Android Studio (version 3.5)
• Android Studio at D:\Android
• Flutter plugin version 44.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] IntelliJ IDEA Ultimate Edition (version 2019.2)
• IntelliJ at D:\src\IDEA\IntelliJ IDEA 2019.2.2
• Flutter plugin version 43.0.2
• Dart plugin version 192.8052
[√] VS Code (version 1.50.1)
• VS Code at C:\Users\Niko'C'\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.15.1
[√] Connected device (1 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)
! Doctor found issues in 1 category.

@alin25730
can you provide your full flutter run -v and most importantly a minimal reproducible code sample

@alin25730
Please do as suggested above and provide a minimal code sample that shows the issue.
Thanks.

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.


text:
Disable splashColor and highlightColor for bottomNavigationBar

Use case
For developer who do not want to show any splash and highlight effect on their buttons

Proposal
any possibility to add a selectingSplashColor or selectingHighlightColor in the BottomNavigationBar?

@davidsx
Disabling certain properties of a widget isn't a good idea since other devs would require that per different requirements.
You may check out this link and corresponding solutions to see if they work for you.

@darshankawar thanks for you quick reply.
However, this link is not what I want. I did want to click the bottomNavigationBar to switch pages but I do not want the splash effect there.
For example:

Here the BottomNavigationBarItem has a circle grey splashing effect and I hope developers can manually set it like InkWell

source: gharchive/issue

authors: darshankawar davidsx

repo: flutter/flutter

license_type: permissive

license_source: github-api


text:
previousOwner._heroControllerFromScope != newHeroController': is not true

My error is the following:
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 2785 pos 24: 'previousOwner._heroControllerFromScope != newHeroController': is not true.

_updateHeroController(null) only be called in the dispose method,so I think previousOwner._heroControllerFromScope may be equal to newHeroController
My simple demo is: https://github.com/whatscoder/navigator_test, branch is master
flutter doctor is:
[✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.4
    19E287, locale zh-Hans-CN)
    • Flutter version 1.22.2 at
      /Users/mj/Documents/flutter1220
    • Framework revision 84f3d28555 (2 weeks ago), 2020-10-15
      16:26:19 -0700
    • Engine revision b8752bbfff
    • Dart version 2.10.2
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android     SDK version 30.0.0)
    • Android SDK at /Users/mj/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • ANDROID_HOME = /Users/mj/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android
      Studio.app/Contents
    • Flutter plugin version 47.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)

Hi @whatscoder
Can you please isolate the code causes and create a minimal code sample and provide steps to reproduce
Can you please provide flutter run --verbose logs, and a minimal complete reproducible code sample?
Thank you

Hi @TahaTesser
Let me give you a brief account of my operation:
I have a StatefulWidget ，Overlay  is his child，and then I package a navigator as an OverlayEntry and insert into OverlayState。When over one OverlayEntry that packaged navigator are inserted into OverlayState, there is an error: package:flutter/src/widgets/navigator.dart': Failed assertion: line 2785 pos 24: 'previousOwner._heroControllerFromScope != newHeroController': is not true.
flutter run --verbose logs:
[+604284 ms] flutter: ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
[        ] flutter: The following assertion was thrown during a scheduler callback:
[   +7 ms] flutter: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 2785 pos 24:
[        ] flutter: 'previousOwner._heroControllerFromScope != newHeroController': is not true.
[        ] flutter:
[        ] flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
[        ] flutter: more information in this error message to help you determine and fix the underlying cause.
[        ] flutter: In either case, please report this assertion by filing a bug on GitHub:
[        ] flutter:   https://github.com/flutter/flutter/issues/new?template=BUG.md
[        ] flutter:
[        ] flutter: When the exception was thrown, this was the stack:
[        ] flutter: #2      NavigatorState._updateHeroController.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/navigator.dart:2785:24)
[        ] flutter: #3      SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15)
[  +19 ms] flutter: #4      SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1063:9)
[        ] flutter: #5      SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:971:5)
[        ] flutter: #9      _invoke (dart:ui/hooks.dart:251:10)
[        ] flutter: #10     _drawFrame (dart:ui/hooks.dart:209:3)
[        ] flutter: (elided 5 frames from class _AssertionError and dart:async)
[        ] flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
[+20133 ms] flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 2785 pos 24: 'previousOwner._heroControllerFromScope != newHeroController': is not true.

If the description is not clear, please indicate, Thank you

Hi @whatscoder
Thanks for describing the issue, to better address the issue, please provide a minimal code sample
Thank you

Hi @TahaTesser
I have simplified my code sample. https://github.com/whatscoder/navigator_test/    branch is master
The exception is the same as the above.
please check again, Thank you.

Hi @whatscoder
I put all your code in a single main.dart

code sample
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';

final GlobalKey<ContainerManagerState> containerManagerKey =
    GlobalKey<ContainerManagerState>();

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      builder: (BuildContext context, Widget child) {
        assert(child is Navigator, 'child must be Navigator, what is wrong?');

        return ContainerManager(
          key: containerManagerKey,
          initNavigator: child as Navigator,
        );
      },
      home: Container(
        color: Colors.white,
      ),
    );
  }
}

class ContainerManager extends StatefulWidget {
  const ContainerManager({
    Key key,
    this.initNavigator,
  }) : super(key: key);

  @override
  State<StatefulWidget> createState() => ContainerManagerState();

  final Navigator initNavigator;
}

class ContainerManagerState extends State<ContainerManager> {
  final GlobalKey<OverlayState> _overlayKey = GlobalKey<OverlayState>();
  final List<Navigator> _offstage = <Navigator>[];
  List<OverlayEntry> _leastEntries;
  Navigator _onstage;

  @override
  void initState() {
    super.initState();

    _onstage = Navigator(
      key: GlobalKey<NavigatorState>(),
      onGenerateRoute: (RouteSettings routeSettings) {
        return MaterialPageRoute(builder: (BuildContext context) {
          return FirstWidget();
        });
      },
    );

    WidgetsBinding.instance.addPostFrameCallback((_) {
      setState(() {});
    });
  }

  @override
  void setState(VoidCallback fn) {
    if (SchedulerBinding.instance.schedulerPhase ==
        SchedulerPhase.persistentCallbacks) {
      SchedulerBinding.instance.addPostFrameCallback((Duration duration) {
        _refreshOverlayEntries();
      });
    } else {
      _refreshOverlayEntries();
    }

    fn();
  }

  @override
  Widget build(BuildContext context) {
    return Overlay(
      key: _overlayKey,
      initialEntries: const <OverlayEntry>[],
    );
  }

  void pushContainer(WidgetBuilder builder) {
    _offstage.add(_onstage);

    _onstage = Navigator(
      key: GlobalKey<NavigatorState>(),
      onGenerateRoute: (RouteSettings routeSettings) {
        return MaterialPageRoute(builder: builder);
      },
    );

    setState(() {});
  }

  void _refreshOverlayEntries() {
    final OverlayState overlayState = _overlayKey.currentState;

    if (overlayState == null) return;

    if (_leastEntries != null && _leastEntries.isNotEmpty) {
      for (final OverlayEntry entry in _leastEntries) {
        entry.remove();
      }
    }

    final List<Navigator> containers = <Navigator>[];
    containers.addAll(_offstage);
    containers.add(_onstage);

    _leastEntries = containers
        .map<OverlayEntry>((Navigator container) =>
            OverlayEntry(builder: (BuildContext context) => container))
        .toList(growable: false);

    overlayState.insertAll(_leastEntries);
  }
}

class FirstWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('first'),
      ),
      body: Center(
          child: RaisedButton(
              child: const Text('click'),
              onPressed: () {
                ContainerManagerState state =
                    context.findAncestorStateOfType<ContainerManagerState>();
                state.pushContainer((context) => SecondWidget());
              })),
    );
  }
}

class SecondWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('second'),
      ),
      body: Center(
        child: Text('hello'),
      ),
    );
  }
}

logs
Running "flutter pub get" in master_flutter...
Launching lib/main.dart on iPhone 12 in debug mode...
 lib/main.dart
Xcode build done.                                           26.0s
Connecting to VM Service at ws://127.0.0.1:53074/Ck3KIERTjPI=/ws

════════ Exception caught by scheduler library ═════════════════════════════════
The following assertion was thrown during a scheduler callback:
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 3389 pos 24: '<optimized out>': is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

When the exception was thrown, this was the stack
#2      NavigatorState._updateHeroController.<anonymous closure>.<anonymous closure>
 package:flutter/…/widgets/navigator.dart
#3      SchedulerBinding._invokeFrameCallback
 package:flutter/…/scheduler/binding.dart
#4      SchedulerBinding.handleDrawFrame
 package:flutter/…/scheduler/binding.dart
#5      SchedulerBinding._handleDrawFrame
 package:flutter/…/scheduler/binding.dart
#9      _invoke (dart:ui/hooks.dart:157:10)
...
════════════════════════════════════════════════════════════════════════════════

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.3, on Mac OS X 10.15.7 19H2, locale en-GB)
    • Flutter version 1.22.3 at /Users/tahatesser/Code/flutter_stable
    • Framework revision 8874f21e79 (4 days ago), 2020-10-29 14:14:35 -0700
    • Engine revision a1440ca392
    • Dart version 2.10.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/tahatesser/Code/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/tahatesser/Code/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.10.0

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.50.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (1 available)
    • iPhone 12 (mobile) • 572593A3-647B-413C-9188-B91DD07DEAF0 • ios •
      com.apple.CoreSimulator.SimRuntime.iOS-14-1 (simulator)

! Doctor found issues in 1 category.

[✓] Flutter (Channel beta, 1.23.0-18.1.pre, on Mac OS X 10.15.7 19H2 x86_64, locale en-GB)
    • Flutter version 1.23.0-18.1.pre at /Users/tahatesser/Code/flutter_beta
    • Framework revision 198df796aa (3 weeks ago), 2020-10-15 12:04:33 -0700
    • Engine revision 1d12d82d9c
    • Dart version 2.11.0 (build 2.11.0-213.1.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/tahatesser/Code/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/tahatesser/Code/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.10.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.50.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (3 available)
    • iPhone 12 (mobile) • 572593A3-647B-413C-9188-B91DD07DEAF0 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-1 (simulator)
    • Web Server (web)   • web-server                           • web-javascript • Flutter Tools
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome
      86.0.4240.183

• No issues found!

[✓] Flutter (Channel master, 1.24.0-7.0.pre.73, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-GB)
    • Flutter version 1.24.0-7.0.pre.73 at /Users/tahatesser/Code/flutter_master
    • Framework revision fb90544cab (2 hours ago), 2020-11-02 22:48:03 -0800
    • Engine revision 3460519398
    • Dart version 2.12.0 (build 2.12.0-3.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/tahatesser/Code/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/tahatesser/Code/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.10.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.50.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (4 available)
    • iPhone 12 (mobile) • 572593A3-647B-413C-9188-B91DD07DEAF0 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-1 (simulator)
    • macOS (desktop)    • macos                                • darwin-x64     • Mac OS X 10.15.7 19H2
      darwin-x64
    • Web Server (web)   • web-server                           • web-javascript • Flutter Tools
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome
      86.0.4240.183

• No issues found!

Hi @TahaTesser
I got it, after running, you need to click the button named 'click' of the FirstWidget, push to the SecondWidget,  and then the exception log is shown in the console.
I have put all my code in a single main.dart, https://github.com/whatscoder/navigator_test.git, branch is master
exception logs:
════════ Exception caught by scheduler library ═════════════════════════════════
The following assertion was thrown during a scheduler callback:
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 2785 pos 24: 'previousOwner._heroControllerFromScope != newHeroController': is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md

When the exception was thrown, this was the stack
#2      NavigatorState._updateHeroController.<anonymous closure>.<anonymous closure>
package:flutter/…/widgets/navigator.dart:2785
#3      SchedulerBinding._invokeFrameCallback
package:flutter/…/scheduler/binding.dart:1117
#4      SchedulerBinding.handleDrawFrame
package:flutter/…/scheduler/binding.dart:1063
#5      SchedulerBinding._handleDrawFrame
package:flutter/…/scheduler/binding.dart:971
#9      _invoke (dart:ui/hooks.dart:251:10)

/cc @chunhtai

The hero controller cannot be shared across the multiple navigator,  you can fix this by wrapping each container with their own herocontrollerscope
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';

final GlobalKey<ContainerManagerState> containerManagerKey =
GlobalKey<ContainerManagerState>();

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      builder: (BuildContext context, Widget child) {
        assert(child is Navigator, 'child must be Navigator, what is wrong?');

        return ContainerManager(
          key: containerManagerKey,
          initNavigator: child as Navigator,
        );
      },
      home: Container(
        color: Colors.white,
      ),
    );
  }
}

class ContainerManager extends StatefulWidget {
  const ContainerManager({
    Key key,
    this.initNavigator,
  }) : super(key: key);

  @override
  State<StatefulWidget> createState() => ContainerManagerState();

  final Navigator initNavigator;
}

class ContainerManagerState extends State<ContainerManager> {
  final GlobalKey<OverlayState> _overlayKey = GlobalKey<OverlayState>();
  final List<Widget> _offstage = <Widget>[];
  List<OverlayEntry> _leastEntries;
  Widget _onstage;

  @override
  void initState() {
    super.initState();

    _onstage = HeroControllerScope(controller: HeroController(), child: Navigator(
      key: GlobalKey<NavigatorState>(),
      onGenerateRoute: (RouteSettings routeSettings) {
        return MaterialPageRoute(builder: (BuildContext context) {
          return FirstWidget();
        });
      },
    ));

    WidgetsBinding.instance.addPostFrameCallback((_) {
      setState(() {});
    });
  }

  @override
  void setState(VoidCallback fn) {
    if (SchedulerBinding.instance.schedulerPhase ==
        SchedulerPhase.persistentCallbacks) {
      SchedulerBinding.instance.addPostFrameCallback((Duration duration) {
        _refreshOverlayEntries();
      });
    } else {
      _refreshOverlayEntries();
    }

    fn();
  }

  @override
  Widget build(BuildContext context) {
    return Overlay(
      key: _overlayKey,
      initialEntries: const <OverlayEntry>[],
    );
  }

  void pushContainer(WidgetBuilder builder) {
    _offstage.add(_onstage);

    _onstage = Navigator(
      key: GlobalKey<NavigatorState>(),
      onGenerateRoute: (RouteSettings routeSettings) {
        return MaterialPageRoute(builder: builder);
      },
    );

    setState(() {});
  }

  void _refreshOverlayEntries() {
    final OverlayState overlayState = _overlayKey.currentState;

    if (overlayState == null) return;

    if (_leastEntries != null && _leastEntries.isNotEmpty) {
      for (final OverlayEntry entry in _leastEntries) {
        entry.remove();
      }
    }

    final List<Widget> containers = <Widget>[];
    containers.addAll(_offstage);
    containers.add(_onstage);

    _leastEntries = containers
        .map<OverlayEntry>((Widget container) =>
        OverlayEntry(builder: (BuildContext context) => container))
        .toList(growable: false);

    overlayState.insertAll(_leastEntries);
  }
}

class FirstWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('first'),
      ),
      body: Center(
          child: RaisedButton(
              child: const Text('click'),
              onPressed: () {
                ContainerManagerState state =
                context.findAncestorStateOfType<ContainerManagerState>();
                state.pushContainer((context) => SecondWidget());
              })),
    );
  }
}

class SecondWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('second'),
      ),
      body: Center(
        child: Text('hello'),
      ),
    );
  }
}

I will put up a pr to improve the error message

authors: TahaTesser chunhtai goderbauer whatscoder


text:
Calling popAndPushNamed throws exception

If there's more than one route in the current stack and when popAndPushNamed is called(or calling pop and then push), the following exception will be thrown:
I/flutter ( 6710): NoSuchMethodError: The getter 'subtreeContext' was called on null.
I/flutter ( 6710): Receiver: null
I/flutter ( 6710): Tried calling: subtreeContext
I/flutter ( 6710): When the exception was thrown, this was the stack:
I/flutter ( 6710): #0      Object._noSuchMethod (dart:core-patch/object_patch.dart:44)
I/flutter ( 6710): #1      Object.noSuchMethod (dart:core-patch/object_patch.dart:47)
I/flutter ( 6710): #2      HeroController._updateQuest (package:flutter/src/widgets/heroes.dart:579)
I/flutter ( 6710): #3      BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:653)
I/flutter ( 6710): #4      BindingBase&SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:596)
I/flutter ( 6710): #5      _beginFrame (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:83)

@Hixie and @HansMuller know about heros and routes. :)

any updates on this issue?

I've also run into it as part of fixing #7365, #6544 (see https://github.com/flutter/flutter/issues/7365#issuecomment-273947240). Working on a fix today.

authors: HansMuller eseidelGoogle vy0592


text:
NetworkImage as background which is the item in a long list crush the app in older phone(iPhone6+)

Steps to Reproduce
I have extracted all the unnecessary business logic and create a demo to isolate the issue, as in the link below:
https://github.com/SeasonLeee/network_image_as_background_list
(this demo require those who want to test it to have an UnSplash account or have your own way to fetch some image over internet)
What's driving me crazy is that there are no error message before the crushing.... Because the time schedule is really tight I don't even have the time to actually use devTool to profile the app to see where the issue actually happens...
I have done some research on the internet and realized that there are serious performance issue about this network image in the list... huge memory leak kind of stuff...
I'm not that experienced but this issue will make our app look really bad when it's released...
Besides, I want to use that performant version of image like Image.network, but because I am use Network image as background, which require image provider not image, so I can't use Image.network...
Any advice?
Expected results:
Using network-fetching-image in the background which is the item in a long list shouldn't crush older phone...
Actual results:
It crush...

Logs(My flutter doctor -v)
I wish there's log.... but the app just crush and it's run on real device so all I can see in the console is 'Lost connection...'

[✓] Flutter (Channel master, 1.25.0-5.0.pre.91, on macOS 11.1 20C69 darwin-x64, locale en-US)
    • Flutter version 1.25.0-5.0.pre.91 at /Users/benjaminli/software_dev/sdks/flutter
    • Framework revision 7dade22f25 (6 weeks ago), 2020-12-06 21:34:04 +0530
    • Engine revision 6491c7518f
    • Dart version 2.12.0 (build 2.12.0-120.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/benjaminli/Library/Android/Sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/benjaminli/Library/Android/Sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[✓] Proxy Configuration
    • HTTP_PROXY is set
    • NO_PROXY is localhost,127.0.0.1,LOCALHOST
    • NO_PROXY contains 127.0.0.1
    • NO_PROXY contains localhost

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.141

• No issues found!

Thanks in advance!

@SeasonLeee
I cloned your repo and ran it on iPhone 6s+ using latest master, but saw only loading indicator as below:

Also, per your note below:

(this demo require those who want to test it to have an UnSplash account or have your own way to fetch some image over internet)

We don't have such setup or config readily available to verify this. It'll be better if the issue is reproducible without any external dependency that requires creating an account or such.

@SeasonLeee
I cloned your repo and ran it on iPhone 6s+ using latest master, but saw only loading indicator as below:

Also, per your note below:

(this demo require those who want to test it to have an UnSplash account or have your own way to fetch some image over internet)

We don't have such setup or config readily available to verify this. It'll be better if the issue is reproducible without any external dependency that requires creating an account or such.

Yeah, of course all you can see is nothing but just that loading thing... and you kind of know why you face this issue is because you don't have UnSplash account which is how the app fetch the image which will be the key to demonstrate this issue I am facing because I'm having the problem with NetworkImage...
Maybe this issue happens in AssetImage as well but I haven't tried it...
You can replace the image source with the one you can use... According to the api guideline in UnSplash, I'm not allowed to share those clientId or whatsoever... so, please, all you need is network image!
Thanks!

Yeah, of course all you can see is nothing but just that loading thing... and you kind of know why you face this issue is because you don't have UnSplash account which is how the app fetch the image which will be the key to demonstrate this issue I am facing because I'm having the problem with NetworkImage...
Maybe this issue happens in AssetImage as well but I haven't tried it...
You can replace the image source with the one you can use... According to the api guideline in UnSplash, I'm not allowed to share those clientId or whatsoever... so, please, all you need is network image!
Thanks!

@SeasonLeee
are you sure is not an issue is with your api?
https://api.unsplash.com/photos returns  {"errors":["OAuth error: The access token is invalid"]}
and you your code your clientId is an empty string

@SeasonLeee
are you sure is not an issue is with your api?
https://api.unsplash.com/photos returns  {"errors":["OAuth error: The access token is invalid"]}
and you your code your clientId is an empty string

@iapicca Yes. I'm sure is not an issue with my api.
Because this is just a demo app.
And in our project we don't use UnSplash... we have our own server to feed our app images...
Besides... I have comment it out in my code that
https://github.com/SeasonLeee/network_image_as_background_list/blob/ff8f4b6975091b408a4870d32d2a08ff6e4a57f0/lib/main.dart#L37
I have said that get your own clientID in that address....
😅...
And I have stated it above clearly that it's not that I don't want to put the clientId in the code, but it's the rule that UnSplash not allow we just give it out the clientId... but... fine... I'm going to email the clientId to you and another guy in this thread..
Anyway, thanks for try it out!

@iapicca Yes. I'm sure is not an issue with my api.
Because this is just a demo app.
And in our project we don't use UnSplash... we have our own server to feed our app images...
Besides... I have comment it out in my code that
https://github.com/SeasonLeee/network_image_as_background_list/blob/ff8f4b6975091b408a4870d32d2a08ff6e4a57f0/lib/main.dart#L37
I have said that get your own clientID in that address....
😅...
And I have stated it above clearly that it's not that I don't want to put the clientId in the code, but it's the rule that UnSplash not allow we just give it out the clientId... but... fine... I'm going to email the clientId to you and another guy in this thread..
Anyway, thanks for try it out!

@SeasonLeee
I don't have an iPhone, can you try running this code sample or any intention to get apply for a client id
can you try to:

run flutter upgrade -f
run this code sample

@SeasonLeee
I don't have an iPhone, can you try running this code sample or any intention to get apply for a client id
can you try to:

run flutter upgrade -f
run this code sample

@SeasonLeee
I tried with Image.network using below code sample from your repo and saw images being loaded properly.  (iPhone 6s+)
@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: ListView.builder(
              itemBuilder: (BuildContext context, int index) => Image.network('https://picsum.photos/250?image=9'),
              itemCount: 20,
            ),
    );
  }

I am not sure though if it correctly represents your use case.

flutter doctor -v

[✓] Flutter (Channel beta, 1.25.0-8.2.pre, on Mac OS X 10.15.4 19E2269
    darwin-x64, locale en-IN)
    • Flutter version 1.25.0-8.2.pre at /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision b0a2299859 (2 weeks ago), 2021-01-05 12:34:13 -0800
    • Engine revision 92ae191c17
    • Dart version 2.12.0 (build 2.12.0-133.2.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (2 available)
    • Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 • ios
      • iOS 14.2
    • Chrome (web)              • chrome                                   •
      web-javascript • Google Chrome 87.0.4280.141

• No issues found!

Thanks @iapicca for digging in.

@SeasonLeee
I tried with Image.network using below code sample from your repo and saw images being loaded properly.  (iPhone 6s+)
@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: ListView.builder(
              itemBuilder: (BuildContext context, int index) => Image.network('https://picsum.photos/250?image=9'),
              itemCount: 20,
            ),
    );
  }

I am not sure though if it correctly represents your use case.

flutter doctor -v

[✓] Flutter (Channel beta, 1.25.0-8.2.pre, on Mac OS X 10.15.4 19E2269
    darwin-x64, locale en-IN)
    • Flutter version 1.25.0-8.2.pre at /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision b0a2299859 (2 weeks ago), 2021-01-05 12:34:13 -0800
    • Engine revision 92ae191c17
    • Dart version 2.12.0 (build 2.12.0-133.2.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (2 available)
    • Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 • ios
      • iOS 14.2
    • Chrome (web)              • chrome                                   •
      web-javascript • Google Chrome 87.0.4280.141

• No issues found!

Thanks @iapicca for digging in.

@darshankawar @iapicca Thank you both for spending time on my issue.
However, what you guys have tested is not the same as what I am dealing with here.
In my case, it is NetworkImage, a ImageProvider type specific to the child like Image or DecorationImage, that crush the app.
I am aware that Image.network is more performant in a long list but Image.network is not the type you can pass into DecorationImage, which is what I need here.
Please, I am dealing with NetworkImage not Image.network, both of which is practically not the same.
Besides, if you want to replicate in your device, @darshankawar I suggest you not using Image.network but NetworkImage, which will be something like:
      body: ListView.builder(
              itemBuilder: (BuildContext context, int index) => Image(image: NetworkImage('https://picsum.photos/250?image=9')),
              itemCount: 20,
            ),

Thank you!

@darshankawar @iapicca Thank you both for spending time on my issue.
However, what you guys have tested is not the same as what I am dealing with here.
In my case, it is NetworkImage, a ImageProvider type specific to the child like Image or DecorationImage, that crush the app.
I am aware that Image.network is more performant in a long list but Image.network is not the type you can pass into DecorationImage, which is what I need here.
Please, I am dealing with NetworkImage not Image.network, both of which is practically not the same.
Besides, if you want to replicate in your device, @darshankawar I suggest you not using Image.network but NetworkImage, which will be something like:
      body: ListView.builder(
              itemBuilder: (BuildContext context, int index) => Image(image: NetworkImage('https://picsum.photos/250?image=9')),
              itemCount: 20,
            ),

Thank you!

@SeasonLeee
Tried with NetworkImage on iPhone 6s using latest master and was able to load the images properly.

flutter doctor -v
[✓] Flutter (Channel master, 1.26.0-13.0.pre.177, on Mac OS X 10.15.4 19E2269
    darwin-x64, locale en-IN)
    • Flutter version 1.26.0-13.0.pre.177 at
      /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision 2eeeba9c09 (49 minutes ago), 2021-01-25 20:52:30 -0800
    • Engine revision 6e391c5942
    • Dart version 2.12.0 (build 2.12.0-257.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    ! CocoaPods 1.9.3 out of date (1.10.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin
        code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see
      https://guides.cocoapods.org/using/getting-started.html#installation for
      instructions.

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (3 available)
    • Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 • ios
      • iOS 14.2
    • macOS (desktop)           • macos                                    •
      darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
    • Chrome (web)              • chrome                                   •
      web-javascript • Google Chrome 88.0.4324.96

! Doctor found issues in 1 category.

@SeasonLeee
Tried with NetworkImage on iPhone 6s using latest master and was able to load the images properly.

flutter doctor -v
[✓] Flutter (Channel master, 1.26.0-13.0.pre.177, on Mac OS X 10.15.4 19E2269
    darwin-x64, locale en-IN)
    • Flutter version 1.26.0-13.0.pre.177 at
      /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision 2eeeba9c09 (49 minutes ago), 2021-01-25 20:52:30 -0800
    • Engine revision 6e391c5942
    • Dart version 2.12.0 (build 2.12.0-257.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    ! CocoaPods 1.9.3 out of date (1.10.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin
        code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see
      https://guides.cocoapods.org/using/getting-started.html#installation for
      instructions.

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (3 available)
    • Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 • ios
      • iOS 14.2
    • macOS (desktop)           • macos                                    •
      darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
    • Chrome (web)              • chrome                                   •
      web-javascript • Google Chrome 88.0.4324.96

! Doctor found issues in 1 category.

I'm sorry we can upgrade to the latest master channel like yours, I have tried in the past couple week when the version release, but it breaks our project which is build rely on older api or we have the same api name or something.
Anyway, I don't have the time to upgrade our project to keep up with the latest master channel.
And I think if you want to reproduce my issue, aren't you supposed to make your flutter branch like mine?
Yeah, I understand that it's couple branch gap there, this issue might be solved already... but, who knows!

I'm sorry we can upgrade to the latest master channel like yours, I have tried in the past couple week when the version release, but it breaks our project which is build rely on older api or we have the same api name or something.
Anyway, I don't have the time to upgrade our project to keep up with the latest master channel.
And I think if you want to reproduce my issue, aren't you supposed to make your flutter branch like mine?
Yeah, I understand that it's couple branch gap there, this issue might be solved already... but, who knows!

@SeasonLeee
The Flutter versions are upgraded to have better user experience and new features. We can't just use the same Flutter version to verify and test issues. Whenever issues are fixed, a new version is rolled out and it's always recommended to use the latest version of Flutter to get all new functionalities and features being offered by the framework.
Since we verified in latest version, it may have been fixed (not sure). Since we are unable to replicate the issue, it's tough to identify the root-cause of  issue you are facing and the issue might get closed since we don't have enough / exact reproducible use case to verify it.

@SeasonLeee
The Flutter versions are upgraded to have better user experience and new features. We can't just use the same Flutter version to verify and test issues. Whenever issues are fixed, a new version is rolled out and it's always recommended to use the latest version of Flutter to get all new functionalities and features being offered by the framework.
Since we verified in latest version, it may have been fixed (not sure). Since we are unable to replicate the issue, it's tough to identify the root-cause of  issue you are facing and the issue might get closed since we don't have enough / exact reproducible use case to verify it.

alright... that makes sense... I will try to upgrade our project to align
the latest version... it just... I'm really exhausted everyday...
at some point in my life I don't think I will make it to the next day.... I
have been really miserable in the job ever since my old manager left...
Thank you anyway...
On Tue, Jan 26, 2021 at 6:35 PM darshankawar notifications@github.com
wrote:

@SeasonLeee https://github.com/SeasonLeee
The Flutter versions are upgraded to have better user experience and new
features. We can't just use the same Flutter version to verify and test
issues. Whenever issues are fixed, a new version is rolled out and it's
always recommended to use the latest version of Flutter to get all new
functionalities and features being offered by the framework.
Since we verified in latest version, it may have been fixed (not sure).
Since we are unable to replicate the issue, it's tough to identify the
root-cause of issue you are facing and the issue might get closed since we
don't have enough / exact reproducible use case to verify it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/74334#issuecomment-767454478,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADH22K6GWO4TFHDC4QHIEK3S32LHNANCNFSM4WLBULRA
.

alright... that makes sense... I will try to upgrade our project to align
the latest version... it just... I'm really exhausted everyday...
at some point in my life I don't think I will make it to the next day.... I
have been really miserable in the job ever since my old manager left...
Thank you anyway...
On Tue, Jan 26, 2021 at 6:35 PM darshankawar notifications@github.com
wrote:

@SeasonLeee https://github.com/SeasonLeee
The Flutter versions are upgraded to have better user experience and new
features. We can't just use the same Flutter version to verify and test
issues. Whenever issues are fixed, a new version is rolled out and it's
always recommended to use the latest version of Flutter to get all new
functionalities and features being offered by the framework.
Since we verified in latest version, it may have been fixed (not sure).
Since we are unable to replicate the issue, it's tough to identify the
root-cause of issue you are facing and the issue might get closed since we
don't have enough / exact reproducible use case to verify it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/74334#issuecomment-767454478,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADH22K6GWO4TFHDC4QHIEK3S32LHNANCNFSM4WLBULRA
.

I have upgraded to the latest branch and the crash is not happening again.
But I do have another question even it's relevant but I think for the management's sake, I think I should continue it on another issue.
Closing this now.
Thanks for those who participated in the discussion.

@SeasonLeee
questions are better suited for stackoverflow

Yeah, I'm aware of the difference between GitHub issue and stack overflow.
The question I was talking about is more about certain design of the API,
not about wanting a help for my code, thank you.
On Wed, Feb 3, 2021, 12:17 AM Francesco Iapicca notifications@github.com
wrote:

@SeasonLeee https://github.com/SeasonLeee
questions are better suited for stackoverflow
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/74334#issuecomment-771752844,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADH22K2QZRAKRLQ2JCZT7L3S5AQQRANCNFSM4WLBULRA
.

authors: SeasonLeee darshankawar iapicca


text:
[tool_crash] FileSystemException: Cannot open file, OS Error: Permission denied, errno = 13

Command
flutter run

Steps to Reproduce

...
...
...

Logs
FileSystemException: Cannot open file, OS Error: Permission denied, errno = 13
#0      _File.throwIfError (dart:io/file_impl.dart:635:7)
#1      _File.openSync (dart:io/file_impl.dart:479:5)
#2      _File.readAsBytesSync (dart:io/file_impl.dart:539:18)
#3      _File.readAsStringSync (dart:io/file_impl.dart:584:18)
#4      ForwardingFile.readAsStringSync (package:file/src/forwarding/forwarding_file.dart:97:16)
#5      ForwardingFile.readAsStringSync (package:file/src/forwarding/forwarding_file.dart:97:16)
#6      _pluginFromPackage (package:flutter_tools/src/plugins.dart:317:53)
#7      findPlugins (package:flutter_tools/src/plugins.dart:352:27)
<asynchronous suspension>
#8      refreshPluginsList (package:flutter_tools/src/plugins.dart:1136:38)
#9      FlutterProject.ensureReadyForPlatformSpecificTooling (package:flutter_tools/src/project.dart:242:11)
#10     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:960:21)
<asynchronous suspension>
#11     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:836:33)
<asynchronous suspension>
#12     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart)
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
#14     _rootRun (dart:async/zone.dart:1190:13)
#15     _CustomZone.run (dart:async/zone.dart:1093:19)
#16     _runZoned (dart:async/zone.dart:1630:10)
#17     runZoned (dart:async/zone.dart:1550:10)
#18     AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
#19     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:825:20)
#20     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#21     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:335:21)

[✓] Flutter (Channel stable, 1.22.5, on Linux, locale en_IN)
    • Flutter version 1.22.5 at /home/erp/sdks/flutter
    • Framework revision 7891006299 (9 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /home/erp/Android/Sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_SDK_ROOT = /home/erp/Android/Sdk
    • Java binary at: /home/erp/Downloads/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup for
      more details.

[!] Android Studio
    • Android Studio at /home/erp/Downloads/android-studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • android-studio-dir = /home/erp/Downloads/android-studio
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.51.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.17.0

[✓] Connected device (1 available)
    • Moto G 5 Plus (mobile) • ZY223Z83JW • android-arm • Android 8.1.0 (API 27)

! Doctor found issues in 2 categories.

Flutter Application Metadata
Type: app
Version: 1.0.0+1
Material: true
Android X: false
Module: false
Plugin: false
Android package: null
iOS bundle identifier: null
Creation channel: stable
Creation framework version: 78910062997c3a836feee883712c241a5fd22983
Plugins
flutter_inappwebview-4.0.0+4
flutter_webview_plugin-0.3.11
fluttertoast-7.1.6
path_provider_linux-0.0.1+2
path_provider_windows-0.0.4+3
shared_preferences-0.5.12+4
shared_preferences_linux-0.0.2+4
shared_preferences_macos-0.0.1+11
shared_preferences_web-0.1.2+7
shared_preferences_windows-0.0.2+3
webview_flutter-1.0.7

Hi @BhagirathGadhesariya
There was a fix made recently and merged in Master. Please switch to latest master and try again to see if it works for you.
Thanks.

@TahaTesser thank you for your replay
i am update my flutter plugin and not its working proper

authors: BhagirathGadhesariya TahaTesser


text:
Dependency issues while trying to run legacy projects with Flutter 2 (issue with i18n support)

Steps to Reproduce
Here is a project I created with Flutter 1.22.6 and I am now trying to build with Flutter 2.0.1. It runs fine with Flutter 1.22.6. Unfortunately I can't even get to run flutter run with 2.0.1, because flutter pub get fails with the following error:
% flutter pub get
Running "flutter pub get" in blindly_copy...
Because blindly depends on flutter_localizations any from sdk which depends on intl 0.17.0, intl 0.17.0 is required.

So, because blindly depends on intl 0.16.1, version solving failed.
pub get failed (1; So, because blindly depends on intl 0.16.1, version solving failed.)

I used this guide on all my projects to implement internationalization, which is why all my projects depend on intl and flutter_localizations. But apparently Flutter 2 required version 0.17.0 of intl. So I upgrade this dependency to 0.17.0, and comment out dependency on date_time_picker that still needs to be updated to depend on intl 0.17.0, now I'm getting the following dependency issue:
% flutter pub get
Running "flutter pub get" in blindly_copy...
Because no versions of firebase_auth match >0.20.1 <0.21.0 and firebase_auth 0.20.1 depends on firebase_auth_web ^0.3.3, firebase_auth ^0.20.1 requires firebase_auth_web ^0.3.3.

Because firebase_auth_web 0.3.3 depends on intl ^0.16.1 and no versions of firebase_auth_web match >0.3.3 <0.4.0, firebase_auth_web ^0.3.3 requires intl ^0.16.1.
Thus, firebase_auth ^0.20.1 requires intl ^0.16.1.

So, because blindly depends on both intl ^0.17.0 and firebase_auth ^0.20.1, version solving failed.
pub get failed (1; So, because blindly depends on both intl ^0.17.0 and firebase_auth ^0.20.1, version solving failed.)

So now pretty much all of my Firebase dependencies need to be updated to be compatible with intl 0.17.0. Which I do, and now I'm getting an issue with url_launcher:
% flutter pub get
Running "flutter pub get" in blindly_copy...
Because no versions of url_launcher match >5.7.10 <6.0.0 and url_launcher 5.7.10 depends on url_launcher_platform_interface ^1.0.9, url_launcher ^5.7.10 requires url_launcher_platform_interface ^1.0.9.

And because no versions of url_launcher_platform_interface match >1.0.9 <2.0.0 and url_launcher_platform_interface 1.0.9 depends on plugin_platform_interface ^1.0.1, url_launcher ^5.7.10 requires plugin_platform_interface ^1.0.1.
And because firebase_core >=1.0.0 depends on firebase_core_platform_interface ^4.0.0 which depends on plugin_platform_interface ^2.0.0, url_launcher ^5.7.10 is incompatible with firebase_core >=1.0.0.

So, because blindly depends on both firebase_core ^1.0.0 and url_launcher ^5.7.10, version solving failed.
pub get failed (1; So, because blindly depends on both firebase_core ^1.0.0 and url_launcher ^5.7.10, version solving failed.)

So now I'm trying to update url_launcher to 6.0.2 so that it is compatible with Flutter 2. But now I'm getting an issue with google_fonts, so I update this one as well, but this one conflicts with validators that's not been updated. And it goes on and on like that and I can't get my build to run anymore.
And I see that on other similar projects, simply because flutter_localizations embedded in Flutter 2 depends on intl 0.17.0 which is incompatible with so many other dependencies.
For now, I downgraded Flutter to 1.22.6 so that my projects can build again. But is the solution just to wait for all the dependencies to be updated. Shouldn't old projects still build with the new version of Flutter without this?
Logs
% flutter doctor -v
[✓] Flutter (Channel stable, 2.0.1, on macOS 11.2.2 20D80 darwin-x64, locale fr-FR)
    • Flutter version 2.0.1 at /Users/sarbogast/fvm/versions/stable
    • Framework revision c5a4b4029c (il y a 2 jours), 2021-03-04 09:47:48 -0800
    • Engine revision 40441def69
    • Dart version 2.12.0

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/sarbogast/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Users/sarbogast/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Users/sarbogast/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Ultimate Edition (version 2020.3.2)
    • IntelliJ at /Users/sarbogast/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 54.0.3
    • Dart plugin version 203.7759

[✓] VS Code (version 1.53.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.19.0

[✓] Connected device (2 available)
    • iPhone 12 Pro (mobile) • E85E5DC8-065D-4C10-9849-0C40CCB3C417 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 88.0.4324.192
    ! Error: Séjour is busy: Waiting for Device. Xcode will continue when Séjour is finished. (code -10)

! Doctor found issues in 1 category.

Had a similar situation. Even wondered if it would a good idea to create a project setting called “flutter version” to easily manage incremental updates and flutter changes.

if you want to use flutter 2 and face such issues, update all packages to latest versions. if you still get errors, use dependency_overrides which forces to use some version with no respect to transitive dependencies

It's a never ending game of wack-a-mole. I tried to get rid of all the unmaintained deps and I end up with an incompatibility between the latest version of google_fonts and the latest version of Firebase, both maintained by Google. This is insane.

Hi @sarbogast
For the flutter_localizations package, it is now part of the framework, so to avoid ints conflicts, your dependency should depend in the framework:
flutter_localizations:
  sdk: flutter

Of other dependencies, please try to upgrade them to their latest version and see if that works for you.
Thank you

I am trying to be able to run my flutter app on the newest Flutter. After some version fiddling I am ending up with:
pub get failed (1; So, because labplus depends on both http ^0.13.0 and firebase_analytics ^7.1.0, version solving failed.)

again both packages are maintained by Google. Unfortunately, I can't see an easy way out of this.
Flutter doctor included:
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.0.1 20B29 darwin-x64, locale en-GB)
    • Flutter version 1.22.5 at /Users/luke/Frameworks/flutter
    • Framework revision 7891006299 (3 months ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4`

@pedromassango I already tried that and I'm getting the same issue as @lukeurban: 2 packages maintained by Google incompatible with each other:
% flutter pub get
Running "flutter pub get" in blindly_copy...
Because google_fonts >=2.0.0-nullsafety.0 depends on http ^0.13.0 and firebase >=5.0.3 <9.0.0 depends on http >=0.11.3 <0.13.0, google_fonts >=2.0.0-nullsafety.0 is incompatible with firebase >=5.0.3 <9.0.0.

And because firebase_analytics >=7.1.0 depends on firebase_analytics_web ^0.2.0 which depends on firebase ^7.3.0, google_fonts >=2.0.0-nullsafety.0 is incompatible with firebase_analytics >=7.1.0.
So, because blindly depends on both firebase_analytics ^7.1.0 and google_fonts ^2.0.0, version solving failed.
pub get failed (1; So, because blindly depends on both firebase_analytics ^7.1.0 and google_fonts ^2.0.0, version solving failed.)

You can try it for yourself with my project here. All the dependencies are up-to-date, and flutter pub get still fails.

As suggested above, you can use dependecy overrides to avoid those conflicts!

2 packages maintained by Google incompatible with each other

Those packages are not part of the Flutter team's packages (they are third-party package/plugins), I would suggest you to file an issue in their related repositories and probably close this issue.
For Firebase related issues:
https://github.com/FirebaseExtended/flutterfire/issues
For Google Fonts:
https://github.com/material-foundation/google-fonts-flutter/
I don't think there is much the Flutter team can do to help with this.
Thank you

@pedromassango I already tried that and I'm getting the same issue as @lukeurban: 2 packages maintained by Google incompatible with each other:
% flutter pub get
Running "flutter pub get" in blindly_copy...
Because google_fonts >=2.0.0-nullsafety.0 depends on http ^0.13.0 and firebase >=5.0.3 <9.0.0 depends on http >=0.11.3 <0.13.0, google_fonts >=2.0.0-nullsafety.0 is incompatible with firebase >=5.0.3 <9.0.0.

And because firebase_analytics >=7.1.0 depends on firebase_analytics_web ^0.2.0 which depends on firebase ^7.3.0, google_fonts >=2.0.0-nullsafety.0 is incompatible with firebase_analytics >=7.1.0.
So, because blindly depends on both firebase_analytics ^7.1.0 and google_fonts ^2.0.0, version solving failed.
pub get failed (1; So, because blindly depends on both firebase_analytics ^7.1.0 and google_fonts ^2.0.0, version solving failed.)

You can try it for yourself with my project here. All the dependencies are up-to-date, and flutter pub get still fails.

hi @sarbogast did you managed to resolve this? I had the same issue with firebase_analytics 7.1.0 and google_fonts 2.0.0. But there were new releases for FlutterFire dependencies a few days ago and I managed to resolve this by updating firebase_analytics to 7.1.1.

I have another issue with firebase packages flutterfire#5322. @benedictkhoo I am still waiting for the solution.
@pedromassango my app is live and I don't want to rush into temporary solutions as dependency overrides. I wish it to be resolved with a viable dependency connection. I'll wait with my upgrade. But thank you very much for the suggestion! ;)

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.

Re-opening to track the ecosystem upgrade that needs to happen.

Note that you can override intl to ^0.17.0 as a temporary workaround, but that will in itself cause issues later down the line even if it happens to work right now:
dependency_overrides:
  intl: ^0.17.0

The root of the problem here though is sdk vendored packages which have pub package dependencies. NNBD definitely highlights this because of the large number of packages with breaking changes, but it will always be a potential version lock problem. Note that this is regardless of pinning or version constraints (in this case it would have been a ^0.17.0 dep anyways presumably, which would have the same problem).
That is a very difficult problem to solve, but if we want to resolve the core issue that is the place to start IMO.

@amirh had written a tool that was "like Rosie but for GitHub" - I wonder if we might be able to drive some updates to the newer intl in the ecosystem, since in some cases it may trivially pass without substantive code updates?

There's at least one breaking change in called out in intl 0.17 in addition to potential breaking changes from the migration itself; trying to apply an LSC without knowing anything about whether the packages are affected by those breaking changes, or have sufficient test coverage that the PR would fail if they were, seems extremely risky.
@kevmoo Have you run the 0.16 query discussed above? Do we know how many packages are still using 0.16?

I don't think that information is public, so we'd need to enlist pub.dev folks.

https://pub.dev/api/packages/retry/metrics

Any updates here?

Sorting by popularity, the top ten plugins that are using something older than 0.17 (number in parentheses is its place on the list of all intl dependencies sorted by popularity:

flutter_money_formatter (32): ^0.15.8—Apparently abandoned, and doesn't work with previous stable versions of Flutter either.
angular (33): ^0.16.0—Has a fix on master, but unpublished
dash_chat (36): ^0.16.0—Has a fix on master, but unpublished
angular_components (41)  ^0.16.0
webfeed (45): ^0.16.0
bezier_chart (46):  ^0.16.0
horizontal_calendar_widget (56): ^0.16.1
flutter_clean_calendar  (63): ^0.16.1
commons (64): ^0.16.1
flutter_calendar (68): ^0.16.0

@kevmoo Can we just fix angular and angular_components?
(I'm skeptical about the utility of this sort, given that the one with the highest popularity score has been broken since well before Flutter 2.)

angular and angular_components are...tough. We need to get test passing
with all of the latest stuff.
Hoping to spend a bit more time here this week.
On Tue, Apr 13, 2021 at 7:41 PM stuartmorgan @.***>
wrote:

Sorting by popularity, the top ten plugins that are using something older
than 0.17 (number in parentheses is its place on the list of all intl
dependencies sorted by popularity:

flutter_money_formatter (32): ^0.15.8—Apparently abandoned, and
doesn't work with previous stable versions of Flutter either.
angular (33): ^0.16.0—Has a fix on master, but unpublished
dash_chat (36): ^0.16.0—Has a fix on master, but unpublished
angular_components (41) ^0.16.0
webfeed (45): ^0.16.0
bezier_chart (46): ^0.16.0
horizontal_calendar_widget (56): ^0.16.1
flutter_clean_calendar (63): ^0.16.1
commons (64): ^0.16.1
flutter_calendar (68): ^0.16.0

@kevmoo https://github.com/kevmoo Can we just fix angular and
angular_components?
(I'm skeptical about the utility of this sort, given that the one with the
highest popularity score has been broken since well before Flutter 2.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/77491#issuecomment-819179614,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAEFCUCYEKEQCX2WM4FNGLTIT6GXANCNFSM4YXGEEZQ
.

I don't think there is a reason to depend on both angular and flutter in the same project is there? If that assumption that is correct then these shouldn't be affected by flutter package dependencies.

...that, too!
On Wed, Apr 14, 2021 at 8:42 AM Jacob MacDonald @.***>
wrote:

I don't think there is a reason to depend on both angular and flutter in
the same project is there? If that assumption that is correct then these
shouldn't be affected by flutter package dependencies.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/77491#issuecomment-819618275,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAEFCXBS3A4N7SJJDE3E3LTIWZVZANCNFSM4YXGEEZQ
.

What is actionable here at this point? I'm eager for us to make progress but it's not clear to me what progress actually looks like here.

I don't know how many apps are flutter + angular. We are getting a bit closer to releasing the latest angular, but it's not going to be soon.
Otherwise, it's a matter of going after these other big blockers and getting them to migrate – right?

Otherwise, it's a matter of going after these other big blockers and getting them to migrate – right?

I think the issue is whether we know what the "big blockers" actually are. It seems very unlikely that an abandoned project to format money that didn't work in Flutter 1.20 either is actually a major blocker, but it's at the top of the popularity sort.
@jonasfj How much do we trust that the popularity score reflects real, current usage?

@stuartmorgan There are lots of caveats to our current popularity metrics.
As a relative number it's not entirely unfair, but it's biased in many unfortunate ways.
We also had a bug not long ago where pub would not send correct metadata about whether or not a dependency was direct or transitive.
On pub.dev we count transitive a weight of 0.1 and direct dependencies with a weight of 1, so getting that metadata wrong probably increased the popularity metric for a lot of packages like win32 and ffi which are frequently fetched as transitive dependencies.
If you look at things that depend on package:ffi, ordered by popularity you'll see:
https://pub.dev/packages?q=dependency%3Affi&sort=popularity
I'm guessing path_provider_windows which is used by path_provider, causes package:ffi and package:win32 to become very popular.
I think we've fixed the metadata, but that might not have reached the entirely population yet, I don't recall when/if it shipped.
The thing is that we only count requests going to pub.dev, and this depends a lot on client behavior.
For example, flutter pub get won't necessarily try to discover new versions for all dependencies, because it already has a version in pubspec.lock, so it's not attempted to upgrade.
And pub will rarely download package versions, because they are cached once in PUB_CACHE...
Add to this, the constant risk that we may not be successfully filtering out all CI platforms, and any one of those could skew our popularity metrics quite a bit.
Just saying: there are many ways in which these numbers aren't perfect.
I think they are reasonably good within an order of magnitude, there is a big difference between 100%, 99%, 90%, 10%, 1% popularity.
We are working to build better metrics in the future. If you have a specify package you're wondering about it might be worth looking at what depends on it.. maybe something there is popular. I can also go digging through a few logs to see what Dart / Flutter versions is using if that's interesting.

I think the issue is whether we know what the "big blockers" actually are. It seems very unlikely that an abandoned project to format money that didn't work in Flutter 1.20 either is actually a major blocker, but it's at the top of the popularity sort.

Jonas helped me dig into the numbers on this a bit, and it looks like the correct interpretation is not that the sort is wrong, but that the high end of that sort just isn't actually that high; there are so many packages that being 94% doesn't actually mean there are all that many users.
And looking at the issue tracker for the project, many of the bugs are about the compat issue with intl 0.15—from before Flutter 2—and people have suggested to each other to override that dependency, so it's likely that the reason there's still usage is that a certain number of people were already overriding intl to use it. That makes the level of usage it has much more plausible.
So it seems like the take-away from the list we have is that we don't actually have big blockers. Instead we have a long tail, which means there's not much we can reasonably do here; the LSC seems like the only thing that would have appreciable impact, but as mentioned above I don't see this as a safe candidate for an LSC.
My suggestion is that we close this as unactionable, unfortunately. We may want to file an issue about trying to come up with a generic solution for the problem of pinning third-party dependencies in the framework though, as this has happened before (like the 0.15/0.16 mismatch in the package above) and will happen again, even though it won't be at the scale of the Flutter 2/NNBD impact unless a similar ecosystem-wide migration happens again. @Hixie, thoughts?

Seems reasonable. Let's keep an eye out for whether something needs to change though.

Filed #81472 to consider whether we can reduce this kind of problem in the future.

authors: Hixie benedictkhoo jakemac53 jonasfj kevmoo lukeurban nt4f04uNd pedromassango pedromassangocode sarbogast stuartmorgan tvolkert


text:
TextStyle copyWith doesn't work as expected

Related Issue : https://github.com/flutter/flutter/issues/75897
Same with me, where TextStyle ..copyWith() not working on flutter :
Flutter 2.2.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 02c026b03c (2 weeks ago) • 2021-05-27 12:24:44 -0700
Engine • revision 0fdb562ac8
Tools • Dart 2.13.1
pubspec.yml
fonts:
    - family: Montserrat
      fonts:
        - asset: assets/fonts/Montserrat-Bold.ttf
        - asset: assets/fonts/Montserrat-Medium.ttf
        - asset: assets/fonts/Montserrat-Regular.ttf
        - asset: assets/fonts/Montserrat-Light.ttf
    - family: Roboto
      fonts:
        - asset: assets/fonts/Roboto/Roboto-Black.ttf
        - asset: assets/fonts/Roboto/Roboto-BlackItalic.ttf
        - asset: assets/fonts/Roboto/Roboto-Bold.ttf
          weight: 700
        - asset: assets/fonts/Roboto/Roboto-BoldItalic.ttf
          weight: 700
          style: italic
        - asset: assets/fonts/Roboto/Roboto-Italic.ttf
          style: italic
        - asset: assets/fonts/Roboto/Roboto-Light.ttf
        - asset: assets/fonts/Roboto/Roboto-LightItalic.ttf
          style: italic
        - asset: assets/fonts/Roboto/Roboto-Medium.ttf
        - asset: assets/fonts/Roboto/Roboto-MediumItalic.ttf
          style: italic
        - asset: assets/fonts/Roboto/Roboto-Regular.ttf
        - asset: assets/fonts/Roboto/Roboto-Thin.ttf
        - asset: assets/fonts/Roboto/Roboto-ThinItalic.ttf
          style: italic

class AppStyle {
  static const standart = TextStyle(
    fontSize: 14,
    fontWeight: FontWeight.w400,
    color: AppColors.textPrimary,
    fontFamily: 'Roboto',
  );
}

How Access?
Text(
            interst.name,
            style: AppStyle.medium
              ..copyWith(
                color: selected ? Colors.white : Color(0xFF0960ac),
              ),
          ),

Note:

No use 3rd library

.copyWith instead of ..copyWith.

@AlexV525 thanks, now working