Skip to content

ColorFiltered widget inside CustomScrollView causes other slivers to hide in Flutter Web #88866

@rasitayaz

Description

@rasitayaz

Steps to Reproduce

I have a widget tree in my app like following:

CustomScrollView(
  slivers: [
    SliverToBoxAdapter(
      child: ColorFiltered(
        colorFilter: ColorFilter.mode(
	  Styles.primaryColor,
	  BlendMode.color,
	),
	child: FlutterLogo(size: 200),
      ),
    ),
    SliverToBoxAdapter(
      child: Center(
        child: Text('Hello'),
      ),
    ),
  ],
);

Expected results:

a

NOTE: I edited this image to show what I want to achieve.

Actual results:

b

Without ColorFiltered widget:

c

I would like to point out that this bug only occurs on web build (tested on Chrome and Edge). It works as expected on Android build.

Logs

flutter run --verbose

[  +67 ms] executing: [D:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +402 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +2 ms] f4abaa0735eba4dfd8f33f73363911d63931fe03
[   +1 ms] executing: [D:\flutter/] git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[  +71 ms] Exit code 0 from: git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[   +1 ms] 2.2.3
[   +5 ms] executing: [D:\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +47 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[   +1 ms] origin/stable
[        ] executing: [D:\flutter/] git ls-remote --get-url origin
[  +46 ms] Exit code 0 from: git ls-remote --get-url origin
[   +1 ms] https://github.com/flutter/flutter
[ +121 ms] executing: [D:\flutter/] git rev-parse --abbrev-ref HEAD
[  +48 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +75 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +48 ms] executing: D:\Android\Sdk\platform-tools\adb.exe devices -l
[  +41 ms] List of devices attached
[   +4 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +65 ms] Multiple devices found:
[  +25 ms] Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159
[   +1 ms] Edge (web)   • edge   • web-javascript • Microsoft Edge 92.0.902.78
[   +1 ms] [1]: Chrome (chrome)
[        ] [2]: Edge (edge)
[   +2 ms] Please choose one (To quit, press "q/Q")

flutter analyze

No issues found! (ran in 2.7s)

flutter doctor

[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19042.1165], locale tr-TR)
    • Flutter version 2.2.3 at D:\flutter
    • Framework revision f4abaa0735 (8 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) 
    • Android SDK at D:\Android\Sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: D:\Program Files\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

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

[√] Android Studio (version 4.1.0)
    • Android Studio at D:\Program Files\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 1.8.0_242-release-1644-b01)

[√] IntelliJ IDEA Ultimate Edition (version 2021.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2021.2
    • 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.59.1)
    • VS Code at C:\Users\Rasit Ayaz\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.25.0

[√] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159
    • Edge (web)   • edge   • web-javascript • Microsoft Edge 92.0.902.78

• No issues found!

Metadata

Metadata

Labels

P1High-priority issues at the top of the work liste: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webfound in release: 2.2Found to occur in 2.2found in release: 2.5Found to occur in 2.5frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions