Skip to content

A Flutter package for tab view component that can scroll infinitely.

License

Notifications You must be signed in to change notification settings

snkrdunk/flutter_infinite_scroll_tab_view

This branch is 27 commits ahead of cb-cloud/flutter_infinite_scroll_tab_view:main.

Folders and files

NameName
Last commit message
Last commit date
Jul 21, 2021
Jan 29, 2024
Feb 6, 2024
Feb 6, 2024
Jan 29, 2024
Jul 14, 2021
Jan 31, 2024
Jul 14, 2021
Jul 21, 2021
Jul 27, 2021
Jan 30, 2024

Repository files navigation

๐Ÿ“œ infinite_scroll_tab_view

pub package

A Flutter package for tab view component that can scroll infinitely.

โœ๏ธ Usage

  1. Import it.

    dependencies:
        infinite_scroll_tab_view: <latest-version>
    import 'package:infinite_scroll_tab_view/infinite_scroll_tab_view.dart';
  2. Place InfiniteScrollTabView Widget into your app.

     return InfiniteScrollTabView(
       contentLength: contents.length,
       onTabTap: (index) {
         print('tapped $index');
       },
       tabBuilder: (index, isSelected) => Text(
         _convertContent(contents[index]),
         style: TextStyle(
           color: isSelected ? Colors.pink : Colors.black54,
           fontWeight: FontWeight.bold,
           fontSize: 18,
         ),
       ),
       separator: BorderSide(color: Colors.black12, width: 1.0),
       onPageChanged: (index) => print('page changed to $index.'),
       indicatorColor: Colors.pink,
       pageBuilder: (context, index, _) {
         return SizedBox.expand(
           child: DecoratedBox(
             decoration: BoxDecoration(
               color: Colors.green.withOpacity(contents[index] / 10),
             ),
             child: Center(
               child: Text(
                 _convertContent(contents[index]),
                 style: Theme.of(context).textTheme.headline3!.copyWith(
                       color: contents[index] / 10 > 0.6
                           ? Colors.white
                           : Colors.black87,
                     ),
               ),
             ),
           ),
         );
       },
     );

๐Ÿ’ญ Have a question?

If you have a question or found issue, feel free to create an issue.

About

A Flutter package for tab view component that can scroll infinitely.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 90.3%
  • HTML 8.4%
  • Other 1.3%