caduandrade / tabbed_view

Widget inspired by the classic Desktop-style tab component.
MIT License
51 stars 16 forks source link

Leading Widget on tab #22

Closed trhagado closed 1 year ago

trhagado commented 1 year ago

Feature Request: Allow an optional prefix icon on tab headers in front of the the tab text and any tab buttons. This feature is available for many desktop widget packages (see example below) and would be very helpful in the tabbed_view widget.

image

caduandrade commented 1 year ago

Hi @trhagado !

Now you can use a builder:

    List<TabData> tabs = [
      TabData(
          text: 'Tab 1',
          leading: (context, status) => Icon(Icons.star, size: 16)),
      TabData(text: 'Tab 2'),
      TabData(text: 'Tab 3')
    ];
    TabbedView tabbedView = TabbedView(controller: TabbedViewController(tabs));
trhagado commented 1 year ago

Works great, thanks.

image