Skip to content

Possible to swipe off of a tab layout #4768

Closed

Description

@DaveShuckerow

In the leafy demo, if you go to the rightmost tab, tap one of our various leaves in the tree view to view the leaf details page, then press 'back', you can swipe beyond the rightmost tab into a leafless void.

Internal bug id: 29695128

Activity

  1. abarth commented on Jun 27, 2016

    @abarth
    Contributor
  2. eseidelGoogle commented on Jul 5, 2016

    @eseidelGoogle
    Contributor

    Is this at all related to being able to go back to the null route @abarth?

  3. abarth commented on Jul 5, 2016

    @abarth
    Contributor

    I don't think so. I think this is about the tab view getting confused about its bounds.

  4. DaveShuckerow commented on Sep 7, 2016

    @DaveShuckerow
    ContributorAuthor

    What's the status on this issue? Has this been resolved?

  5. eseidelGoogle commented on Sep 7, 2016

    @eseidelGoogle
    Contributor

    I don't know. Leafy removed swipe-between-tabs from their app, presumably in part to work around this. @HansMuller did you ever understand what was going on here? If not, I guess we just close and wait for it to come up again.

  6. HansMuller commented on Sep 7, 2016

    @HansMuller
    Contributor

    Sorry to have let this drop. As I understand the original description, the failure scenario is:

    • tap on the rightmost (scrollable?) tab
    • show a new full page route
    • go back
    • swipe the rightmost tab to the left

    The app below (just a version of the gallery scrollable tabs demo) doesn't exhibit the problem. Maybe someone can tweak the app to demo the problem?

    import 'package:flutter/material.dart';
    
    class ScrollableTabsDemo extends StatefulWidget {
      static const String routeName = '/scrollable-tabs';
    
      @override
      ScrollableTabsDemoState createState() => new ScrollableTabsDemoState();
    }
    
    class ScrollableTabsDemoState extends State<ScrollableTabsDemo> {
      final List<IconData> icons = <IconData>[
        Icons.event,
        Icons.home,
        Icons.android,
        Icons.alarm,
        Icons.face,
        Icons.language,
      ];
    
      final Map<IconData, String> labels = <IconData, String>{
        Icons.event: 'EVENT',
        Icons.home: 'HOME',
        Icons.android: 'ANDROID',
        Icons.alarm: 'ALARM',
        Icons.face: 'FACE',
        Icons.language: 'LANGUAGE',
      };
    
      @override
      Widget build(BuildContext context) {
        final Color iconColor = Theme.of(context).accentColor;
        return new TabBarSelection<IconData>(
          values: icons,
          child: new Scaffold(
            appBar: new AppBar(
              title: new Text('Scrollable tabs'),
              bottom: new TabBar<IconData>(
                isScrollable: true,
                labels: new Map<IconData, TabLabel>.fromIterable(
                  icons,
                  value: (IconData icon) => new TabLabel(text: labels[icon], icon: new Icon(icon))
                )
              )
            ),
            body: new TabBarView<IconData>(
              children: icons.map((IconData icon) {
                return new Container(
                  key: new ObjectKey(icon),
                  padding: const EdgeInsets.all(12.0),
                  child:new Card(
                    child: new Center(
                      child: new GestureDetector(
                        behavior: HitTestBehavior.opaque,
                        onTap: () {
                          Navigator.push(context, new MaterialPageRoute(
                            builder: (BuildContext context) {
                              return new Scaffold(
                                appBar: new AppBar(title: new Text('Back Away')),
                                body: new Center(child: new Text("Back Away"))
                              );
                            }
                          ));
                        },
                        child: new Icon(icon, size: 128.0, color: iconColor),
                      )
                    )
                  )
                );
              }).toList()
            )
          )
        );
      }
    }
    
    void main() => runApp(new MaterialApp(home: new ScrollableTabsDemo()));
    
  7. modified the milestone: on Sep 12, 2016
  8. mehmetf commented on Nov 3, 2016

    @mehmetf
    Contributor

    I am no longer able to reproduce this.

  9. added a commit that references this issue on May 14, 2018
  10. github-actions commented on Aug 15, 2021

    @github-actions

    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 -v and a minimal reproduction of the issue.

  11. locked as resolved and limited conversation to collaborators on Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions