Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrete Slider/RangeSlider has interpolation (?) errors #39510

Open
Tracked by #125329
repentsinner opened this issue Aug 29, 2019 · 14 comments
Open
Tracked by #125329

Discrete Slider/RangeSlider has interpolation (?) errors #39510

repentsinner opened this issue Aug 29, 2019 · 14 comments
Labels
f: material design flutter/packages/flutter/material repository. found in release: 3.3 Found to occur in 3.3 found in release: 3.7 Found to occur in 3.7 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list team-design Owned by Design Languages team triaged-design Triaged by Design Languages team

Comments

@repentsinner
Copy link

repentsinner commented Aug 29, 2019

Steps to Reproduce

  1. Create a discrete Slider/RangeSlider with min:0.0, max:35.0, divisions: 35 (or see main.dart)
  2. Build on Windows & run on a Pixel 2 or build on MacOS and run on an iPhone 7.
  3. Slide any of the thumbs to the 29th position.
  4. Expect the value to be 29.0, but instead receive 29.000000000000004

This also happens with:

max/divisions value
22 14.999999999999998
23 12.999999999999998
25 7.000000000000001, 14.000000000000002
...
35 29.000000000000004
38 21.000000000000004
39 25.000000000000004, 30.999999999999996
...

Current workaround is to insert .roundToDouble() methods in all of the onChange* callbacks to clean up the values before passing them out to the consumer.

Thanks for considering!

Logs

Analyzing flutter_range_slider_test...
No issues found! (ran in 1.2s)
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.18362.327], locale en-US)
    • Flutter version 1.7.8+hotfix.4 at C:\Users\deg\Development\flutter
    • Framework revision 20e59316b8 (6 weeks ago), 2019-07-18 20:04:33 -0700
    • Engine revision fee001c93f
    • Dart version 2.4.0

 
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    • Android SDK at C:\Users\deg\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.1
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.4)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 37.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[√] VS Code (version 1.37.1)
    • VS Code at C:\Users\deg\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.3.0

[√] Connected device (1 available)
    • Pixel 2 • FA79E1A01225 • android-arm64 • Android 9 (API 28)

• No issues found!

@BondarenkoStas BondarenkoStas added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. labels Aug 30, 2019
@HansMuller HansMuller added the f: material design flutter/packages/flutter/material repository. label Aug 30, 2019
@HansMuller
Copy link
Contributor

CC @clocksmith - maybe we're missing a clamp?

@jonans
Copy link

jonans commented Apr 23, 2020

Seeing the same problem probably due to floating point error. Any plans on a fix ?

                Slider.adaptive(value: widget._val,
                          label: widget._val.toString(),
                          onChanged: (x){
                              widget._val= x; 
                              setState((){});
                          },
                          min: 0,
                          max: 5,
                          divisions: 5 ~/ 0.2 ,
                 )

slider-rounding-error

@clocksmith clocksmith self-assigned this Apr 23, 2020
@clocksmith clocksmith added this to Backlog in Material Flutter - Sprint 36 via automation Apr 23, 2020
@clocksmith clocksmith moved this from Backlog to In progress in Material Flutter - Sprint 36 Apr 23, 2020
@clocksmith clocksmith moved this from In progress to Sprint + 1 in Material Flutter - Sprint 36 Apr 28, 2020
@clocksmith clocksmith moved this from Sprint + 1 to Current Sprint in Material Flutter - Sprint 36 May 12, 2020
@clocksmith clocksmith removed their assignment Jun 18, 2020
@clocksmith clocksmith moved this from Current Sprint to Backlog in Material Flutter - Sprint 36 Jun 18, 2020
@markusaksli-nc
Copy link
Member

Reproducible on the latest master 1.21.0-2.0.pre.66.

flutter doctor -v
[√] Flutter (Channel master, 1.21.0-2.0.pre.66, on Microsoft Windows [Version 10.0.18362.900], locale et-EE)
   • Flutter version 1.21.0-2.0.pre.66 at C:\Development\flutter_master
   • Framework revision 54c9441723 (2 days ago), 2020-07-17 18:56:12 -0400
   • Engine revision d327828632
   • Dart version 2.9.0 (build 2.9.0-21.0.dev 9dca49e71e)


[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
   • Android SDK at C:\Users\Isa\AppData\Local\Android\sdk
   • Platform android-30, build-tools 30.0.0
   • Java binary at: C:\Users\Isa\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6626763\jre\bin\java
   • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
   • All Android licenses accepted.

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

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.6.4)
   • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
   • Visual Studio Community 2019 version 16.6.30309.148
   • Windows 10 SDK version 10.0.18362.0

[√] Android Studio (version 4.0)
   • Android Studio at C:\Users\Isa\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6626763
   • Flutter plugin version 47.1.2
   • Dart plugin version 193.7361
   • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.47.2)
   • VS Code at C:\Users\Isa\AppData\Local\Programs\Microsoft VS Code
   • Flutter extension version 3.12.2

[√] Connected device (5 available)
   • SM G950F (mobile)       • ce12171c51cc001c03 • android-arm64  • Android 9 (API 28)
   • sdk gphone x86 (mobile) • emulator-5554      • android-x86    • Android 11 (API 30) (emulator)
   • Windows (desktop)       • windows            • windows-x64    • Microsoft Windows [Version 10.0.18362.900]
   • Web Server (web)        • web-server         • web-javascript • Flutter Tools
   • Chrome (web)            • chrome             • web-javascript • Google Chrome 84.0.4147.89

• No issues found!

@markusaksli-nc markusaksli-nc added found in release: 1.21 Found to occur in 1.21 has reproducible steps The issue has been confirmed reproducible and is ready to work on labels Jul 20, 2020
@MrBirb
Copy link
Contributor

MrBirb commented Aug 24, 2020

You mentioned this issue in your merged PR @guidezpl . Should this be closed?

@markusaksli-nc
Copy link
Member

That PR was just a fix for #60715. This is still reproducible on 1.22.0-2.0.pre.36.

flutter doctor -v
[√] Flutter (Channel master, 1.22.0-2.0.pre.36, on Microsoft Windows [Version 10.0.19041.450], locale en-US)
    • Flutter version 1.22.0-2.0.pre.36 at C:\Development\flutter_master
    • Framework revision d30e36ba8c (2 days ago), 2020-08-21 22:36:03 -0400
    • Engine revision d495da20d0
    • Dart version 2.10.0 (build 2.10.0-49.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at C:\Users\marku\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.1
    • Java binary at: C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6626763\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

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

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.6.5)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.6.30320.27
    • Windows 10 SDK version 10.0.18362.0

[√] Android Studio (version 4.0)
    • Android Studio at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6626763
    • Flutter plugin version 47.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] Connected device (4 available)
    • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)           • windows       • windows-x64    • Microsoft Windows [Version 10.0.19041.450]
    • Web Server (web)            • web-server    • web-javascript • Flutter Tools
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 84.0.4147.125

• No issues found!

@danielgomezrico
Copy link
Contributor

This is still happening on flutter 2.2.0

@apoleo88
Copy link

apoleo88 commented Nov 18, 2021

It is, also if you use

min: 40,
max: 42,
division: 10,

and you slide to the last value you will get as value 42.00000000000001 that is greater than max and get a bigger Exception:

'package:flutter/src/material/slider.dart': Failed assertion: line 166 pos 15: 'value >= min && value <= max': is not true.

And it won't render!

@guidezpl
Copy link
Member

cc @clocksmith

@repentsinner
Copy link
Author

Nice find @apoleo88 😩

and you slide to the last value you will get as value 42.00000000000001 that is greater than max and get a bigger Exception:

'package:flutter/src/material/slider.dart': Failed assertion: line 166 pos 15: 'value >= min && value <= max': is not true.

And it won't render!

@Khenisiddharth
Copy link

Khenisiddharth commented Jul 22, 2022

image

How to get float value?

Here is my code.

RangeValues _caratRangeValues = const RangeValues(0, 6);

RangeSlider(
values: _caratRangeValues,
min: 0,
max: 6,
divisions: 60,
activeColor: textColor,
inactiveColor: Colors.grey,
labels: RangeLabels(

                      _caratRangeValues.start.round().toString(),
                      _caratRangeValues.end.round().toString(),

                    ),
                    onChanged: (RangeValues values) {
                      setState(() {
                        _caratRangeValues = values;
                      });
                    },
                  ),

@maheshmnj
Copy link
Member

Hi @repentsinner, I can no longer reproduce it, I believe the bug is fixed, However, I do see some inconsistency, on Web the labels are shown as integer while it is double on mobile devices, and the Desktop.

@clocksmith Do you think we should file a separate issue for it?

Screen.Recording.2022-12-29.at.1.25.00.AM.mov
code sample
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      theme: ThemeData.dark(),
      home: const Home(),
    );
  }
}

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

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  final TextEditingController _controller =
      TextEditingController(text: 'Some long text to test the TextField');
  double sliderValue = 0.0;
  RangeValues _currentRangeValues = const RangeValues(40, 80);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: Center(
            child: Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        RangeSlider(
          values: _currentRangeValues,
          max: 100,
          divisions: 5,
          labels: RangeLabels(
            _currentRangeValues.start.toString(),
            _currentRangeValues.end.toString(),
          ),
          onChanged: (RangeValues values) {
            setState(() {
              _currentRangeValues = values;
            });
          },
        ),
        const SizedBox(height: 20),
        Slider.adaptive(
          value: sliderValue,
          label: sliderValue.toString(),
          onChanged: (x) {
            setState(() {
              sliderValue = x;
            });
          },
          min: 0,
          max: 5,
          divisions: 5 ~/ 0.2,
        )
      ],
    )));
  }
}
flutter doctor -v (mac)
[✓] Flutter (Channel master, 3.7.0-3.0.pre.33, on macOS 12.6 21G115 darwin-arm64, locale en-IN)
    • Flutter version 3.7.0-3.0.pre.33 on channel master 
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5201856805 (38 minutes ago), 2022-12-05 18:27:21 -0800
    • Engine revision a309d239c4
    • Dart version 2.19.0 (build 2.19.0-463.0.dev)
    • DevTools version 2.20.0
    • 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 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.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
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.55.20221129

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 108.0.5359.94

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
[✓] Flutter (Channel stable, 3.3.9, on macOS 12.6 21G115 darwin-arm, locale en-IN)
    • Flutter version 3.3.9 on channel stable at /Users/mahesh/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8f7f1f986 (24 hours ago), 2022-11-23 06:43:51 +0900
    • Engine revision 8f2221fbef
    • Dart version 2.18.5
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.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
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.53.20221101

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Closing as the original issue has been resolved. Incase anyon still encounters the issue, then please feel free to write in the comments and we will reopen it.

Thank you.

@maheshmnj maheshmnj added the r: fixed Issue is closed as already fixed in a newer version label Dec 29, 2022
@maheshmnj
Copy link
Member

Oops, I was able to reproduce it, Reopening!

image

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

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Flutter Demo',
      home: MyHomePage(title: 'Slider/RangeSlider Test'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  static const int divisions = 35;

  double _value = 0.0;
  RangeValues _values = RangeValues(0.0, divisions.toDouble());

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Slider(
              min: 0.0,
              max: divisions.toDouble(),
              divisions: divisions,
              value: _value,
              onChanged: (double value) {
                setState(() {
                  _value = value;
                });
              },
            ),
            Text('$_value'),
            RangeSlider(
              min: 0.0,
              max: divisions.toDouble(),
              divisions: divisions,
              values: _values,
              onChanged: (RangeValues value) {
                print(_values);
                setState(() {
                  _values = value;
                });
              },
            ),
            Text(
              '$_values',
            ),
          ],
        ),
      ),
    );
  }
}
logs
mahesh@Maheshs-MacBook-Air-M1 flutter_issue % flutterm run -d chrome
Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...             11.6s
This app is linked to the debug service: ws://127.0.0.1:63049/SzjEIEMw61I=/ws
Debug service listening on ws://127.0.0.1:63049/SzjEIEMw61I=/ws

💪 Running with sound null safety 💪

🔥  To hot restart changes while running, press "r" or "R".
For a more detailed help message, press "h". To quit, press "q".

An Observatory debugger and profiler on Chrome is available at: http://127.0.0.1:63049/SzjEIEMw61I=
The Flutter DevTools debugger and profiler on Chrome is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:63049/SzjEIEMw61I=

Performing hot restart...                                        2,545ms
Restarted application in 2,549ms.
RangeValues(0, 35)
RangeValues(1, 35)
RangeValues(2, 35)
RangeValues(3, 35)
RangeValues(4, 35)
RangeValues(5, 35)
RangeValues(6, 35)
RangeValues(7, 35)
RangeValues(8, 35)
RangeValues(9, 35)
RangeValues(10, 35)
RangeValues(11, 35)
RangeValues(12, 35)
RangeValues(13, 35)
RangeValues(14, 35)
RangeValues(15, 35)
RangeValues(16, 35)
RangeValues(17, 35)
RangeValues(18, 35)
RangeValues(19, 35)
RangeValues(20, 35)
RangeValues(21, 35)
RangeValues(22, 35)
RangeValues(21, 35)
RangeValues(20, 35)
RangeValues(19, 35)
RangeValues(18, 35)
RangeValues(17, 35)
RangeValues(16, 35)
RangeValues(15, 35)
RangeValues(14, 35)
RangeValues(13, 35)
RangeValues(12, 35)
RangeValues(10, 35)
RangeValues(9, 35)
RangeValues(8, 35)
RangeValues(7, 35)
RangeValues(6, 35)
RangeValues(5, 35)
RangeValues(4, 35)
RangeValues(3, 35)
RangeValues(2, 35)
RangeValues(1, 35)
RangeValues(0, 35)
RangeValues(1, 35)
RangeValues(2, 35)
RangeValues(4, 35)
RangeValues(7, 35)
RangeValues(11, 35)
RangeValues(14, 35)
RangeValues(17, 35)
RangeValues(20, 35)
RangeValues(21, 35)
RangeValues(23, 35)
RangeValues(24, 35)
RangeValues(26, 35)
RangeValues(27, 35)
RangeValues(28, 35)
RangeValues(29.000000000000004, 35)
RangeValues(30, 35)
RangeValues(31, 35)
RangeValues(30, 35)
RangeValues(29.000000000000004, 35)
RangeValues(28, 35)
RangeValues(27, 35)
RangeValues(26, 35)
RangeValues(25, 35)
RangeValues(24, 35)
RangeValues(23, 35)
RangeValues(22, 35)
RangeValues(21, 35)
RangeValues(22, 35)
RangeValues(23, 35)
RangeValues(24, 35)
RangeValues(25, 35)
RangeValues(26, 35)
RangeValues(25, 35)
RangeValues(24, 35)
RangeValues(23, 35)
RangeValues(22, 35)
RangeValues(21, 35)
RangeValues(20, 35)
RangeValues(19, 35)
RangeValues(18, 35)
RangeValues(17, 35)
RangeValues(16, 35)
RangeValues(15, 35)
RangeValues(14, 35)
RangeValues(13, 35)
RangeValues(12, 35)
RangeValues(11, 35)
RangeValues(10, 35)
RangeValues(9, 35)
RangeValues(10, 35)
RangeValues(11, 35)
RangeValues(12, 35)
RangeValues(13, 35)
RangeValues(14, 35)
RangeValues(15, 35)
RangeValues(16, 35)
RangeValues(17, 35)
RangeValues(18, 35)
RangeValues(19, 35)
RangeValues(20, 35)
RangeValues(21, 35)
RangeValues(22, 35)
RangeValues(23, 35)
RangeValues(24, 35)
RangeValues(25, 35)
RangeValues(26, 35)
RangeValues(27, 35)
RangeValues(28, 35)
RangeValues(29.000000000000004, 35)
RangeValues(30, 35)
RangeValues(29.000000000000004, 35)
RangeValues(28, 35)
flutter doctor -v (mac)
[✓] Flutter (Channel master, 3.7.0-3.0.pre.33, on macOS 12.6 21G115 darwin-arm64, locale en-IN)
    • Flutter version 3.7.0-3.0.pre.33 on channel master 
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5201856805 (38 minutes ago), 2022-12-05 18:27:21 -0800
    • Engine revision a309d239c4
    • Dart version 2.19.0 (build 2.19.0-463.0.dev)
    • DevTools version 2.20.0
    • 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 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.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
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.55.20221129

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 108.0.5359.94

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
[✓] Flutter (Channel stable, 3.3.9, on macOS 12.6 21G115 darwin-arm, locale en-IN)
    • Flutter version 3.3.9 on channel stable at /Users/mahesh/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8f7f1f986 (24 hours ago), 2022-11-23 06:43:51 +0900
    • Engine revision 8f2221fbef
    • Dart version 2.18.5
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.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
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.53.20221101

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

@maheshmnj maheshmnj reopened this Dec 29, 2022
@maheshmnj maheshmnj added found in release: 3.3 Found to occur in 3.3 found in release: 3.7 Found to occur in 3.7 and removed found in release: 1.21 Found to occur in 1.21 found in release: 1.22 Found to occur in 1.22 r: fixed Issue is closed as already fixed in a newer version labels Dec 29, 2022
@Piinks Piinks added the P2 Important issues not at the top of the work list label Jan 5, 2023
@rydmike
Copy link
Contributor

rydmike commented Jan 18, 2023

Seen this issue often as well, you can of course take care of the rounding issue outside the sliders and visual presentation of the values. I now always do that, but if it can be solved in the Widget already that would be nice.

@danielgomezrico
Copy link
Contributor

Our team end up using this package: https://pub.dev/packages/carousel_slider

Because that one does not have this issue 👀

@TahaTesser TahaTesser self-assigned this May 4, 2023
@TahaTesser TahaTesser removed their assignment Jun 19, 2023
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-design Owned by Design Languages team triaged-design Triaged by Design Languages team labels Jul 8, 2023
@gnprice gnprice removed the a: text input Entering text in a text field or keyboard related problems label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: material design flutter/packages/flutter/material repository. found in release: 3.3 Found to occur in 3.3 found in release: 3.7 Found to occur in 3.7 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list team-design Owned by Design Languages team triaged-design Triaged by Design Languages team
Projects
Status: Todo
Development

No branches or pull requests