text:
PlatformException (PlatformException(ObjectDetectionError, com.google.mlkit.common.MlKitException:

PlatformException (PlatformException(ObjectDetectionError, com.google.mlkit.common.MlKitException: Failed to initialize detector. Unexpected number of dimensions for output index 0: got 3D, expected either 2D (BxN with B=1) or 4D (BxHxWxN with B=1, W=1, H=1)., null, null))

Could you provide more detail? or close for inactivity

Is there any update I having the same problem.

Yes i published an article for this. You can get help from this
https://link.medium.com/AcXM3sYykCb
On Thu, Mar 7, 2024, 11:11 AM Kapil Ramkhiladi Singh <
@.***> wrote:

Is there any update I having the same problem.
—
Reply to this email directly, view it on GitHub
https://github.com/flutter-ml/google_ml_kit_flutter/issues/450#issuecomment-1982504716,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUAJGOSY3L5FACKOBIW5FG3YXAAIBAVCNFSM6AAAAAAYM7ZM32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBSGUYDINZRGY
.
You are receiving this because you authored the thread.Message ID:
@.***>


text:
use plugin under minsdk 23

hi, thank you for great plugin
it's possible to use callkeep  under minSdk 23?

You can try to downgrade it to 23, TelecomManager requires 21, ConnectionService requires 23

@mrhaydari  Sir have you implemented this?? Can you help me. I am not able to work this package. Please!

source: gharchive/issue

authors: cloudwebrtc faisalmushtaq007 mrhaydari

repo: flutter-webrtc/callkeep

license: MIT

license_type: permissive

license_source: github-api


text:
TabBar issue, distance between the label and indicator controlled by a hard-coded value within tabs.dart of the source

const double _kTabHeight = 46.0;
const double _kTextAndIconTabHeight = 72.0;
these two values within the tabs.dart source file determine the distance between the label and the indicator below it, to an extent that you cannot really control that distance without editing the _kTabHeight and _kTextAndIconTabHeight variables within the flutter's source code

@therenca
Can you try by wrapping TabBar with PreferredSize widget and assign preferredSize property to it and see if that helps ?

authors: darshankawar therenca

repo: flutter/flutter


text:
Unable to run in iOS after my flutter upgrade & its in a new project

In android and web working fine. But when i am trying to run in simulator I am getting this error.

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.2, on macOS 12.3.1 21E258 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Connected device (2 available)
• No issues found!
Xcode Version:

@MuthuHere
You are on old version of the framework. Current one is 2.10.5. So I suggest you to upgrade to latest so that other tools such as XCode which you are using the latest version I presume would be able to support the framework properly.
Also, see this similar issue and solution and check if it works for you.

authors: MuthuHere darshankawar


text:
Terminal spamming I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true

this started to happen when I first use wifi debugging even when I used USB debugging it stays the same which is so annoying because I can't track my code progress.

part of the output
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/ViewRootImpl@6c31314[MainActivity](27264): ViewPostIme pointer 1
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/ViewRootImpl@6c31314[MainActivity](27264): ViewPostIme pointer 0
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]
I/MSHandlerLifeCycle(27264): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@661915a[MainActivity]

flutter doctor
  [√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.22000.675], locale en-US)
    • Flutter version 3.0.1 at C:\Dev\Flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (3 weeks ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\ahmed\AppData\Local\Android\Sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.67.2)
    • VS Code at C:\Users\ahmed\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.42.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.675]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 102.0.5005.63
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 101.0.1210.53

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

and there was also other spamming text.

Hello @A7mdlbanna. Could you include some reproduction steps?

Hello @A7mdlbanna. Could you include some reproduction steps?

what do you exactly mean by reproduction steps?

@A7mdlbanna I mean steps I can follow to try to reproduce the issue locally. What commands are you running and how do you get to that state? This will make it easier for me and others in the future to verify and investigate the issue.

@exaby73 so I was using USB debugging since the beginning, but yesterday I've decided to use wireless debugging.
but when I did use it on my Samsung galaxy note 20 I got the above junk text and much more, what I did exactly is just opened android studio and then I opened device manager -> physical -> pair using wifi, and then I scanned the QR code from my phone in Developer option -> wireless debugging. then I've pressed the triangle button below that runs the application

finally, I found all the spamming text in the terminal.
ps: I was using another phone for USB debugging and this issue never occurred before and even when I returned back to USB debugging on my Samsung device it didn't fix the spam thing.
what confuses me is that it works fine on the Huawei device but all the issues on the Samsung.
and there were no issues on the Samsung before using the wireless debugging

Hi @A7mdlbanna, can you check with a simple native android application to see if you still get the console spam?

Hi @danagbemava-nc, Thanks for replying!
I've tried to run a simple native app.
I got the following text when I first run the app with wireless debugging

Junk Text without touching anything
D/ActivityThread: setConscryptValidator
D/ActivityThread: setConscryptValidator - put
D/ActivityThread: handleBindApplication()++ app=com.example.myapplication
D/CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10413; state: ENABLED
V/GraphicsEnvironment: ANGLE Developer option for 'com.example.myapplication' set to: 'default'
V/GraphicsEnvironment: App is not on the allowlist for updatable production driver.
D/LoadedApk: LoadedApk::makeApplication() appContext.mOpPackageName=com.example.myapplication appContext.mBasePackageName=com.example.myapplication
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/ActivityThread: handleBindApplication() --
D/OpenGLRenderer: RenderThread::requireGlContext()
D/OpenGLRenderer: RenderThread::setGrContext()
I/DecorView: [INFO] isPopOver=false, config=true
I/DecorView: updateCaptionType >> DecorView@d01e8c4[], isFloating=false, isApplication=true, hasWindowControllerCallback=true, hasWindowDecorCaption=false
D/DecorView: setCaptionType = 0, this = DecorView@d01e8c4[]
I/DecorView: getCurrentDensityDpi: from real metrics. densityDpi=450 msg=resources_loaded
W/e.myapplicatio: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
W/e.myapplicatio: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: ignored. pkg=com.example.myapplication parent=null callers=com.android.internal.policy.DecorView.setVisibility:4295 android.app.ActivityThread.handleResumeActivity:5301 android.app.servertransaction.ResumeActivityItem.execute:54 android.app.servertransaction.ActivityTransactionItem.execute:45 android.app.servertransaction.TransactionExecutor.executeLifecycleState:176
I/MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@d01e8c4[]
I/ViewRootImpl@7891924[MainActivity]: setView = com.android.internal.policy.DecorView@d01e8c4 TM=true
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@d01e8c4[MainActivity]
I/ViewRootImpl@7891924[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=5 res=0x7 s={true 532127060112} ch=true fn=-1
D/hw-ProcessState: Binder ioctl to enable oneway spam detection failed: Invalid argument
D/OpenGLRenderer: eglCreateWindowSurface
I/ViewRootImpl@7891924[MainActivity]: [DP] dp(1) 1 android.view.ViewRootImpl.reportNextDraw:11387 android.view.ViewRootImpl.performTraversals:4185 android.view.ViewRootImpl.doTraversal:2911
D/ViewRootImpl@7891924[MainActivity]: Creating frameDrawingCallback nextDrawUseBlastSync=false reportNextDraw=true hasBlurUpdates=false
D/ViewRootImpl@7891924[MainActivity]: Creating frameCompleteCallback
I/Gralloc4: mapper 4.x is not supported
W/Gralloc3: mapper 3.x is not supported
D/ViewRootImpl@7891924[MainActivity]: Received frameDrawingCallback frameNum=1. Creating transactionCompleteCallback=false
I/gralloc: Arm Module v1.0
W/Gralloc4: allocator 4.x is not supported
W/Gralloc3: allocator 3.x is not supported
D/ViewRootImpl@7891924[MainActivity]: Received frameCompleteCallback  lastAcquiredFrameNum=1 lastAttemptedDrawFrameNum=1
I/ViewRootImpl@7891924[MainActivity]: [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$addFrameCompleteCallbackIfNeeded$3$ViewRootImpl:4987 android.view.ViewRootImpl$$ExternalSyntheticLambda16.run:6 android.os.Handler.handleCallback:938
I/ViewRootImpl@7891924[MainActivity]: [DP] rdf()
D/ViewRootImpl@7891924[MainActivity]: reportDrawFinished (fn: -1)
D/InsetsSourceConsumer: ensureControlAlpha: for ITYPE_NAVIGATION_BAR on com.example.myapplication/com.example.myapplication.MainActivity
D/InsetsSourceConsumer: ensureControlAlpha: for ITYPE_STATUS_BAR on com.example.myapplication/com.example.myapplication.MainActivity
I/ViewRootImpl@7891924[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/InputMethodManager: startInputInner - Id : 0
I/e.myapplicatio: Thread[5,tid=25249,WaitingInMainSignalCatcherLoop,Thread*=0x7bd5408a10,peer=0x13240f90,"Signal Catcher"]: reacting to signal 10
I/e.myapplicatio:
I/e.myapplicatio: SIGUSR1 forcing GC (no HPROF) and profile save
I/e.myapplicatio: Explicit concurrent copying GC freed 813(82KB) AllocSpace objects, 0(0B) LOS objects, 65% free, 3187KB/9331KB, paused 68us,33us total 20.924ms
D/[secipm]: mSecIpmManager setProfileLength com.example.myapplication profile:5061
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
I/ViewRootImpl@7891924[MainActivity]: handleAppVisibility mAppVisible=true visible=false
D/OpenGLRenderer: setSurface called with nullptr
D/OpenGLRenderer: setSurface() destroyed EGLSurface
D/OpenGLRenderer: destroyEglSurface
I/ViewRootImpl@7891924[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)8 dur=17 res=0x5 s={false 0} ch=true fn=5
I/ViewRootImpl@7891924[MainActivity]: stopped(true) old=false
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@d01e8c4[MainActivity]
I/ViewRootImpl@7891924[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputTransport: Input channel destroyed: 'ClientS', fd=114
I/ViewRootImpl@7891924[MainActivity]: handleAppVisibility mAppVisible=false visible=true
D/OpenGLRenderer: setSurface called with nullptr
I/ViewRootImpl@7891924[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)4 dur=10 res=0x1 s={false 0} ch=false fn=-1
I/ViewRootImpl@7891924[MainActivity]: stopped(false) old=true
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@d01e8c4[MainActivity]
I/ViewRootImpl@7891924[MainActivity]: stopped(false) old=false
I/DecorView: notifyKeepScreenOnChanged: keepScreenOn=false
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@d01e8c4[MainActivity]
D/OpenGLRenderer: setSurface called with nullptr
I/ViewRootImpl@7891924[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=5 res=0x7 s={true 532127060112} ch=true fn=-1
D/OpenGLRenderer: eglCreateWindowSurface
I/ViewRootImpl@7891924[MainActivity]: [DP] dp(1) 1 android.view.ViewRootImpl.reportNextDraw:11387 android.view.ViewRootImpl.performTraversals:4185 android.view.ViewRootImpl.doTraversal:2911
D/ViewRootImpl@7891924[MainActivity]: Creating frameDrawingCallback nextDrawUseBlastSync=false reportNextDraw=true hasBlurUpdates=false
D/ViewRootImpl@7891924[MainActivity]: Creating frameCompleteCallback
D/ViewRootImpl@7891924[MainActivity]: Received frameDrawingCallback frameNum=1. Creating transactionCompleteCallback=false
D/ViewRootImpl@7891924[MainActivity]: Received frameCompleteCallback  lastAcquiredFrameNum=1 lastAttemptedDrawFrameNum=1
I/ViewRootImpl@7891924[MainActivity]: [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$addFrameCompleteCallbackIfNeeded$3$ViewRootImpl:4987 android.view.ViewRootImpl$$ExternalSyntheticLambda16.run:6 android.os.Handler.handleCallback:938
I/ViewRootImpl@7891924[MainActivity]: [DP] rdf()
D/ViewRootImpl@7891924[MainActivity]: reportDrawFinished (fn: -1)
D/InsetsSourceConsumer: ensureControlAlpha: for ITYPE_NAVIGATION_BAR on com.example.myapplication/com.example.myapplication.MainActivity
D/InsetsSourceConsumer: ensureControlAlpha: for ITYPE_STATUS_BAR on com.example.myapplication/com.example.myapplication.MainActivity
I/ViewRootImpl@7891924[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/ProcessState: Binder ioctl to enable oneway spam detection failed: Invalid argument
D/ActivityThread: setConscryptValidator
D/ActivityThread: setConscryptValidator - put
D/ActivityThread: handleBindApplication()++ app=com.example.myapplication
D/CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10413; state: ENABLED
V/GraphicsEnvironment: ANGLE Developer option for 'com.example.myapplication' set to: 'default'
V/GraphicsEnvironment: App is not on the allowlist for updatable production driver.
D/LoadedApk: LoadedApk::makeApplication() appContext.mOpPackageName=com.example.myapplication appContext.mBasePackageName=com.example.myapplication
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/ActivityThread: handleBindApplication() --
D/OpenGLRenderer: RenderThread::requireGlContext()
D/OpenGLRenderer: RenderThread::setGrContext()
I/DecorView: [INFO] isPopOver=false, config=true
I/DecorView: updateCaptionType >> DecorView@d01e8c4[], isFloating=false, isApplication=true, hasWindowControllerCallback=true, hasWindowDecorCaption=false
D/DecorView: setCaptionType = 0, this = DecorView@d01e8c4[]
I/DecorView: getCurrentDensityDpi: from real metrics. densityDpi=450 msg=resources_loaded
W/e.myapplicatio: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
W/e.myapplicatio: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: ignored. pkg=com.example.myapplication parent=null callers=com.android.internal.policy.DecorView.setVisibility:4295 android.app.ActivityThread.handleResumeActivity:5301 android.app.servertransaction.ResumeActivityItem.execute:54 android.app.servertransaction.ActivityTransactionItem.execute:45 android.app.servertransaction.TransactionExecutor.executeLifecycleState:176
I/MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@d01e8c4[]
I/ViewRootImpl@7891924[MainActivity]: setView = com.android.internal.policy.DecorView@d01e8c4 TM=true
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@d01e8c4[MainActivity]
I/ViewRootImpl@7891924[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=5 res=0x7 s={true 532127060112} ch=true fn=-1
D/hw-ProcessState: Binder ioctl to enable oneway spam detection failed: Invalid argument
D/OpenGLRenderer: eglCreateWindowSurface
I/ViewRootImpl@7891924[MainActivity]: [DP] dp(1) 1 android.view.ViewRootImpl.reportNextDraw:11387 android.view.ViewRootImpl.performTraversals:4185 android.view.ViewRootImpl.doTraversal:2911
D/ViewRootImpl@7891924[MainActivity]: Creating frameDrawingCallback nextDrawUseBlastSync=false reportNextDraw=true hasBlurUpdates=false
D/ViewRootImpl@7891924[MainActivity]: Creating frameCompleteCallback
I/Gralloc4: mapper 4.x is not supported
W/Gralloc3: mapper 3.x is not supported
D/ViewRootImpl@7891924[MainActivity]: Received frameDrawingCallback frameNum=1. Creating transactionCompleteCallback=false
I/gralloc: Arm Module v1.0
W/Gralloc4: allocator 4.x is not supported
W/Gralloc3: allocator 3.x is not supported
D/ViewRootImpl@7891924[MainActivity]: Received frameCompleteCallback  lastAcquiredFrameNum=1 lastAttemptedDrawFrameNum=1
I/ViewRootImpl@7891924[MainActivity]: [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$addFrameCompleteCallbackIfNeeded$3$ViewRootImpl:4987 android.view.ViewRootImpl$$ExternalSyntheticLambda16.run:6 android.os.Handler.handleCallback:938
I/ViewRootImpl@7891924[MainActivity]: [DP] rdf()
D/ViewRootImpl@7891924[MainActivity]: reportDrawFinished (fn: -1)
D/InsetsSourceConsumer: ensureControlAlpha: for ITYPE_NAVIGATION_BAR on com.example.myapplication/com.example.myapplication.MainActivity
D/InsetsSourceConsumer: ensureControlAlpha: for ITYPE_STATUS_BAR on com.example.myapplication/com.example.myapplication.MainActivity
I/ViewRootImpl@7891924[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/InputMethodManager: startInputInner - Id : 0
I/e.myapplicatio: Thread[5,tid=25249,WaitingInMainSignalCatcherLoop,Thread*=0x7bd5408a10,peer=0x13240f90,"Signal Catcher"]: reacting to signal 10
I/e.myapplicatio:
I/e.myapplicatio: SIGUSR1 forcing GC (no HPROF) and profile save
I/e.myapplicatio: Explicit concurrent copying GC freed 813(82KB) AllocSpace objects, 0(0B) LOS objects, 65% free, 3187KB/9331KB, paused 68us,33us total 20.924ms
D/[secipm]: mSecIpmManager setProfileLength com.example.myapplication profile:5061
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
I/ViewRootImpl@7891924[MainActivity]: handleAppVisibility mAppVisible=true visible=false
D/OpenGLRenderer: setSurface called with nullptr
D/OpenGLRenderer: setSurface() destroyed EGLSurface
D/OpenGLRenderer: destroyEglSurface
I/ViewRootImpl@7891924[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)8 dur=17 res=0x5 s={false 0} ch=true fn=5
I/ViewRootImpl@7891924[MainActivity]: stopped(true) old=false
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@d01e8c4[MainActivity]
I/ViewRootImpl@7891924[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputTransport: Input channel destroyed: 'ClientS', fd=114
I/ViewRootImpl@7891924[MainActivity]: handleAppVisibility mAppVisible=false visible=true
D/OpenGLRenderer: setSurface called with nullptr
I/ViewRootImpl@7891924[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)4 dur=10 res=0x1 s={false 0} ch=false fn=-1
I/ViewRootImpl@7891924[MainActivity]: stopped(false) old=true
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@d01e8c4[MainActivity]
I/ViewRootImpl@7891924[MainActivity]: stopped(false) old=false
I/DecorView: notifyKeepScreenOnChanged: keepScreenOn=false
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@d01e8c4[MainActivity]
D/OpenGLRenderer: setSurface called with nullptr
I/ViewRootImpl@7891924[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=5 res=0x7 s={true 532127060112} ch=true fn=-1
D/OpenGLRenderer: eglCreateWindowSurface
I/ViewRootImpl@7891924[MainActivity]: [DP] dp(1) 1 android.view.ViewRootImpl.reportNextDraw:11387 android.view.ViewRootImpl.performTraversals:4185 android.view.ViewRootImpl.doTraversal:2911
D/ViewRootImpl@7891924[MainActivity]: Creating frameDrawingCallback nextDrawUseBlastSync=false reportNextDraw=true hasBlurUpdates=false
D/ViewRootImpl@7891924[MainActivity]: Creating frameCompleteCallback
D/ViewRootImpl@7891924[MainActivity]: Received frameDrawingCallback frameNum=1. Creating transactionCompleteCallback=false
D/ViewRootImpl@7891924[MainActivity]: Received frameCompleteCallback  lastAcquiredFrameNum=1 lastAttemptedDrawFrameNum=1
I/ViewRootImpl@7891924[MainActivity]: [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$addFrameCompleteCallbackIfNeeded$3$ViewRootImpl:4987 android.view.ViewRootImpl$$ExternalSyntheticLambda16.run:6 android.os.Handler.handleCallback:938
I/ViewRootImpl@7891924[MainActivity]: [DP] rdf()
D/ViewRootImpl@7891924[MainActivity]: reportDrawFinished (fn: -1)
D/InsetsSourceConsumer: ensureControlAlpha: for ITYPE_NAVIGATION_BAR on com.example.myapplication/com.example.myapplication.MainActivity
D/InsetsSourceConsumer: ensureControlAlpha: for ITYPE_STATUS_BAR on com.example.myapplication/com.example.myapplication.MainActivity
I/ViewRootImpl@7891924[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus

But after touching any button or just the screen the terminal spams the same text i got from the flutter app

after pressing anything
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]
I/ViewRootImpl@7891924[MainActivity]: ViewPostIme pointer 1
I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@d01e8c4[MainActivity]```
</details>

I've followed some similar issues and I believe the issue happens only on Samsung devices, Idk if this is because of the connection between flutter and Samsung devices or if it's just the device.
If you can handle this thing with Samsung it will be really useful.


text:
[BottomNavigationBarItem] make label a required parameter

Currently, the BottomNavigationBar widget expects to receive a list of BottomNavigationBarItem, and this BottomNavigationBarItem has a property icon which is required:

"The argument [icon] should not be null and the argument [label] should not be null when used in a Material Design's [BottomNavigationBar]."
Passing the required icon we see that the VSCode no longer points out an error, and we hope that everything can go well:

But, an "Assertion Failed" happens because the label == null.

My question is, why not make a BottomNavigationBarItem property label a required String?

The assert can be found in
https://github.com/flutter/flutter/blob/4a62876548e0df3de4fb9ad4a597e5d4a691453c/packages/flutter/lib/src/material/bottom_navigation_bar.dart#L204-L207
And the BottomNavigationBarItem label is nullable in
https://github.com/flutter/flutter/blob/4a62876548e0df3de4fb9ad4a597e5d4a691453c/packages/flutter/lib/src/widgets/bottom_navigation_bar_item.dart#L67
Labeling for further input from the team.

The CupertinoTabBar is also (typically) used with BottomNavigationBarItem and it does not require the label to be non-null.

authors: HansMuller danagbemava-nc joasdc


text:
Appbar actions doesn't respect the Appbar theme with Material3!

#111339

Hi @EhabSalah  as reported in https://github.com/flutter/flutter/issues/111339#issuecomment-1243290674, this has already been fixed. I just confirmed that the fix is also available on the beta channel so it should be in the next stable.
Since this has already been fixed, I'll be closing this issue. Thank you

authors: EhabSalah danagbemava-nc


text:
[Android] Support Samsung spell checker for spell check on text input

Currently, spell check on Android does not support the Samsung spell checker by default as it only currently supports the Gboard Latin-based IME (see the check for this). Besides modifying this check, support for the Samsung spell checker will require changes to the spell check logic; https://github.com/flutter/flutter/issues/119868 and https://github.com/flutter/flutter/issues/117167#issuecomment-1407247309 describe the case where the spell check results of the Samsung spell checker are being improperly interpreted.
Thus, to support this spell checker:

[ ] Modify the nativeSpellCheckServiceDefined engine parameter to be true when the Samsung spell checker is used.
[ ] Ensure that the Samsung spell checker results can be used to correctly render text.

It turns out that nativeSpellCheckServiceDefined may already be true for Samsung. https://github.com/flutter/engine/pull/40924 will suppress incorrect behavior caused by this for now.


text:
[go_router] GoRouter has an odd recursive build behavior. Or does it?

I'm seeing an odd curiosity when I try out GoRouter.
I suspect it's actually by design, but I'm not sure, so I'm here to clarify this.

flutter doctor -v
[√] Flutter (Channel stable, 3.7.8, on Microsoft Windows [Version 10.0.22621.1413], locale en-CA)
    • Flutter version 3.7.8 on channel stable at C:\Programs\Tools\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 90c64ed42b (6 days ago), 2023-03-21 11:27:08 -0500
    • Engine revision 9aa7816315
    • Dart version 2.19.5
    • DevTools version 2.20.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Programs\Tools\Android\SDK
    • Platform android-33, build-tools 33.0.0
    • ANDROID_HOME = C:\Programs\Tools\Android\SDK
    • ANDROID_SDK_ROOT = C:\Programs\Tools\Android\SDK
    • Java binary at: C:\Programs\Tools\Android\Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2022.1)
    • Android Studio at C:\Programs\Tools\Android\Studio
    • 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 11.0.15+0-b2043.56-9505619)

[√] IntelliJ IDEA Community Edition (version 2019.1)
    • IntelliJ at C:\Programs\Tools\Dart\IntelliJ
    • Flutter plugin version 35.0.3
    • Dart plugin version 191.7019

[√] Connected device (5 available)
    • ONEPLUS A5010 (mobile)           • c6a80e66      • android-arm64  • Android 10 (API 29)
    • sdk gphone x86 64 arm64 (mobile) • emulator-5554 • android-x64    • Android 11 (API 30) (emulator)
    • Windows (desktop)                • windows       • windows-x64    • Microsoft Windows [Version 10.0.22621.1413]
    • Chrome (web)                     • chrome        • web-javascript • Google Chrome 111.0.5563.111
    • Edge (web)                       • edge          • web-javascript • Microsoft Edge 111.0.1661.41

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Steps to Reproduce
Download the little demo app from this repo.
Tap on the graphic below to see a gif file displaying the demo app in action.
It's made up of nine State classes. One is called after the other.
Each has buttons so you can go back and forth between them.

The first link below is of my console recording what State objects are built when tapping up to Page 3 in the Demo app:
Up to Page 3
It makes sense, I guess.
It's recursively building all the State object up to the most recent one.
For example, pushing to page 3, the home page, page 1, and page 2 have their build functions called as well.
Guess it's part of sustaining the 'deep link' URL feature particularly desired by web apps.
However, as you progress through the screens in the little demo app, you'll see a different pattern come about.
It's not calling all the build functions from the State objects that proceeded anymore. It still 'rebuilds' the previous State object the router just left, but not before calling the build() functions of 'Page 1' and the 'Home' page:
Up to Page 9
Did you see the pattern in the screenshot above?
Why, with every new route, the last state object is always built again?
Why are the first two State objects in the series always rebuilt again as well??
The sample code is merely how the GoRouter class was set up. The full source code is in the  repo.

Sample code
 MaterialApp.router(
        title: 'Demo App',
        routerConfig: GoRouter(
          observers: [StateXRouteObserver.routeObserver!],
          routes: <RouteBase>[
            GoRoute(
              path: '/',
              builder: (BuildContext context, GoRouterState state) {
                return const HomePage();
              },
            ),
            GoRoute(
              path: '/page1',
              builder: (BuildContext context, GoRouterState state) {
                return const Page1();
              },
            ),
            GoRoute(
              path: '/page2',
              builder: (BuildContext context, GoRouterState state) {
                return const Page2();
              },
            ),
            GoRoute(
              path: '/page3',
              builder: (BuildContext context, GoRouterState state) {
                return const Page3();
              },
            ),
            GoRoute(
              path: '/page4',
              builder: (BuildContext context, GoRouterState state) {
                return const Page4();
              },
            ),
            GoRoute(
              path: '/page5',
              builder: (BuildContext context, GoRouterState state) {
                return const Page5();
              },
            ),
            GoRoute(
              path: '/page6',
              builder: (BuildContext context, GoRouterState state) {
                return const Page6();
              },
            ),
            GoRoute(
              path: '/page7',
              builder: (BuildContext context, GoRouterState state) {
                return const Page7();
              },
            ),
            GoRoute(
              path: '/page8',
              builder: (BuildContext context, GoRouterState state) {
                return const Page8();
              },
            ),
            GoRoute(
              path: '/page9',
              builder: (BuildContext context, GoRouterState state) {
                return const Page9();
              },
            ),
          ],
          debugLogDiagnostics: true,
        ),
      );

Console
Launching lib\main.dart on sdk gphone x86 64 arm64 in debug mode...
Running Gradle task 'assembleDebug'...
√  Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app-debug.apk...
Debug service listening on ws://127.0.0.1:51290/PcNG7dN7-84=/ws
Syncing files to device sdk gphone x86 64 arm64...
[GoRouter] Full paths for routes:
  => /
  => /page1
  => /page2
  => /page3
  => /page4
  => /page5
  => /page6
  => /page7
  => /page8
  => /page9

[GoRouter] setting initial location null
[GoRouter] Using MaterialApp configuration
I/flutter (14264): ###########  build() in HomePage
[GoRouter] pushing /page1
I/flutter (14264): ###########  initState() in _Page1State#06558(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page1State#06558(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage
[GoRouter] pushing /page2
I/flutter (14264): ###########  didPushNext() in _Page1State#06558
I/flutter (14264): ###########  initState() in _Page2State#91bee(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page2State#91bee(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page2State#91bee   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage
[GoRouter] pushing /page3
I/flutter (14264): ###########  didPushNext() in _Page2State#91bee
I/flutter (14264): ###########  initState() in _Page3State#56793(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page3State#56793(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page3State#56793   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage
I/flutter (14264): ###########  build() in _Page2State#91bee   counter: 0
[GoRouter] pushing /page4
I/flutter (14264): ###########  didPushNext() in _Page3State#56793
I/flutter (14264): ###########  initState() in _Page4State#c2bff(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page4State#c2bff(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page4State#c2bff   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage
I/flutter (14264): ###########  build() in _Page3State#56793   counter: 0
[GoRouter] pushing /page5
I/flutter (14264): ###########  didPushNext() in _Page4State#c2bff
I/flutter (14264): ###########  initState() in _Page5State#ff6fa(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page5State#ff6fa(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page5State#ff6fa   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage
I/flutter (14264): ###########  build() in _Page4State#c2bff   counter: 0
[GoRouter] pushing /page6
I/flutter (14264): ###########  didPushNext() in _Page5State#ff6fa
I/flutter (14264): ###########  initState() in _Page6State#e264c(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page6State#e264c(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page6State#e264c   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage
I/flutter (14264): ###########  build() in _Page5State#ff6fa   counter: 0
[GoRouter] pushing /page7
I/flutter (14264): ###########  didPushNext() in _Page6State#e264c
I/flutter (14264): ###########  initState() in _Page7State#478c5(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page7State#478c5(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page7State#478c5   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage
I/flutter (14264): ###########  build() in _Page6State#e264c   counter: 0
[GoRouter] pushing /page8
I/flutter (14264): ###########  didPushNext() in _Page7State#478c5
I/flutter (14264): ###########  initState() in _Page8State#47b7f(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page8State#47b7f(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page8State#47b7f   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage
I/flutter (14264): ###########  build() in _Page7State#478c5   counter: 0
[GoRouter] pushing /page9
I/flutter (14264): ###########  didPushNext() in _Page8State#47b7f
I/flutter (14264): ###########  initState() in _Page9State#55102(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page9State#55102(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page9State#55102   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage
I/flutter (14264): ###########  build() in _Page8State#47b7f   counter: 0

Thanks for the detailed issue, I can see the same behavior on the latest package version go_router: ^6.5.0. Labeling the issue for further insights!

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.7.8, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
    • Flutter version 3.7.8 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 90c64ed42b (34 hours ago), 2023-03-21 11:27:08 -0500
    • Engine revision 9aa7816315
    • Dart version 2.19.5
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 32.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14B47b
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2022.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 11.0.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • 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

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

[✓] Connected device (3 available)
    • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64  • Android 11 (API 30)
    • macOS (desktop)  • macos            • darwin-x64     • macOS 13.0.1 22A400 darwin-x64
    • Chrome (web)     • chrome           • web-javascript • Google Chrome 111.0.5563.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

[!] Flutter (Channel master, 3.9.0-18.0.pre.34, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
    • Flutter version 3.9.0-18.0.pre.34 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 0300cfa603 (85 minutes ago), 2023-03-27 23:31:11 -0700
    • Engine revision db8da7fb80
    • Dart version 3.0.0 (build 3.0.0-374.0.dev)
    • DevTools version 2.22.2
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 32.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14B47b
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2022.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 11.0.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • 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

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

[✓] Connected device (4 available)
    • RMX2001 (mobile)             • EUYTFEUSQSRGDA6D • android-arm64  • Android 11 (API 30)
    • AOSP on IA Emulator (mobile) • emulator-5554    • android-x86    • Android 9 (API 28) (emulator)
    • macOS (desktop)              • macos            • darwin-x64     • macOS 13.0.1 22A400 darwin-x64
    • Chrome (web)                 • chrome           • web-javascript • Google Chrome 111.0.5563.110

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

The only weird thing i saw in the log is that the page1 some how keep getting built. Otherwise it looks fine.

In my case, by just navigating to a link (e.g. /month) go_router calls pageBuilder twice, resulting in a weird effect since the user can see it's being loaded twice. Is this related to this issue? Do you know if rolling back to a previous version solves this, or whether this will be solved soon? thanks!

I have also that problem with go_router 7.1.1
This is a critical issue for me since my pages are heavy with network requests and list views.
Is something being done to fix this ?

I'm also experiencing weird behaviour. I have a screen where i show all products. When tap on a product, will navigate to detail product screen. After tapped on the product, the list products screen got rebuild, included new bloc. Lost all data. How to prevent rebuild when pushing ?

I think I got it.
I'll test further, but changing the GoRouter.of() from using the dependOnInheritedWidgetOfExactType() function to instead using the getInheritedWidgetOfExactType() function got rid of the unwanted rebuilds in my little test sample!
Why would you take such an approach??
Developers are unknowingly making a widget dependent on the InheritedWidget, InheritedGoRouter, when they're merely wanting to retrieve the GoRouter object so as to perform typical navigational operations.
I suspect this is the cause of these 'spontaneous rebuilds' people are complaining about here.
final router = GoRouter.of(context);  // <--- This widget will now rebuild with any subsequent navigational operation?!
router.push('/page1');

The changes to the two functions in the specified file below I believe have corrected the odd behavior I described in my original post:
go_router-8.0.2/lib/src/router.dart
  /// Find the current GoRouter in the widget tree.
  static GoRouter of(BuildContext context) {
    final InheritedGoRouter? inherited =
//        context.dependOnInheritedWidgetOfExactType<InheritedGoRouter>();
    context.getInheritedWidgetOfExactType<InheritedGoRouter>();
    assert(inherited != null, 'No GoRouter found in context');
    return inherited!.goRouter;
  }

  /// The current GoRouter in the widget tree, if any.
  static GoRouter? maybeOf(BuildContext context) {
    final InheritedGoRouter? inherited =
//        context.dependOnInheritedWidgetOfExactType<InheritedGoRouter>();
    context.getInheritedWidgetOfExactType<InheritedGoRouter>();
    return inherited?.goRouter;
  }

Indeed, I will encourage all those concerned to go to their cached copy of go_router and make the indicated changes below in its router.dart file.
The dependOnInheritedWidgetOfExactType() function induces the unwanted side-effect of rebuilding previous and underlying screens. It is my opinion, the getInheritedWidgetOfExactType() function should be used instead.
The  GoRouter.of(context)should just retrieve the GoRouter object!
Do this quickly now!
With more people finding this the solution, we're then justified in our findings and a PR will be sent in ASAP.
I'd do a PR myself, but it's a process for me frankly.  I'm just too busy.
The so-call 'workaround' for me was to abandon go_router and get on with my Life.  lol

Hi @Andrious thank you so much for this suggestion.
I can confirm that your solution works for me. But I don't know if this will produce any negative side effects since I don't really use InheritedWidgets.
Could you explain what are the popular use cases for using getInheritedWidgetOfExactType instead of dependOnInheritedWidgetOfExactType?
Or if someone from the flutter team can check if this solution is safe @chunhtai ?
Thank you a lot!

If you are using location or canPop from GoRouter, then you should use dependOnInheritedWidgetOfExactType. If you are using go/push/pop from gorouter, than it would be best to use getInheritedWidgetOfExactType.
I plan to remove location and canPop from the GoRouter, they should be able to be replaced by GoRouterState.of().location and Navigator.of().canpop. Once we done that, GoRouter.of will use getInheritedWidgetOfExactType to avoid adding dependency.

That's wonderful news, @chunhtai
This all wouldn't be significant if an alternate approach was readily available to retrieve the GoRouter object, but there's not one as far as I can see. All the 'context' methods, for example, use the GoRouter.of(context) function:
context.goNamed()
context.go()
context.push()
context.pushNamed()
context.pop()
context.pushReplacement()
context.pushReplacementNamed()
context.replace()
context.replaceNamed()
In my original post, I introduced an example app demonstrating the unwanted side-effect.
Look at the home page for example. Now just because it turns to go_router to open up Page 1 (see below), it's now included in every build with every subsequent route change (i.e. when a new page is opened).  Open up the Console below to see what I mean.
                    final router = GoRouter.of(context);
                    router.push('/page1');

Console
[GoRouter] setting initial location null
[GoRouter] Using MaterialApp configuration
I/flutter (14264): ###########  build() in HomePage
[GoRouter] pushing /page1
I/flutter (14264): ###########  initState() in _Page1State#06558(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page1State#06558(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage                                 <---------------  rebuilt again??
[GoRouter] pushing /page2
I/flutter (14264): ###########  didPushNext() in _Page1State#06558
I/flutter (14264): ###########  initState() in _Page2State#91bee(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page2State#91bee(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page2State#91bee   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage                                <---------------  rebuilt again??
[GoRouter] pushing /page3
I/flutter (14264): ###########  didPushNext() in _Page2State#91bee
I/flutter (14264): ###########  initState() in _Page3State#56793(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page3State#56793(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page3State#56793   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage                                 <---------------  rebuilt again??
I/flutter (14264): ###########  build() in _Page2State#91bee   counter: 0
[GoRouter] pushing /page4
I/flutter (14264): ###########  didPushNext() in _Page3State#56793
I/flutter (14264): ###########  initState() in _Page4State#c2bff(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page4State#c2bff(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page4State#c2bff   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage                                 <---------------  rebuilt again??
I/flutter (14264): ###########  build() in _Page3State#56793   counter: 0
[GoRouter] pushing /page5
I/flutter (14264): ###########  didPushNext() in _Page4State#c2bff
I/flutter (14264): ###########  initState() in _Page5State#ff6fa(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page5State#ff6fa(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page5State#ff6fa   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage                                 <---------------  rebuilt again??
I/flutter (14264): ###########  build() in _Page4State#c2bff   counter: 0
[GoRouter] pushing /page6
I/flutter (14264): ###########  didPushNext() in _Page5State#ff6fa
I/flutter (14264): ###########  initState() in _Page6State#e264c(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page6State#e264c(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page6State#e264c   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage                                 <---------------  rebuilt again??
I/flutter (14264): ###########  build() in _Page5State#ff6fa   counter: 0
[GoRouter] pushing /page7
I/flutter (14264): ###########  didPushNext() in _Page6State#e264c
I/flutter (14264): ###########  initState() in _Page7State#478c5(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page7State#478c5(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page7State#478c5   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage                                 <---------------  rebuilt again??
I/flutter (14264): ###########  build() in _Page6State#e264c   counter: 0
[GoRouter] pushing /page8
I/flutter (14264): ###########  didPushNext() in _Page7State#478c5
I/flutter (14264): ###########  initState() in _Page8State#47b7f(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page8State#47b7f(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page8State#47b7f   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage                                 <---------------  rebuilt again??
I/flutter (14264): ###########  build() in _Page7State#478c5   counter: 0
[GoRouter] pushing /page9
I/flutter (14264): ###########  didPushNext() in _Page8State#47b7f
I/flutter (14264): ###########  initState() in _Page9State#55102(lifecycle state: created)
I/flutter (14264): ###########  didPush() in _Page9State#55102(lifecycle state: initialized)
I/flutter (14264): ###########  build() in _Page9State#55102   counter: 0
I/flutter (14264): ###########  build() in _Page1State#06558   counter: 0
I/flutter (14264): ###########  build() in HomePage                                 <---------------  rebuilt again??
I/flutter (14264): ###########  build() in _Page8State#47b7f   counter: 0

I feel that behavior is unwanted and is caused by the use of dependOnInheritedWidgetOfExactType()  in GoRouter.of(context).
Now, if you view the next Console below, you see what I feel should be the proper behavior, and it's achieved by simply replacing, in the cached copy of go_router, the  dependOnInheritedWidgetOfExactType()   function with the getInheritedWidgetOfExactType() function.

Console
[GoRouter] setting initial location null
[GoRouter] Using MaterialApp configuration
I/flutter ( 5246): ###########  build() in HomePage
[GoRouter] pushing /page1
I/flutter ( 5246): ###########  initState() in _Page1State#a8890(lifecycle state: created)
I/flutter ( 5246): ###########  build() in _Page1State#a8890   counter: 0
[GoRouter] pushing /page2
I/flutter ( 5246): ###########  initState() in _Page2State#34aea(lifecycle state: created)
I/flutter ( 5246): ###########  build() in _Page2State#34aea   counter: 0
[GoRouter] pushing /page3
I/flutter ( 5246): ###########  initState() in _Page3State#3843f(lifecycle state: created)
I/flutter ( 5246): ###########  build() in _Page3State#3843f   counter: 0
[GoRouter] pushing /page4
I/flutter ( 5246): ###########  initState() in _Page4State#60b57(lifecycle state: created)
I/flutter ( 5246): ###########  build() in _Page4State#60b57   counter: 0
[GoRouter] pushing /page5
I/flutter ( 5246): ###########  initState() in _Page5State#4fb80(lifecycle state: created)
I/flutter ( 5246): ###########  build() in _Page5State#4fb80   counter: 0
[GoRouter] pushing /page6
I/flutter ( 5246): ###########  initState() in _Page6State#50a10(lifecycle state: created)
I/flutter ( 5246): ###########  build() in _Page6State#50a10   counter: 0
[GoRouter] pushing /page7
I/flutter ( 5246): ###########  initState() in _Page7State#ff8e6(lifecycle state: created)
I/flutter ( 5246): ###########  build() in _Page7State#ff8e6   counter: 0
[GoRouter] pushing /page8
I/flutter ( 5246): ###########  initState() in _Page8State#c79d9(lifecycle state: created)
I/flutter ( 5246): ###########  build() in _Page8State#c79d9   counter: 0
[GoRouter] pushing /page9
I/flutter ( 5246): ###########  initState() in _Page9State#a0919(lifecycle state: created)
I/flutter ( 5246): ###########  build() in _Page9State#a0919   counter: 0

As you see in the Console above, only the 'new' Pages have their build() function called.
Much better.
I have no reason for the widgets, HomePage  or  Page1 to be rebuilt every time as they were before.
The widget,  Page1, gets caught up in the builds only because it was in that widget where my sample app assigns the GoRouter object, goRouter, to the variable, router (see below). It is that variable that is then used in subsequent route changes....and you know what?  It was then that those unwanted side-effects in the original copy of go_router 'suddenly disappear.'
       if (app!.routerDelegate != null || app!.routerConfig != null) {
            router ??= GoRouter.of(context);
       }

The  dependOnInheritedWidgetOfExactType()   function simply does too much! It makes the widget ( via its context) subsequently rebuild itself every time the route changes again. I feel the getInheritedWidgetOfExactType() function should be used instead in the GoRouter.of() function.
I can see it as a necessary feature, but I feel it should be explicitly delegated to a separate function:
          /// Add the widget (via its context) as a dependent to the InheritedWidget,
          /// InheritedGoRouter.
          static bool addAsDependent(BuildContext context) {
              final inherited =
                      context.dependOnInheritedWidgetOfExactType<InheritedGoRouter>();
              return inherited != null;
          }

As for the repeated use of the getInheritedWidgetOfExactType() function to retrieve the GoRouter object, goRouter, from the widget tree. I feel it's only necessary to have one instance of the GoRouter object, don't you?
There could be a getter defined in the GoRouter class that then can be readily used by developers.
For example:     GoRouter.instance.go('/details');
  /// The [GoRouter] is made available as a static reference.
  static GoRouter? get instance => _goRouter;
  static GoRouter? _goRouter;

Assigning itself to the static variable, of course, would be done right in its constructor (see below):
  })  : backButtonDispatcher = RootBackButtonDispatcher(),
        assert(
          initialExtra == null || initialLocation != null,
          'initialLocation must be set in order to use initialExtra',
        ),
        assert(_debugCheckPath(routes, true)),
        assert(
            _debugVerifyNoDuplicatePathParameter(routes, <String, GoRoute>{})),
        assert(_debugCheckParentNavigatorKeys(
            routes,
            navigatorKey == null
                ? <GlobalKey<NavigatorState>>[]
                : <GlobalKey<NavigatorState>>[navigatorKey])) {
    // Retain this instance as a statis reference
    _goRouter = this;                                           //   <-----------  Done right then and there!

The GoRouter.of(context) function would continue to be used, but now a little more efficient in performance:
  /// Find the current GoRouter in the widget tree.
  static GoRouter of(BuildContext context) {
    // Supply this class itself as a static reference.
    if(_goRouter == null) {
      final InheritedGoRouter? inherited =
//        context.dependOnInheritedWidgetOfExactType<InheritedGoRouter>();
      context.getInheritedWidgetOfExactType<InheritedGoRouter>();
      assert(inherited != null, 'No GoRouter found in context');
      _goRouter = inherited!.goRouter;
    }
    return _goRouter!;
  }

Granted, the  getInheritedWidgetOfExactType() operation is a constant time of O(1) , but you're only going to have one instance of GoRouter, are you? Why would you have more than one Router?? That's a big app otherwise.
Giving the class a factory constructor and supplying that instance to a static reference would be a better approach, no?
You then clean up in its dispose function:
  @override
  void dispose() {
    _goRouter = null;            //    <------------  nice to release that reference.
    routeInformationProvider.dispose();
    routerDelegate.removeListener(_handleStateMayChange);
    routerDelegate.dispose();
    super.dispose();
  }

authors: Andrious DongNguyenQ chunhtai huycozy jamilsaadeh97 raquelhortab


text:
[flutter_tools] "OS Error: The handle is invalid" while trying to set echo mode on STDIN

On beta/3.12.0 on Windows
StdinException: Error setting terminal echo mode, OS Error: The handle is invalid., errno = 6
at Stdin.echoMode=(stdio_patch.dart:85)
at AnsiTerminal.singleCharMode=(terminal.dart:309)
at TerminalHandler.setupTerminal(resident_runner.dart:1678)
at RunCommand.runCommand.<anonymous closure>(run.dart:748)
at _rootRunUnary(zone.dart:1407)
at _CustomZone.runUnary(zone.dart:1308)
at <asynchronous gap>(async)

Even though we check if stdinHasTerminal right before this

cc @andrewkolos

It appears The handle is invalid., errno = 6 is all the information we are getting from Windows here. From a cursory Google search, it appears one way this can happen is if a process tries to interact with a handle when it is invalid (e.g. already closed).
This issue has appeared before. See this issue query: https://github.com/flutter/flutter/issues?q="OS+Error%3A+The+handle+is+invalid"
Due to the lack of repro of repro steps and relatively low number of users affected at this time, I won't be prioritizing this issue.

From a cursory Google search, it appears one way this can happen is if a process tries to interact with a handle when it is invalid (e.g. already closed).

Not sure if the reports we're getting from real users if STDIN could possibly be closed, since their terminal session was still active (and they saw the github issue link coming from STDOUT from the tool)

authors: andrewkolos christopherfujino


text:
Framework crashes on Android only

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
Hello Everyone,
I could not find clear steps, these crashes are shown only for android

are
Expected results
I expected them to do not appear since they are not on IOS
Actual results
Android crashes by Flutter are being increased
Code sample
Code sample
////

Screenshots or Video

Logs
No response
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.1, on macOS 13.3.1 22E261 darwin-x64, locale en-JO)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!

Hi @rehamalraee24. Thanks for filing this. Can we get more information about this? More specifically:

Can we get the full crash logs??
Does this happen when you run the app locally? If yes, can you upgrade to a newer version to confirm issue still persists?
Are there specific devices in which crash occurs?

Also, this might be similar to https://github.com/flutter/flutter/issues/83596.


text:
[Impeller] Still have color issues with BlendMode.screen

Steps to reproduce
I can still replay the issue B at #141160 .
Flutter version 3.19.3 and master channel 3.21.0-11.0.pre.42 .
Code list below.
Expected results
Green circle.

Actual results
black circle.

Code sample
Code sample
import 'package:flutter/material.dart';
import 'dart:ui' as ui;

void main() {
  runApp(const MyWidget());
}

class MyWidget extends StatelessWidget {
  const MyWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Align(
          alignment: Alignment.center,
          child: CustomPaint(
            size: Size.infinite,
            painter: BubbleLayerPainter(),
          ),
        ),
      ),
    );
  }
}

class BubbleLayerPainter extends CustomPainter {
  const BubbleLayerPainter();
  @override
  void paint(Canvas canvas, Size size) {
    final colorBlur = Paint()
      ..style = PaintingStyle.fill
      ..maskFilter = const MaskFilter.blur(BlurStyle.normal, 10)
      ..color = Colors.black;

    final center = size.center(Offset.zero);
    canvas.drawCircle(center, 128, colorBlur);
    final surface = Paint()
      ..blendMode = BlendMode.screen
      ..shader = ui.Gradient.linear(
         Offset.zero, Offset(0, size.height), [Colors.green, Colors.green]);
    canvas.drawPaint(surface);
  }

  @override
  bool shouldRepaint(BubbleLayerPainter oldDelegate) {
    return true;
  }
}

Screenshots or Video

Screenshots / Video demonstration

Impeller On
Impeller Off

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.19.3, on macOS 13.6 22G120 darwin-arm64, locale zh-Hans-CN)
    • Flutter version 3.19.3 on channel stable at /Users/abc/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ba39319843 (12 days ago), 2024-03-07 15:22:21 -0600
    • Engine revision 2e4ba9c6fb
    • Dart version 3.3.1
    • DevTools version 2.31.1
    • 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 34.0.0)
    • Android SDK at /Users/zhx/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode_15.2.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.15.2

[✓] Android Studio (version 2023.2)
    • 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 17.0.9+0-17.0.9b1087.7-11185874)

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

[✓] Connected device (1 available)
    • iPhone (mobile) • ___ • ios • iOS 16.5.1 20F75

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Hi @zhxst
I see the sample code is the same as https://github.com/flutter/flutter/issues/141160. There were two issues there (A and B). The sample code above is for case B which should be on a different issue. I update the code below for issue A.
But I see the issue disappeared on Flutter master channel. I'm not sure which PR fixed this. Could you try below sample code on master channel and confirm?

Sample code
import 'package:flutter/material.dart';
import 'dart:ui' as ui;

void main() {
  runApp(const MyWidget());
}

class MyWidget extends StatelessWidget {
  const MyWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Align(
          alignment: Alignment.center,
          child: CustomPaint(
            size: Size.infinite,
            painter: BubbleLayerPainter(),
          ),
        ),
      ),
    );
  }
}

class BubbleLayerPainter extends CustomPainter {
  const BubbleLayerPainter();
  @override
  void paint(Canvas canvas, Size size) {
    final colorBlur = Paint()
      ..style = PaintingStyle.fill
      ..maskFilter = const MaskFilter.blur(BlurStyle.normal, 10)
      ..color = Colors.black;

    final center = size.center(Offset.zero);
    canvas.drawCircle(center, 128, colorBlur);
    final surface = Paint()
      ..blendMode = BlendMode.screen
      ..color = Colors.green;
    // ..shader = ui.Gradient.linear(
    //    Offset.zero, Offset(0, size.height), [Colors.green, Colors.green]);
    canvas.drawPaint(surface);
  }

  @override
  bool shouldRepaint(BubbleLayerPainter oldDelegate) {
    return true;
  }
}

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.19.3, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.19.3 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ba39319843 (6 hours ago), 2024-03-07 15:22:21 -0600
    • Engine revision 2e4ba9c6fb
    • Dart version 3.3.1
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2023.2)
    • 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
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

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

[✓] Connected device (3 available)
    • iPhone (mobile) • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios            • iOS 15.8 19H370
    • macOS (desktop) • macos                                    • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)    • chrome                                   • web-javascript • Google Chrome 122.0.6261.112

[✓] Network resources
    • All expected network resources are available.

• No issues found!

[!] Flutter (Channel master, 3.21.0-11.0.pre.42, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.21.0-11.0.pre.42 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7ffd36cb6d (2 hours ago), 2024-03-19 21:04:25 -0400
    • Engine revision 3f67bc531e
    • Dart version 3.4.0 (build 3.4.0-248.0.dev)
    • DevTools version 2.34.0-dev.5
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2023.2)
    • 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
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

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

[✓] Connected device (4 available)
    • RMX2001 (mobile) • EUYTFEUSQSRGDA6D                         • android-arm64  • Android 11 (API 30)
    • iPhone (mobile)  • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios            • iOS 15.8 19H370
    • macOS (desktop)  • macos                                    • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)     • chrome                                   • web-javascript • Google Chrome 122.0.6261.129

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Hi @zhxst I see the sample code is the same as #141160. There were two issues there (A and B). The sample code above is for case B which should be on a different issue. I update the code below for issue A.
But I see the issue disappeared on Flutter master channel. I'm not sure which PR fixed this. Could you try below sample code on master channel and confirm?
Sample code
flutter doctor -v (stable and master)

Indeed issue A is Fixed, but Issue B is not.

Yes, please also help to update the description (text, results, and screenshots) as well to align with issue B.

This is exactly the code and screenshot for issue B.
And I have confirmed today with master channel 3.21.0-12.0.pre.36.

You are right, I also can reproduce issue B:
Actual result

On stable 3.19.3: a white screen on screen.
On master 3.21.0: a black blurred circle on screen.

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.19.4, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.19.4 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 68bfaea224 (29 hours ago), 2024-03-20 15:36:31 -0700
    • Engine revision a5c24f538d
    • Dart version 3.3.2
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2023.2)
    • 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
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

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

[✓] Connected device (3 available)
    • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64  • Android 11 (API 30)
    • macOS (desktop)  • macos            • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)     • chrome           • web-javascript • Google Chrome 123.0.6312.58

[✓] Network resources
    • All expected network resources are available.

• No issues found!

[!] Flutter (Channel master, 3.21.0-12.0.pre.40, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.21.0-12.0.pre.40 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d755bc222b (28 minutes ago), 2024-03-21 19:44:55 -0700
    • Engine revision e2f324beac
    • Dart version 3.4.0 (build 3.4.0-257.0.dev)
    • DevTools version 2.34.0-dev.5
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2023.2)
    • 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
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

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

[✓] Connected device (3 available)
    • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64  • Android 11 (API 30)
    • macOS (desktop)  • macos            • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)     • chrome           • web-javascript • Google Chrome 123.0.6312.58

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Could be a bug when attempting to apply the color filter on the CPU (or at least, that was the what the previous issue was):
https://github.com/flutter/engine/blob/main/impeller/aiks/canvas.cc#L39-L45

authors: huycozy jonahwilliams zhxst


text:
The framework should track which view has focus and notify changes to the engine

Use case
Autofocus annotations in widgets should cause the platform focus to move to right view if needed
Proposal
The framework should track which view has focus (if any) and as soon as it changes it should call PlatformDispatcher.requestViewFocusChange with the proper configuration so that the engine can react accordingly.

@tugorez is this the same as:

https://github.com/flutter/flutter/issues/144235

?

authors: ditman tugorez