Repository navigation
RangeSlider dragged cursor is not visible if onChangeStart and onChangeEnd are not set. #179987
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.38Found to occur in 3.38Found to occur in 3.38found in release: 3.40Found to occur in 3.40Found to occur in 3.40frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Steps to reproduce
- Run the sample app from this issue
- Try to drag any handle and observe that the dragged cursor is not visible
- Uncomment
onChangeStartandonChangeEndcallbacks - Try to drag any handle again. The dragged cursor is now visible
Expected results
The dragged cursor appears no matter whether onChangeStart and onChangeEnd are set to be consistent with the Slider implementation.
after.mov
Actual results
The dragged cursor does not appear if onChangeStart and onChangeEnd are not set.
before.mov
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(App());
}
class App extends StatelessWidget {
const App({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: _Slider(),
),
),
);
}
}
class _Slider extends StatefulWidget {
const _Slider();
@override
State<_Slider> createState() => __SliderState();
}
class __SliderState extends State<_Slider> {
var _values = RangeValues(0.25, 0.75);
@override
Widget build(BuildContext context) {
return SizedBox(
width: 500,
height: 100,
child: Center(
child: SliderTheme(
data: SliderThemeData(
valueIndicatorColor: Colors.red,
showValueIndicator: ShowValueIndicator.alwaysVisible,
),
child: RangeSlider(
values: _values,
onChanged: (values) {
print('Slider values changed: $values');
setState(() {
_values = values;
});
},
// Uncomment those two callbacks to make the dragged cursor visible.
// onChangeStart: (_) {},
// onChangeEnd: (_) {},
mouseCursor: WidgetStateMouseCursor.resolveWith((states) {
if (states.contains(WidgetState.dragged)) {
return SystemMouseCursors.grabbing;
}
return SystemMouseCursors.click;
}),
),
),
),
);
}
}Flutter Doctor output
Doctor output
[✓] Flutter (Channel master, 3.40.0-1.0.pre-225, on macOS 15.6.1 24G90 darwin-arm64, locale en-US) [2.2s]
• Flutter version 3.40.0-1.0.pre-225 on channel master at /Users/ksokolovskyi/development/flutter_master
• Upstream repository [email protected]:ksokolovskyi/flutter.git
• FLUTTER_GIT_URL = [email protected]:ksokolovskyi/flutter.git
• Framework revision 109b65f0b8 (3 hours ago), 2025-12-17 02:36:19 -0500
• Engine revision 109b65f0b8
• Dart version 3.11.0 (build 3.11.0-253.0.dev)
• DevTools version 2.53.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations,
enable-native-assets, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [2.1s]
• Android SDK at /Users/ksokolovskyi/Library/Android/sdk
• Emulator version 35.4.9.0 (build_id 13025442) (CL:N/A)
• Platform android-36, build-tools 36.0.0
• ANDROID_HOME = /Users/ksokolovskyi/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/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.5+-13047016-b750.29)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.4) [990ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16F6
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [7ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Connected device (2 available) [9.0s]
• macOS (desktop) • macos • darwin-arm64 • macOS 15.6.1 24G90 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 143.0.7499.110
[✓] Network resources [1,560ms]
• All expected network resources are available.
• No issues found!Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.38Found to occur in 3.38Found to occur in 3.38found in release: 3.40Found to occur in 3.40Found to occur in 3.40frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Type
Projects
- StatusShow more project fieldsDone (PR merged)
Activity
Fix RangeSlider dragged cursor handling. (#179988)
Fix RangeSlider dragged cursor handling. (flutter#179988)
github-actions commentedon Jan 28, 2026
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 -vand a minimal reproduction of the issue.