Skip to content

Web LinearGradient not smooth #168798

Closed
@tototo23

Description

@tototo23

Steps to reproduce

  1. Create a Container with a linear gradient in a BoxDecoration (not contrasted)
  2. Run it on different platforms

Expected results

Supposed to be smooth on each platform.
Example :

Image

Actual results

On Android, iOS, Windows, it looks smooth.
On the web, it shows visible steps.

Image

Code sample

Code sample
Container(
   decoration: BoxDecoration(
      gradient : LinearGradient(
         colors: const [
            Color(0xff324958),
            Color(0xff26323a),
         ],
         begin: Alignment.bottomLeft,
         end: Alignment.topRight
      )
   ),
   //child: ...
)

Screenshots or Video

Image

Logs

No response

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.29.3, on Microsoft Windows [version 10.0.26100.3915], locale fr-FR)
[√] Windows Version (11 Professionnel 64-bit, 24H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.12.3)
[√] Android Studio (version 2024.3.2)
[√] IntelliJ IDEA Community Edition (version 2025.1)
[√] VS Code (version 1.96.4)
[√] Connected device (2 available)
[√] Network resources

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listgood first issueRelatively approachable for first-time contributorsplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-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