Skip to content

TileMode.mirror rendering error on SM-G981V #162891

@jt274

Description

@jt274

Steps to reproduce

Create a Container with a BoxDecoration using a LinearGradient with TileMode.mirror. This works on other devices/platforms, such as Android 15 emulator and iOS 18 (iPhone 11), but on Android 12 (Galaxy S20) only renders a black box instead of the gradient. Additional OS versions have not been tested. Using a different TileMode works fine.

Expected results

TileMode.mirror should work the same across all platforms.

Actual results

The container is rendered as solid black, instead of the applied gradient.

Code sample

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

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

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 50,
      width: 50,
      decoration: const BoxDecoration(
        gradient: LinearGradient(
          begin: Alignment.topLeft,
          end: Alignment.bottomRight,
          stops: <double>[0.3, 0.9],
          tileMode: TileMode.mirror,
          colors: <Color>[
            Colors.red,
            Colors.green,
          ],
        ),
      ),
      child: const Material(
        color: Colors.transparent,
        child: Center(
          child: Text(
            'Hello there',
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.27.4, on Microsoft Windows [Version 10.0.26100.3037], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/windows-android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2019 16.10.0)
[√] Android Studio (version 2024.3)
[√] VS Code (version 1.96.4)
[√] Connected device (5 available)
[√] Network resources

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work liste: impellerImpeller rendering backend issues and features requeststeam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions