Skip to content

[material_ui] Slider(year2023: false): secondary track is not mirrored correctly in RTL #194279

Closed
flutter/packages
#13226

Description

@SalehTZ

What package does this bug report belong to?

material_ui

What target platforms are you seeing this bug on?

Android, Web, Linux

Have you already upgraded your packages?

Yes

Dependency versions

pubspec.lock
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
  async:
    dependency: transitive
    description:
      name: async
      sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.13.1"
  boolean_selector:
    dependency: transitive
    description:
      name: boolean_selector
      sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.1.2"
  characters:
    dependency: transitive
    description:
      name: characters
      sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.4.1"
  clock:
    dependency: transitive
    description:
      name: clock
      sha256: e51d50bca3217c9a9fa2b41a30e4a38971133f5f9ec7a3d57bae095007f1d28e
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.1.3"
  collection:
    dependency: transitive
    description:
      name: collection
      sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.19.1"
  cupertino_icons:
    dependency: "direct main"
    description:
      name: cupertino_icons
      sha256: "41e005c33bd814be4d3096aff55b1908d419fde52ca656c8c47719ec745873cd"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.0.9"
  cupertino_ui:
    dependency: transitive
    description:
      name: cupertino_ui
      sha256: ea0b8170b40a86262b2fc21ac0625303f52df209dbf6fccc2b98b27eff44f6ce
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.1.2"
  fake_async:
    dependency: transitive
    description:
      name: fake_async
      sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.3.3"
  flutter:
    dependency: "direct main"
    description: flutter
    source: sdk
    version: "0.0.0"
  flutter_lints:
    dependency: "direct dev"
    description:
      name: flutter_lints
      sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "6.0.0"
  flutter_localizations:
    dependency: transitive
    description: flutter
    source: sdk
    version: "0.0.0"
  flutter_test:
    dependency: "direct dev"
    description: flutter
    source: sdk
    version: "0.0.0"
  intl:
    dependency: transitive
    description:
      name: intl
      sha256: "1ca20c894b1717686a2319b8548763d812bc0aabdac580420a44c5178c57a867"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.20.3"
  leak_tracker:
    dependency: transitive
    description:
      name: leak_tracker
      sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "11.0.2"
  leak_tracker_flutter_testing:
    dependency: transitive
    description:
      name: leak_tracker_flutter_testing
      sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "3.0.10"
  leak_tracker_testing:
    dependency: transitive
    description:
      name: leak_tracker_testing
      sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "3.0.2"
  lints:
    dependency: transitive
    description:
      name: lints
      sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "6.1.0"
  matcher:
    dependency: transitive
    description:
      name: matcher
      sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.12.20"
  material_color_utilities:
    dependency: transitive
    description:
      name: material_color_utilities
      sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.13.0"
  material_ui:
    dependency: "direct main"
    description:
      name: material_ui
      sha256: "98ab9eda579ecae623e4b376c603035c5def78ce706f735f30bd632af5814695"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.6.0"
  meta:
    dependency: transitive
    description:
      name: meta
      sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.19.0"
  path:
    dependency: transitive
    description:
      name: path
      sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.9.1"
  sky_engine:
    dependency: transitive
    description: flutter
    source: sdk
    version: "0.0.0"
  source_span:
    dependency: transitive
    description:
      name: source_span
      sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.10.2"
  stack_trace:
    dependency: transitive
    description:
      name: stack_trace
      sha256: "277654b3034d17ac6f9f1cb5595db011b1d5d41e8806866db28e0abaa101c490"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.12.2"
  stream_channel:
    dependency: transitive
    description:
      name: stream_channel
      sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.1.4"
  string_scanner:
    dependency: transitive
    description:
      name: string_scanner
      sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.4.1"
  term_glyph:
    dependency: transitive
    description:
      name: term_glyph
      sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.2.2"
  test_api:
    dependency: transitive
    description:
      name: test_api
      sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.7.12"
  vector_math:
    dependency: transitive
    description:
      name: vector_math
      sha256: "92b9910f66ed1057fd4da7b040ae7c74cafacf885bdc81be496928d5049b032d"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.4.3"
  vm_service:
    dependency: transitive
    description:
      name: vm_service
      sha256: "5f37239c4851efcef929cea7824e76df7f2f0970aef85d66bbc430afa40e72f0"
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "15.3.0"
sdks:
  dart: ">=3.13.5 <4.0.0"
  flutter: ">=3.47.0"

Steps to reproduce

  1. Run the code sample below.
  2. Compare the top slider (LTR) with the bottom slider (RTL). Both use Slider(year2023: false, value: 0.4, secondaryTrackValue: 0.75).

Expected results

In RTL the secondary (buffered) track is the mirror image of the LTR one. It stops trackGap short of the thumb so the gap stays empty. Its far end is fully rounded and its end next to the thumb has the small 2px corners.

Actual results

In RTL the secondary track runs all the way to the thumb center, so it fills the gap beside the thumb. The corners are also swapped: the far end has the small corners and the end by the thumb is fully rounded.

Code sample

Code sample
import 'package:material_ui/material_ui.dart';

/// `Slider(year2023: false)` with a `secondaryTrackValue`.
/// The same slider is shown in LTR (top) and RTL (bottom).
void main() => runApp(const ReproGapped());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: <Widget>[
              for (final TextDirection direction
                  in TextDirection.values.reversed)
                Directionality(
                  textDirection: direction,
                  child: SizedBox(
                    width: 300,
                    child: SliderTheme(
                      data: const SliderThemeData(trackHeight: 24),
                      child: Slider(
                        // ignore: deprecated_member_use
                        year2023: false,
                        value: 0.4,
                        secondaryTrackValue: 0.75,
                        onChanged: (double value) {},
                      ),
                    ),
                  ),
                ),
            ],
          ),
        ),
      ),
    );
  }
}

Screenshots or Videos

Screenshots / Video demonstration Image Image
issue2_gapped_secondary_track_rtl.mp4

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[✓] Flutter (Channel stable, 3.47.7, on Ubuntu 26.04.1 LTS 7.0.0-38-generic, locale en_US.UTF-8) [41ms]
    • Flutter version 3.47.7 on channel stable at /home/ne/DevFolder/sdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision abaf9c5237 (5 days ago), 2026-10-08 09:51:21 -0700
    • Engine revision deb287481e
    • Dart version 3.13.5
    • DevTools version 2.60.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn
    • Feature flags: enable-web, enable-linux-desktop, no-enable-macos-desktop, no-enable-windows-desktop,
      enable-android, no-enable-ios, enable-custom-devices, cli-animations, enable-native-assets, enable-record-use,
      enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

[✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [1,348ms]
    • Android SDK at /home/ne/DevFolder/sdk/android
    • Emulator version 36.2.12.0 (build_id 14214601) (CL:N/A)
    • Platform android-37.1, build-tools 37.0.0
    • ANDROID_HOME = /home/ne/DevFolder/sdk/android
    • Java binary at: /usr/lib/jvm/java-17-openjdk-amd64/bin/java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.20.1+1-1-26.04-Ubuntu)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [11ms]
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop [297ms]
    • Ubuntu clang version 21.1.8 (6ubuntu1)
    • cmake version 4.2.3
    • ninja version 1.13.2
    • pkg-config version 2.5.1
    • OpenGL core renderer: Mesa Intel(R) UHD Graphics 730 (ADL-S GT1)
    • OpenGL core version: 4.6 (Core Profile) Mesa 26.0.8-1ubuntu0.3
    • OpenGL core shading language version: 4.60
    • OpenGL ES renderer: Mesa Intel(R) UHD Graphics 730 (ADL-S GT1)
    • OpenGL ES version: OpenGL ES 3.2 Mesa 26.0.8-1ubuntu0.3
    • OpenGL ES shading language version: OpenGL ES GLSL ES 3.20
    • GL_EXT_framebuffer_blit: yes
    • GL_EXT_texture_format_BGRA8888: yes

[✓] Proxy Configuration [35ms]
    • HTTP_PROXY is set
    • NO_PROXY is localhost,127.0.0.1,localaddress,.localdomain.com,::1,192.168.1.1
    • NO_PROXY contains localhost
    • NO_PROXY contains 127.0.0.1
    • NO_PROXY contains ::1

[✓] Connected device (2 available) [277ms]
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 26.04.1 LTS 7.0.0-38-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 145.0.7632.116

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

• No issues found!

Activity

  1. saurabh-mirajkar commented on Oct 13, 2026

    @saurabh-mirajkar
    Contributor

    @SalehTZ Thanks for the report!

    I reproduced this issue using Flutter 3.47.7 (Dart 3.13.5) with material_ui 1.6.0. The reported behavior occurs on both Chrome (Web) and an Android 17 emulator (API 37). I haven't tested Linux desktop as I don't have that environment available.

    Routing this to the team for further investigation.

  2. added
    platform-androidAndroid applications specifically
    p: material_uimaterial_ui package in flutter/packages
    a: internationalizationSupporting other languages or locales. (aka i18n)
    platform-webWeb applications specifically
    packageflutter/packages repository. See also p: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-designOwned by Design Languages team
    and removed
    in triagePresently being triaged by the triage team
    on Oct 13, 2026
  3. github-actions commented on Nov 12, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyplatform-webWeb applications specificallyteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages teamwaiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions