Skip to content

RangeSlider shows an overlay for both thumbs when hovering over only one of them #165281

Closed

Description

@kszczek

Steps to reproduce

  1. Before clicking anything, try hovering over one of the thumbs and then the other.
  2. Grab and let go of one of the thumbs and then repeat the experiment from step 1.

Expected results

The overlay should only appear behind the thumb over which the mouse is currently hovering.

Actual results

An overlay is displayed for both thumbs, even though the mouse is hovering above only one of them.

Code sample

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

/// Flutter code sample for [RangeSlider].

void main() => runApp(const RangeSliderExampleApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('RangeSlider Sample')),
        body: const RangeSliderExample(),
      ),
    );
  }
}

class RangeSliderExample extends StatefulWidget {
  const RangeSliderExample({super.key});

  @override
  State<RangeSliderExample> createState() => _RangeSliderExampleState();
}

class _RangeSliderExampleState extends State<RangeSliderExample> {
  RangeValues _currentRangeValues = const RangeValues(40, 80);

  @override
  Widget build(BuildContext context) {
    return RangeSlider(
      values: _currentRangeValues,
      max: 100,
      divisions: 5,
      labels: RangeLabels(
        _currentRangeValues.start.round().toString(),
        _currentRangeValues.end.round().toString(),
      ),
      onChanged: (RangeValues values) {
        setState(() {
          _currentRangeValues = values;
        });
      },
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

Image

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.29.2, on Fedora Linux 41 (Workstation Edition) 6.12.11-200.fc41.x86_64, locale
    en_US.UTF-8) [236ms]
    • Flutter version 3.29.2 on channel stable at /home/kamil/.local/apps/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c236373904 (3 days ago), 2025-03-13 16:17:06 -0400
    • Engine revision 18b71d647a
    • Dart version 3.7.2
    • DevTools version 2.42.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [2.2s]
    • Android SDK at /home/kamil/Android/Sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /home/kamil/.local/apps/android-studio/jbr/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [141ms]
    • CHROME_EXECUTABLE = /usr/bin/brave-browser-stable

[✓] Linux toolchain - develop for Linux desktop [302ms]
    • clang version 19.1.7 (Fedora 19.1.7-2.fc41)
    • cmake version 3.30.7
    • ninja version 1.12.1
    • pkg-config version 2.3.0

[✓] Android Studio (version 2024.2) [140ms]
    • Android Studio at /home/kamil/.local/apps/android-studio
    • Flutter plugin version 83.0.3
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)

[✓] VS Code (version 1.97.1) [16ms]
    • VS Code at /usr/share/code
    • Flutter extension version 3.106.0

[✓] Connected device (2 available) [147ms]
    • Linux (desktop) • linux  • linux-x64      • Fedora Linux 41 (Workstation Edition) 6.12.11-200.fc41.x86_64
    • Chrome (web)    • chrome • web-javascript • Brave Browser 133.1.75.175

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

• No issues found!

Activity

  1. danagbemava-nc commented on Mar 17, 2025

    @danagbemava-nc
    Member

    Reproducible using the code sample and steps outlined above.

    Screen.Recording.2025-03-17.at.10.25.15.AM.mov
    flutter doctor -v
    [✓] Flutter (Channel stable, 3.29.2, on macOS 15.3.1 24D70 darwin-arm64, locale en-US) [2.6s]
        • Flutter version 3.29.2 on channel stable at /Users/deanli/dev/stable
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision c236373904 (4 days ago), 2025-03-13 16:17:06 -0400
        • Engine revision 18b71d647a
        • Dart version 3.7.2
        • DevTools version 2.42.3
    
    [!] Flutter (Channel master, 3.31.0-1.0.pre.87, on macOS 15.3.1 24D70 darwin-arm64, locale en-US) [2.8s]
        • Flutter version 3.31.0-1.0.pre.87 on channel master at /Users/deanli/dev/master
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 4bc24b0bf5 (7 hours ago), 2025-03-16 20:08:24 -0700
        • Engine revision 4bc24b0bf5
        • Dart version 3.8.0 (build 3.8.0-197.0.dev)
        • DevTools version 2.45.0-dev.0
    
  2. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    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 Mar 17, 2025
  3. added
    P2Important issues not at the top of the work list
    triaged-designTriaged by Design Languages team
    on Mar 19, 2025
  4. added a commit that references this issue on Apr 3, 2025
    503672f
  5. added
    r: fixedIssue is closed as already fixed in a newer version
    on Apr 3, 2025
  6. github-actions commented on Apr 17, 2025

    @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.

  7. locked as resolved and limited conversation to collaborators on Apr 17, 2025
  8. added a commit that references this issue on Jun 9, 2025
    aec1219
  9. added a commit that references this issue on Aug 14, 2025
    d8c1678
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 listfound in release: 3.29Found to occur in 3.29found in release: 3.31Found to occur in 3.31frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions