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

RangeSlider labels for value change overlaps #76466

Open
Tracked by #125329
boks21 opened this issue Feb 20, 2021 · 5 comments
Open
Tracked by #125329

RangeSlider labels for value change overlaps #76466

boks21 opened this issue Feb 20, 2021 · 5 comments
Labels
c: proposal A detailed proposal for a change to Flutter f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. 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

@boks21
Copy link

boks21 commented Feb 20, 2021

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.

@iapicca
Copy link
Contributor

iapicca commented Feb 21, 2021

@boks21
I'm not sure to understand the behavior you are reporting
can you provide your flutter doctor -v and a minimal reproducible code sample

@pedromassangocode pedromassangocode added the in triage Presently being triaged by the triage team label Feb 22, 2021
@pedromassangocode
Copy link

Hi @boks21
Please provide what was asked above.
Thank you

@pedromassangocode pedromassangocode added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 22, 2021
@boks21
Copy link
Author

boks21 commented Feb 22, 2021

Hello Pedro
Let me explain

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
[√] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 10.0.19042.804], locale en-US)
• Flutter version 1.22.6 at D:\FlutterSDK\flutter
• Framework revision 9b2d32b (4 weeks ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5

code sample
import '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.

forum

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 22, 2021
@pedromassangocode pedromassangocode added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. passed first triage c: proposal A detailed proposal for a change to Flutter and removed in triage Presently being triaged by the triage team labels Feb 23, 2021
@boks21
Copy link
Author

boks21 commented Jun 5, 2021

Hi.

There are somo news about it? @pedromassangocode @iapicca

Thanks.

@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
@flutter-triage-bot flutter-triage-bot bot removed the triaged-design Triaged by Design Languages team label Jan 16, 2024
@flutter-triage-bot
Copy link

This issue is missing a priority label. Please set a priority label when adding the triaged-design label.

@HansMuller HansMuller added P2 Important issues not at the top of the work list triaged-design Triaged by Design Languages team labels Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: proposal A detailed proposal for a change to Flutter f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. 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
None yet
Development

No branches or pull requests

6 participants