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
RangeSlider labels for value change overlaps #76466
Comments
@boks21 |
Hi @boks21 |
Hello Pedro When I move the left and right thumb and they are close, the value indicator text is overlaped. There should be a way for no thumb to say whether I want the value indicator above or below. That's it, thanks flutter doctor -v code sampleimport 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(title: 'Horários da Fertagus'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
final List<String> estacoes = ["Roma-Areeiro","Entrecampos","Sete-Rios","Campolide","Pragal","Corroios"," Foros Amora","Fogueteiro",
"Coina","Penalva","Pinhal Novo","Venda do Alcaide","Palmela","Setúbal"];
@override
_MyHomePageState createState() => _MyHomePageState(estacoes);
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
String dropdownValueSentido = 'Lisboa -> Setúbal';
RangeLabels _rl;
static const double slider_min =0.0;
static const double slider_max =14.0;
static const divisions = 13;
RangeValues _rv = RangeValues(slider_min,slider_max);
final List<String> estacoes;
_MyHomePageState(this.estacoes){
_rl = RangeLabels(this.estacoes.elementAt(0),this.estacoes.elementAt(estacoes.length-1));
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Center(child: Text(widget.title)),
),
body: SafeArea(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
//mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'Um textozinho de escolha da viagem Fertagus',
),
Row(
children: <Widget>[
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Text(
'Lisboa',
),
Expanded(
child: RangeSlider(
values: _rv,
onChanged: (values){
setState(() {
var value_start=values.start.floor();
var value_end=values.end.floor();
print("value start--------------->$value_start");
print("value start--------------->${values.start}");
print("value end--------------->$value_end");
print("value end--------------->${values.end}");
if((value_end>=value_start+1) && (value_start<=value_end-1)){
print("VAAAAAAAAAAAAAAAAAAAAAAAAA");
_rv=values;
if(value_end>=this.estacoes.length)value_end-=1;
_rl = RangeLabels(this.estacoes.elementAt(value_start),this.estacoes.elementAt(value_end));
}
},);},min:slider_min,max:slider_max,divisions: divisions,labels: _rl,),
),
Text(
'Setúbel',
),
],
),
],
),
),
/* floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
),*/ // This trailing comma makes auto-formatting nicer for build methods.
);
}
} At left image it's nice, at middle image overlapping, at righ image, what is wish to have. It's possible in flutter?? I don't need text upside down, only below right(or left) thumb. |
Hi. There are somo news about it? @pedromassangocode @iapicca Thanks. |
This issue is missing a priority label. Please set a priority label when adding the |
Hello. In RangeSlider why booth value change labels appear above the sliders? They can be overlaped!
Why I can not have properties to choose if value change indicator appear at bottom or top, for left slider and right slider.
Example: on left slider it appears above, on right slider, it appears below.
Thanks.
The text was updated successfully, but these errors were encountered: