contained_tab_bar_view 0.2.0 copy "contained_tab_bar_view: ^0.2.0" to clipboard
contained_tab_bar_view: ^0.2.0 copied to clipboard

outdated

ContainedTabBarView encapsulates TabController, TabBar and TabBarView into a single, easy to use Widget.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:contained_tab_bar_view/contained_tab_bar_view.dart';

void main() {
  runApp(App());
}

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('ContainedTabBarView Example'),
        ),
        body: Center(
          child: Container(
            padding: const EdgeInsets.all(8.0),
            color: Colors.blue,
            width: 200,
            height: 300,
            child: ContainedTabBarView(
              tabs: [
                Text('First'),
                Text('Second')
              ],
              views: [
                Container(color: Colors.red),
                Container(color: Colors.green)
              ],
              onChange: (index) => print(index),
            ),
          )
        ),
      ),
    );
  }
}
149
likes
0
pub points
97%
popularity

Publisher

verified publisherscipack.dev

ContainedTabBarView encapsulates TabController, TabBar and TabBarView into a single, easy to use Widget.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on contained_tab_bar_view