Skip to content

Material Slider cannot automatically hide the overlay #139281

Closed

Description

@hgraceb

Is there an existing issue for this?

Steps to reproduce

  1. Change the value of the slider.
  2. Hover on the slider inside the thumb.
  3. Hover on the slider but outside the thumb.

Expected results

The overlay will auto-hide.

Actual results

The overlay isn't auto-hide.

Code sample

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

double _sliderValue = 20;

void main() {
  runApp(StatefulBuilder(builder: (context, setState) {
    return MaterialApp(
      home: Scaffold(
        body: Column(children: [
          Flexible(
            flex: 2,
            child: Slider(
              max: 100.0,
              divisions: 5,
              value: _sliderValue,
              label: '${_sliderValue.toInt()}',
              onChanged: (value) => setState(() => _sliderValue = value),
            ),
          ),
          Flexible(
            flex: 1,
            child: SizedBox(
              width: 100,
              child: FilledButton(
                onPressed: () => {},
                child: const Text('Button'),
              ),
            ),
          ),
        ]),
      ),
    );
  }));
}

Screenshots or Video

Screenshots / Video demonstration

slider3

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[√] Flutter (Channel master, 3.17.0-15.0.pre.20, on Microsoft Windows [版本 10.0.19044.3570], locale zh-CN)
    • Flutter version 3.17.0-15.0.pre.20 on channel master at D:\*******\Flutter\_flutter_master
    • Upstream repository https://github.com/flutter/flutter
    • Framework revision 4d75edb3c0 (6 days ago), 2023-11-23 17:09:23 -0500
    • Engine revision 152790b581
    • Dart version 3.3.0 (build 3.3.0-152.0.dev)
    • DevTools version 2.30.0-dev.4

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at G:\Android\Sdk
    • Platform android-34, build-tools 33.0.0
    • ANDROID_HOME = G:\Android\Sdk
    • Java binary at: D:\Program Files (x86)\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

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

[√] Visual Studio - develop Windows apps (Visual Studio Community 2019 16.11.30)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.11.34031.81
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 3.6)
    • Android Studio at D:\Program Files (x86)\Android Studio 3.6.3
    • 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_212-release-1586-b04)

[√] Android Studio (version 2021.3)
    • Android Studio at D:\Program Files (x86)\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 11.0.13+0-b1751.21-8125866)

[√] IntelliJ IDEA Ultimate Edition (version 2020.3)
    • IntelliJ at D:\Program Files (x86)\IntelliJ IDEA 2020.3.1
    • 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

[√] IntelliJ IDEA Ultimate Edition (version 2021.3)
    • IntelliJ at D:\Program Files (x86)\IntelliJ IDEA 2021.3.3
    • 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

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [版本 10.0.19044.3570]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 119.0.6045.160
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 119.0.2151.93

[√] Network resources
    • All expected network resources are available.

• No issues found!

Activity

  1. hgraceb commented on Nov 30, 2023

    @hgraceb
    MemberAuthor

    A pull request on #139021 now.

  2. added
    in triagePresently being triaged by the triage team
    on Nov 30, 2023
  3. huycozy commented on Nov 30, 2023

    @huycozy
    Member

    Thanks for filing the issue. Reproduced this on the latest Flutter stable and 3.13.9 as well.

    flutter doctor -v (stable and master)
    [✓] Flutter (Channel stable, 3.16.1, on macOS 14.1 23B74 darwin-x64, locale en-VN)
        • Flutter version 3.16.1 on channel stable at /Users/huynq/Documents/GitHub/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 7f20e5d18c (9 hours ago), 2023-11-27 09:47:30 -0800
        • Engine revision 22b600f240
        • Dart version 3.2.1
        • DevTools version 2.28.3
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
        • Android SDK at /Users/huynq/Library/Android/sdk
        • Platform android-34, build-tools 34.0.0
        • ANDROID_HOME = /Users/huynq/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 15A507
        • CocoaPods version 1.13.0
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [!] Android Studio (version unknown)
        • Android Studio at /Applications/Android Studio Preview.app/Contents
        • 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
        ✗ Unable to determine Android Studio version.
        • Java version OpenJDK Runtime Environment (build 17.0.8+0-17.0.8b1000.22-10799086)
    
    [✓] Android Studio (version 2022.3)
        • Android Studio at /Applications/Android Studio Giraffe Patch 3.app/Contents
        • 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 17.0.6+0-17.0.6b829.9-10027231)
    
    [✓] Android Studio (version 2022.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • 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
        • android-studio-dir = /Applications/Android Studio.app/
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    
    [✓] VS Code (version 1.84.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.76.0
    
    [✓] Connected device (3 available)
        • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64  • Android 11 (API 30)
        • macOS (desktop)  • macos            • darwin-x64     • macOS 14.1 23B74 darwin-x64
        • Chrome (web)     • chrome           • web-javascript • Google Chrome 119.0.6045.159
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
    [!] Flutter (Channel master, 3.17.0-18.0.pre.59, on macOS 14.1 23B74 darwin-x64, locale en-VN)
        • Flutter version 3.17.0-18.0.pre.59 on channel master at /Users/huynq/Documents/GitHub/flutter_master
        ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision cae47c4641 (66 minutes ago), 2023-11-29 18:19:30 -0800
        • Engine revision 35939ca853
        • Dart version 3.3.0 (build 3.3.0-170.0.dev)
        • DevTools version 2.30.0-dev.4
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
        • Android SDK at /Users/huynq/Library/Android/sdk
        • Platform android-34, build-tools 34.0.0
        • ANDROID_HOME = /Users/huynq/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 15A507
        • CocoaPods version 1.13.0
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [!] Android Studio (version unknown)
        • Android Studio at /Applications/Android Studio Preview.app/Contents
        • 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
        ✗ Unable to determine Android Studio version.
        • Java version OpenJDK Runtime Environment (build 17.0.8+0-17.0.8b1000.22-10799086)
    
    [✓] Android Studio (version 2022.3)
        • Android Studio at /Applications/Android Studio Giraffe Patch 3.app/Contents
        • 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 17.0.6+0-17.0.6b829.9-10027231)
    
    [✓] Android Studio (version 2022.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • 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
        • android-studio-dir = /Applications/Android Studio.app/
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    
    [✓] VS Code (version 1.84.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.76.0
    
    [✓] Connected device (3 available)
        • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64  • Android 11 (API 30)
        • macOS (desktop)  • macos            • darwin-x64     • macOS 14.1 23B74 darwin-x64
        • Chrome (web)     • chrome           • web-javascript • Google Chrome 119.0.6045.159
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 2 categories.
  4. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    team-designOwned by Design Languages team
    and removed
    in triagePresently being triaged by the triage team
    on Nov 30, 2023
  5. added a commit that references this issue on Dec 4, 2023
    5530c10
  6. added
    r: fixedIssue is closed as already fixed in a newer version
    on Dec 5, 2023
  7. github-actions commented on Dec 19, 2023

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

  8. locked as resolved and limited conversation to collaborators on Dec 19, 2023
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

    found in release: 3.16Found to occur in 3.16found in release: 3.17Found to occur in 3.17frameworkflutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions