customtabview 0.2.1
customtabview: ^0.2.1 copied to clipboard
A custom tab view that safely handles dynamic tab rendering and avoids crashes from tab count mismatches.
import 'package:flutter/material.dart';
import 'package:customtabview/customtabview.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: CustomTabView(
itemCount: 3,
tabBuilder: (context, index) => Tab(text: 'Tab $index'),
pageBuilder: (context, index) => Center(child: Text('Page $index')),
initPosition: 0,
indicatorColor: Colors.blue,
labelColor: Colors.black,
),
),
);
}
}