contentsize_tabbarview
0.0.2, released 3 years ago by an unverified publisher
A tab bar view widget where each tab's height automatically adjusts to fit its content.
What it does
Combines autoscale_tabbarview and expandable_page_view functionalities to provide a ContentSizeTabBarView widget. It allows creating a tab bar view whose height automatically resizes to fit its content, fixing issues found in release mode when nested inside scroll views.
AI-written summary of version 0.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a TabBarView that dynamically resizes its height based on the current tab's content.
- You experience layout or sizing issues with AutoScaleTabBarView inside a CustomScrollView or SingleChildScrollView in release mode.
Skip it when
- You do not need automatic height adjustments for tabs.
Strengths
- Automatically adjusts height to fit tab content
- Works inside scroll views where other auto-scaling tab views fail in release mode
- Smooth tab switching animations with TabController integration
Weaknesses
- Limited documentation and community usage beyond the basic example
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:flutter/material.dart';
import 'package:content_size_tabbarview/content_size_tabbarview.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('ContentSizeTabBarView Example'),
),
body: DefaultTabController(
child: ContentSizeTabBarView(
children: [
Center(child: Text('Tab 1 Content')),
Center(child: Text('Tab 2 Content')),
],
),
),
),
);
}
}Alternatives
Packages that do the same job and could replace contentsize_tabbarview.
- nested_scroll_views
Flutter nested scrolling with drag handoff at scroll boundaries for multiple scroll views.
76Compare - flutter_json
Renders valid JSON as an interactive hierarchical tree structure with lazy loading.
67Compare - interactive_viewer_2
A Flutter InteractiveViewer replacement with scrollbars and double-tap zoom.
55Compare - contained_tab_bar_view
Encapsulates TabController, TabBar and TabBarView into a single customizable Widget.
50Compare
Works with
Packages commonly used together with contentsize_tabbarview: ones it builds on, ones built on it, and its own family.