Skip to content

Commit

Permalink
Merge pull request #9 from snkrdunk/stackedContent
Browse files Browse the repository at this point in the history
stackedContent を InfiniteScrollTabView public interface に追加
  • Loading branch information
kosukesaigusa authored Jan 30, 2024
2 parents cc9eae9 + a47febf commit f82919c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/src/infinite_scroll_tab_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class InfiniteScrollTabView extends StatelessWidget {
this.forceFixedTabWidth = false,
this.fixedTabWidthFraction = 0.5,
this.physics = const PageScrollPhysics(),
this.stackedContent,
}) : super(key: key);

/// A length of tabs and pages.
Expand Down Expand Up @@ -134,6 +135,11 @@ class InfiniteScrollTabView extends StatelessWidget {

final ScrollPhysics physics;

/// タブラベルに [Stack] で重ねて表示するウィジェット。
///
/// 典型的には [Positioned] を使って、タブの上にバッジを表示するなどの目的で使用する。
final Widget? stackedContent;

@override
Widget build(BuildContext context) {
if (indicatorHeight != null) {
Expand All @@ -160,6 +166,7 @@ class InfiniteScrollTabView extends StatelessWidget {
forceFixedTabWidth: forceFixedTabWidth,
fixedTabWidthFraction: fixedTabWidthFraction,
physics: physics,
stackedContent: stackedContent,
);
}
}

0 comments on commit f82919c

Please sign in to comment.