ali-azmoud / vertical_tabs Goto Github PK
View Code? Open in Web Editor NEWA vertical tabs package for flutter framework.
Home Page: https://pub.dartlang.org/packages/vertical_tabs
License: MIT License
A vertical tabs package for flutter framework.
Home Page: https://pub.dartlang.org/packages/vertical_tabs
License: MIT License
I have a filter widget on the screen that indicates if part of the tabs or all the tabs are visible in the VisibleTabs widget. The default value is part of the tabs (part.length < all.length). When I change the filter at runtime with setState the tabs property is changed with a larger list and all the tabs should be visible but instead I get an error:
RangeError (index): Invalid value: Not in range 0..6, inclusive: 7
The problem is in the animationControllers list that is initialized only in the initState method so any change to the tabs list length doesn't change the animationControllers list length. The part in the build method that throws the error is:
new CurvedAnimation(
parent: animationControllers[index],
curve: Curves.elasticOut,
),
If you need more info let me know.
I resolved my problem by implementing a method that does a reset of the animationControllers list when the filter value is changed but you can implement it in a more clean way without external interaction :)
Flutter doctor:
[√] Flutter (Channel dev, 1.19.0-1.0.pre, on Microsoft Windows [Version 10.0.14393], locale hr-HR)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.6)
how to use it horizontally?
I used the exact same code in a new project. flutter 2.0.2. Using an emulator the tabs only scroll horizontally unlike in the demo. https://pub.dev/packages/vertical_tabs
Hello, can you add TabController support please? This will make it easier for working with both VerticalTabs and TabBar.
Hey, vertical_tabs is really simple and useful widget. Thanks.
Now I want to disable the scroll effect :
contentScrollAxis: Axis.vertical,
contentScrollAxis: Axis.horizontal,
while changing tabsContent.
In other words, I hope there is only one way to change tabsContent: click the Tab. And no scroll animation.
How should I do ? Thanks.
Hi, thanks for this awesome widget.
Does this widget have an ability to change tabs programmatically?
Like we have a "tab controller" for tab bar.
If not, can we have a workaround, a call back function or something?
Feature Request :
Is it possible to change tab indicator direction?
For eg to right side
Can we add tab lists dynamically
Hello, thanks for the wonderful widget.
But whenever I try to add selectedTabBackgroundColor different that the default one the tab indicator gets behind the tab.
`
VerticalTabs(
tabsWidth: Dimens.fourtyPercentWidth,
indicatorColor: ColorsValue.primaryColor,
indicatorWidth: Dimens.five,
tabBackgroundColor: ColorsValue.lightGreyColor2,
tabTextStyle: Get.textTheme.bodyText1,
selectedTabTextStyle: Get.textTheme.headline6,
disabledChangePageFromContentView: true,
contentScrollAxis: Axis.vertical,
tabsElevation: Dimens.five,
tabs: [
_getTabs(),
],
contents: [
_getContents(),
],
)`
Add is there a way to give height to the tabs.
Hi,
Is there any way to change the background colour of the whole widget?
how to align tabs to right
and align content to left
to support rtl direction
direction property not working
Does the individual tabs have it's own navigator stack so we can implement nested navigation?
Hi, thanks for your share.
I want a vertical tab view is not always a whole screen, maybe more tab views combine together in one page, it depend on the content of a tab view.
What should I do to achieve this goal?
Thanks.
Hi, Tab label text is faded if text is too long and even if we use itemExtent parameter, it is not a reliable solution as we dont know the exact text if redered dynamically from server.
You may try this solution and update if it works as needed:
using itemExtent is not a good idea if the data is dynamic.
Hope this may be useful.
rt
can you add method to get selected index please,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.