Giter VIP home page Giter VIP logo

buttons_tabbar's People

Contributors

afonsocraposo avatar ryanaidilp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

buttons_tabbar's Issues

Bounces on setstate

Running into this issue, see video.

Screen.Recording.2021-04-20.at.19.43.53.mov
 Container(
    height: 50,
    child: ButtonsTabBar(
      radius: 30,
      physics: NeverScrollableScrollPhysics(),
      contentPadding: EdgeInsets.only(left: 12, right: 12, top: 5, bottom: 5),
      controller: this.controller,
      labelSpacing: 5,
      backgroundColor: Styles.MAIN_COLOR_ACCENT,
      unselectedBackgroundColor: Styles.MAIN_COLOR_LIGHT,
      unselectedLabelStyle: TextStyle(color: Colors.black),
      labelStyle: TextStyle(color: Colors.white, fontSize: 14),
      tabs: [
        Tab(
          text: "YouTube",
        ),
        Tab(
          text: "Reddit",
        ),
        Tab(
          text: "Twitter",
        ),
      ],
    ),
  ),

I am using this widget inside a vertical listview as one of the children.

labelStyle text color not work in material3

labelStyle text color not work in material3

Steps to Reproduce

class _ExampleState extends State {
@OverRide
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: DefaultTabController(
length: 3,
child: Column(
children: [
ButtonsTabBar(
labelStyle: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
),
tabs: const [
Tab(
icon: Icon(Icons.directions_car),
text: "car",
),
Tab(
icon: Icon(Icons.directions_transit),
text: "transit",
),
Tab(icon: Icon(Icons.directions_bike)),
],
),
const Expanded(
child: TabBarView(
children: [
Center(
child: Icon(Icons.directions_car),
),
Center(
child: Icon(Icons.directions_transit),
),
Center(
child: Icon(Icons.directions_bike),
),
],
),
),
],
),
),
),
);
}
}


How to move from a button to another tab?

So i made a button to move to another tab, but i don't know how to move it. Does this package have some trigger or something? Because i can't use Navigator.push or similiar

ButtonsTabBar does not respond to tabController

Hi, @afonsocraposo thanks for your great package.
I want to confirm before switching. This is my listening event code.
void _onTabChanged() async {
if (_mController.indexIsChanging) {
if (_currentIndex < _mController.index) {
bool? jump = await _openAlertDialog();
if (jump == null) {
setState(() {
_mController.index = _currentIndex;
});
} else {
setState(() {
_currentIndex = _mController.index;
});
}
} else {
setState(() {
_currentIndex = _mController.index;
});
}
}
print("index:${_mController.index}");
}
When I give up switching:_mController.index = _currentIndex, TabBarView responds to the change in tabController.index, but ButtonsTabBar does not respond. When I use the TabBar,it's correct.
Look forward to your reply!

Generate tab list dynamically, when touch tab return issue

When I generate tab like this,

   List<Tab> _pickys = <Tab>[];

   for(int i = 0; i < _nitemPicky.length; i++) {
    _pickys.add(
       Tab(
         icon: Image.network('$img_url${_nitemPicky[i].imgLinkTb}', width: Du.mw(30), height: Du.mw(30),),
         text: "${_nitemPicky[i].name}",
       ),
     );
   }

or like this,

   List<Tab> _pickys2 = List<Tab>.generate(_nitemPicky.length, (int index3) {
     print(_nitemPicky[index3]);
     return new Tab(
       icon: Image.network('$img_url${_nitemPicky[index3].imgLinkTb}', width: Du.mw(30), height: Du.mw(30),),
       text: "${_nitemPicky[index3].name}",
     );
   });

Generate tab is good.

But when I touch list[1] to list[2]

tapping gonna failed and returned this issue.

I/flutter ( 2283): ══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
I/flutter ( 2283): The following NoSuchMethodError was thrown while handling a gesture:
I/flutter ( 2283): The method 'findRenderObject' was called on null.
I/flutter ( 2283): Receiver: null
I/flutter ( 2283): Tried calling: findRenderObject()
I/flutter ( 2283):
I/flutter ( 2283): When the exception was thrown, this was the stack:
I/flutter ( 2283): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
I/flutter ( 2283): #1 _ButtonsTabBarState._scrollTo (package:buttons_tabbar/buttons_tabbar.dart:378:48)
I/flutter ( 2283): #2 _ButtonsTabBarState._setCurrentIndex. (package:buttons_tabbar/buttons_tabbar.dart:336:7)
I/flutter ( 2283): #3 State.setState (package:flutter/src/widgets/framework.dart:1240:30)
I/flutter ( 2283): #4 _ButtonsTabBarState._setCurrentIndex (package:buttons_tabbar/buttons_tabbar.dart:332:5)
I/flutter ( 2283): #5 _ButtonsTabBarState._goToIndex (package:buttons_tabbar/buttons_tabbar.dart:326:7)
I/flutter ( 2283): #6 _ButtonsTabBarState._buildButton. (package:buttons_tabbar/buttons_tabbar.dart:255:11)
I/flutter ( 2283): #7 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:992:19)
I/flutter ( 2283): #8 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:1098:38)
I/flutter ( 2283): #9 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:184:24)
I/flutter ( 2283): #10 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:524:11)
I/flutter ( 2283): #11 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:284:5)
I/flutter ( 2283): #12 BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:256:7)
I/flutter ( 2283): #13 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:158:27)
I/flutter ( 2283): #14 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:224:20)
I/flutter ( 2283): #15 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:200:22)
I/flutter ( 2283): #16 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:158:7)
I/flutter ( 2283): #17 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:104:7)
I/flutter ( 2283): #18 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:88:7)
I/flutter ( 2283): #22 _invoke1 (dart:ui/hooks.dart:267:10)
I/flutter ( 2283): #23 _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5)
I/flutter ( 2283): (elided 3 frames from dart:async)
I/flutter ( 2283):
I/flutter ( 2283): Handler: "onTap"
I/flutter ( 2283): Recognizer:
I/flutter ( 2283): TapGestureRecognizer#fbbeb
I/flutter ( 2283): ════════════════════════════════════════════════════════════════════════════════════════════════════

Also, when I generate list statically,
like this.

    List<Tab> tabs = <Tab>[
    Tab(
      icon: Image.asset('assets/circle_you.png', width: Du.mw(30), height: Du.mw(30),),
      text: "김꽃날",
    ),
    Tab(
      icon: Image.asset('assets/circle_you.png', width: Du.mw(30), height: Du.mw(30),),
      text: "하티",
    ),
    Tab(
      icon: Image.asset('assets/circle_you.png', width: Du.mw(30), height: Du.mw(30),),
      text: "오구리",
    ),
    Tab(
      icon: Image.asset('assets/circle_you.png', width: Du.mw(30), height: Du.mw(30),),
      text: "민주티디",
    ),
    Tab(
      icon: Image.asset('assets/circle_you.png', width: Du.mw(30), height: Du.mw(30),),
      text: "옥개",
    ),
    Tab(
      icon: Image.asset('assets/circle_you.png', width: Du.mw(30), height: Du.mw(30),),
      text: "지토",
    ),
  ];

No error returned and working properly.

So, I want generate list dynamically.

How can I implement?

the example does not work

running the example gave me the following message:
image

my flutter version:
Flutter 2.0.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8962f6dc68 (2 weeks ago) • 2021-03-11 13:22:20 -0800
Engine • revision 5d8bf811b3
Tools • Dart 2.12.1

[Feature] Display label text on tab selection

Hi, @afonsocraposo thanks for your great package, can you please add a feature to display label text only if the tab is selected, I tried with the current index page like: text: _indexPagCurrent == 0 ? 'My Title' : '', , but this way it doesn't work :( .

Thanks in advance!

TabController initial index not work

Assign a TabController to ButtonsTabBar, but the TabController animateTo(1) and the TabController(initialIndex:1) is not working.

 TabController _tabController;
@override
  void initState() {
    _tabController = TabController(length: 2, vsync: this, initialIndex: 1);
    super.initState();
  }
...
 ButtonsTabBar(
                              controller: _tabController,
...
)

labelStyle is not working properly.

ButtonsTabBar( buttonMargin: EdgeInsets.only(left: 25), backgroundColor: Colors.brown[800], unselectedBackgroundColor: Colors.white, unselectedLabelStyle: TextStyle(color: Colors.black), labelStyle: TextStyle(color: Colors.white, fontWeight: FontWeight.bold), radius: 70, labelSpacing: 15, tabs: [ Tab.... )

This is my code which should show White Text on selected Tab and black Text on others. But it just shows black text everywhere. Please, Solve it or provide the solution.

Hover decoration doesn't match decoration and unselectedDecoration

Bug Report

Description

When using a decoration to change border radius, the hover decoration doesn't get updated to match.
image
image

Steps to Reproduce

  1. Create a ButtonsTabBar.
  2. Add custom decorations that change the border radius.
  3. Launch the application in chrome.
  4. Hover over the tab.

Expected Behavior

The hover decoration should match the border radius of the applied decoration.

Actual Behavior

The hover decoration defaults to the default value of 4.

Additional Information

It would be nice to just have the decoration exposed for hover so that additional changes could be made.

Code Example

import 'package:buttons_tabbar/buttons_tabbar.dart';
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Example(),
    );
  }
}

class Example extends StatefulWidget {
  const Example({Key? key}) : super(key: key);

  @override
  _ExampleState createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: DefaultTabController(
          length: 3,
          child: Column(
            children: <Widget>[
              ButtonsTabBar(
                decoration: const BoxDecoration(
                  borderRadius: BorderRadius.only(
                    topLeft: Radius.circular(4),
                    topRight: Radius.circular(4),
                    bottomLeft: Radius.circular(4),
                    bottomRight: Radius.zero,
                 ),
                  color: Colors.amber,
                ),
                unselectedDecoration: const BoxDecoration(
                  borderRadius: BorderRadius.only(
                    topLeft: Radius.circular(4),
                    topRight: Radius.circular(4),
                    bottomLeft: Radius.circular(4),
                    bottomRight: Radius.zero,
                   ),
                  color: Colors.white,
                ),
                tabs: const [
                  Tab(
                    icon: Icon(Icons.directions_car),
                    text: "car",
                  ),
                  Tab(
                    icon: Icon(Icons.directions_transit),
                    text: "transit",
                  ),
                  Tab(icon: Icon(Icons.directions_bike)),
                ],
              ),
              const Expanded(
                child: TabBarView(
                  children: <Widget>[
                    Center(
                      child: Icon(Icons.directions_car),
                    ),
                    Center(
                      child: Icon(Icons.directions_transit),
                    ),
                    Center(
                      child: Icon(Icons.directions_bike),
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Thank you for reporting this bug! We appreciate your contribution to improving our Flutter package.

How to add a shadow under the buttons?

By adding a BoxDecoration property with a BoxShadow property, the shadow stays inside the button block and does not go outside of it. Is it possible to add a property like the elevation property to material objects?
ButtonsTabBar( decoration: BoxDecoration( color: EtalogColors.primary, borderRadius: BorderRadius.circular(50), boxShadow:[ BoxShadow( color: Colors.grey.withOpacity(0.5), spreadRadius: 1, blurRadius: 10, offset: Offset(0, 15), ), //you can set more BoxShadow() here ], ), radius: 0, tabs: [ Tab(text: 'Все'), Tab(text: 'В пути'), Tab(text: 'Под разгрузкой'), ], ),

image

No icon in tab

Please add support to having no icon in tab. Now it is possible to use Colors.transparent for icon's color but there is a gap...

If each tab is supported with a fixed width and selected and unselected font color is not affected

Bug Report

Description

[Provide a clear and concise description of the bug you encountered.]

Steps to Reproduce

  1. [Outline the steps to reproduce the bug. Be specific and provide any necessary context or prerequisites.]
  2. [Add additional steps if necessary.]

Expected Behavior

[Describe what you expected to happen.]

Actual Behavior

[Describe what actually happened.]

Additional Information

[Provide any additional information that may be helpful in understanding and reproducing the issue.]

Code Example

[Provide a minimal, complete, and verifiable example that reproduces the issue. Use code blocks to preserve the formatting.]

import 'package:buttons_tabbar/buttons_tabbar.dart';
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Example(),
    );
  }
}

class Example extends StatefulWidget {
  const Example({Key? key}) : super(key: key);

  @override
  _ExampleState createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: DefaultTabController(
          length: 3,
          child: Column(
            children: <Widget>[
              ButtonsTabBar(
                tabs: const [
                  Tab(
                    icon: Icon(Icons.directions_car),
                    text: "car",
                  ),
                  Tab(
                    icon: Icon(Icons.directions_transit),
                    text: "transit",
                  ),
                  Tab(icon: Icon(Icons.directions_bike)),
                ],
              ),
              const Expanded(
                child: TabBarView(
                  children: <Widget>[
                    Center(
                      child: Icon(Icons.directions_car),
                    ),
                    Center(
                      child: Icon(Icons.directions_transit),
                    ),
                    Center(
                      child: Icon(Icons.directions_bike),
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Please make sure to include a working example code that can reproduce the bug. You can use the provided code snippet as a starting point.

Thank you for reporting this bug! We appreciate your contribution to improving our Flutter package.

The method 'findRenderObject' was called on null.

I am a Flutter novice, so forgive me if I am doing somethign wrong. I am getting the following error when switching between tabs (all of which build a relatively complex grouped list view). The views show up no problem, but the log will have this error:

The following NoSuchMethodError was thrown while dispatching notifications for TabController:
The method 'findRenderObject' was called on null.
Receiver: null
Tried calling: findRenderObject()

When the exception was thrown, this was the stack: 
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      _ButtonsTabBarState._scrollTo (package:buttons_tabbar/buttons_tabbar.dart:446:48)
#2      _ButtonsTabBarState._setCurrentIndex (package:buttons_tabbar/buttons_tabbar.dart:405:5)
#3      _ButtonsTabBarState._goToIndex (package:buttons_tabbar/buttons_tabbar.dart:394:7)
#4      _ButtonsTabBarState._handleController (package:buttons_tabbar/buttons_tabbar.dart:264:7)
...
The TabController sending notification was: Instance of 'TabController'

Code that builds the tabs:

  return DefaultTabController(
      length: 9,
      child: Column(
        children: <Widget>[
          ButtonsTabBar(
            contentPadding: EdgeInsets.all(1),
            backgroundColor: Theme.of(context).primaryColor,
            unselectedBackgroundColor: Colors.white,
            labelStyle: TextStyle(color: Colors.white),
            unselectedLabelStyle:
                TextStyle(color: Theme.of(context).primaryColor),
            radius: 50,
            tabs: [
              Tab(
                icon: Icon(
                  FontAwesomeIcons.xxxx,
                ),
                text: "xxxx",
              ),
              Tab(
                icon: Icon(
                  FontAwesomeIcons.xxxx,
                ),
                text: "xxxx",
              ),
              Tab(
                icon: Icon(FontAwesomeIcons.xxxx),
                text: "xxxx",
              ),
              Tab(
                icon: Icon(FontAwesomeIcons.xxxx),
                text: "xxxx",
              ),
              Tab(
                icon: Icon(FontAwesomeIcons.xxxx),
                text: "xxxx",
              ),
              Tab(
                icon: Icon(FontAwesomeIcons.xxxx),
                text: "xxxxx",
              ),
              Tab(
                icon: Icon(FontAwesomeIcons.xxxx),
                text: "xxxx",
              ),
              Tab(
                icon: Icon(FontAwesomeIcons.smile),
                text: "Viselkedés",
              ),
              Tab(
                icon: Icon(FontAwesomeIcons.questionCircle),
                text: "Egyéb",
              ),
            ],
          ),
          Expanded(
            child: TabBarView(
              children: <Widget>[
                buildListWithFilter(database, null),
                buildListWithFilter(database, 'xxxx'),
                buildListWithFilter(database, 'xxxxx'),
                buildListWithFilter(database, 'xxxxx'),
                buildListWithFilter(database, 'xxxx'),
                buildListWithFilter(database, 'xxxx'),
                buildListWithFilter(database, 'xxxx'),
                buildListWithFilter(database, 'xxxx'),
                buildListWithFilter(database, 'other'),
              ],
            ),
          ),
        ],
      ),
    );
  }



  StreamBuilder<List<Entry>> buildListWithFilter(
      Database database, String entryType) {
    return StreamBuilder<List<Entry>>(
        stream: database.entriesStream(entryType: entryType),
        builder: (context, snapshot) {
          return snapshot.hasData
              ? StickyGroupedListView<dynamic, String>(
                  elements: snapshot.data,
                  groupBy: (dynamic element) =>
                      DateFormat.yMd().format(element.date.toDate()).toString(),
                  separator: _buildSeparator(),
                  groupSeparatorBuilder: (dynamic element) =>
                      _buildGroupSeparator(context, element),
                  itemBuilder: (context, entry) => MainListTile(
                    entry: entry,
                  ),
                  order: StickyGroupedListOrder.DESC, // optional
                )
              : Container();
        });
  }

Any suggestions?

Tab with badge or using custom widgets that do not inherit from `Tab`

Hey there!

Great library you have here!

I would like more customization over the tab design. I was able to do everything I want with the parameters you provided, except for the tab badge.

Basically I want to show a badge on the top right corner.

There are two possible solutions for this:

built-in onTap function not available

Hello, I see no onTap function on this lib, use .addListener doesn't work as expected and takes a lot of work for styling. I try to get a callback from the tab button tapped. thanks.

onTap function

can you add to ButtonTabBar onTap functionality ? for example onTap is have in TabBar

the last item is not visible

current situation :

116004721-0e566880-a615-11eb-8b0a-eb0c7a75f620.mov

what we need :

116004540-2d082f80-a614-11eb-8fb1-93d3c0f3d88e.mov

my Code : https://pastebin.ubuntu.com/p/PFSSmVx9dW/

appBar: AppBar( brightness: Brightness.dark, title: Text('PRAY'), centerTitle: true, backgroundColor: Color(0xff16112a), bottom: ButtonsTabBar( height: 70, decoration: BoxDecoration( gradient: LinearGradient( colors: <Color>[ Color(0xFF0D47A1), Color(0xFF1976D2), Color(0xFF42A5F5), ], ), ), radius: 100, contentPadding: EdgeInsets.symmetric(horizontal: 30), buttonMargin: EdgeInsets.only(top: 10, bottom: 17, left: 20, right: 10), unselectedBackgroundColor: Color(0xff1c1b20), unselectedLabelStyle: TextStyle(color: Colors.white), labelStyle: TextStyle(color: Colors.white, fontSize: 20, fontWeight: FontWeight.w600), controller: _tabController, tabs: newsTabs, ), ),

Flutter 3.0.0 is detecting issue with the library

../../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/buttons_tabbar-1.3.4/lib/buttons_tabbar.dart:180:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.

  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../Documents/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance

FlutterError - Null check operator used on a null value: _ButtonsTabBarState.initState.<fn>

Bug Report

Description

[Provide a clear and concise description of the bug you encountered.]
I got this error in Firebase Crashlytics

Steps to Reproduce

I do not really not what step to reproduce this issue. This happens on Production release and I see it on Firebase Crashlytics

Expected Behavior

No errors.

Actual Behavior

Got error: FlutterError - Null check operator used on a null value: _ButtonsTabBarState.initState.

Additional Information

[Provide any additional information that may be helpful in understanding and reproducing the issue.]

buttons_tabbar: 1.3.7+1

[!] Flutter (Channel stable, 3.10.6, on macOS 13.2 22D49 darwin-arm64, locale en)
    • Flutter version 3.10.6 on channel stable at /Users/efzet/fvm/versions/3.10.6
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (7 weeks ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/efzet/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/efzet/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.2.4)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 71.2.2
    • Dart plugin version 212.5744

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.2 22D49 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Brave Browser 116.1.57.53

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

[IMPROVEMENT] Border implementation

Hi, It will be great if we can get border implemented in this package.

Use case example:

unnamed

Maybe we could add something like this in the API:

ButtonsTabBar(
borderWidth: 1.0,
borderColor: Colors.blueAccent,
unselectedBorderWidth: 1.0,
unselectedborderColor: Colors.red,
)

Thanks for your consideration !

Use onTabChangedListener or similar

Hi, thanks for the package!

What is the correct way to provide a listener to buttons_tabbar that can change some other state? If I need to create a new controller, can you provide an example?

Close icon for web applications

Hi,
Thanks for this clean and useful package.

I want to use this package in a web dashboard where the user can add and delete tabs dynamically, like the ones in Google Chrome.

image

Would it be possible to do the following with TabBarView and ButtonsTabBar?

  1. Add a close icon on each tab and delete the tab bar item and its corresponding view when the icon is clicked.
  2. Add a + icon to the right of the ButtonsTabBar as the last widget and call a callback handler which may be supplied as a parameter so that the user of the package can add a new tab in that handler.

Thanks :)

Not responding to clicking on the bottom text

Hello everyone,

I have an issue that I hope can be resolved. I have divided my tabbar button into two vertical sections. You can refer to the attached image for reference. When I click on the top text "Active," it triggers a response upon tapping. However, if I click on the bottom text, which is the number "2" as shown in the image, there is no response. How can I make the response cover all the entire content of the tabbar button?
Screenshot 2023-06-16 at 01-38-48 Screenshot_1686868604 png (PNG Image 1440 × 2560 pixels) — Scaled (26%)

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.