-
Notifications
You must be signed in to change notification settings - Fork 906
Closed
Description
Building and application where i need a range slider from values from 1-1000.
So the Start value goes to 0 but when i drag the slider from 1000 to the min it just goes min to 300 and not below that one.
How can we drag it below that, I don't want it to overlap on one another as it will make some issues. But some near value like 10 would salve the thing.
Will be attaching the Gif for the issue that i am getting below:
Posting the Code below:
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_sliders/sliders.dart';
void main() {
return runApp(RangeSelectorApp());
}
/// This widget will be the root of application.
class RangeSelectorApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Range Selector Demo',
home: MyHomePage(),
);
}
}
/// This widget is the home page of the application.
class MyHomePage extends StatefulWidget {
/// Initialize the instance of the [MyHomePage] class.
const MyHomePage({Key? key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
_MyHomePageState();
late double startValue = 0.0;
late double endValue = 0.0;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Syncfusion Flutter Range Selector'),
),
body: Container(
margin: EdgeInsets.zero,
padding: EdgeInsets.zero,
child: Stack(
children: <Widget>[
Padding(
padding: const EdgeInsets.only(top: 50),
child: Center(
child: Column(
children: [
Text('Start : ${startValue}'),
Text(' End : ${endValue}'),
],
),
),
),
Padding(
padding: const EdgeInsets.only(top: 10),
child: Center(
// ignore: missing_required_param
child: SfRangeSlider(
min: 0.0,
max: 10.0,
values: SfRangeValues(
startValue,
endValue,
),
onChanged: (SfRangeValues value) {
print('Start : ${value.start}');
print('End : ${value.end}');
setState(() {
startValue = value.start as double;
endValue = value.end as double;
});
},
),
),
),
],
)),
);
}
}
Metadata
Metadata
Assignees
Labels
No labels
