Refactor tabbar code sample (#76387)

This commit is contained in:
Abhishek Ghaskata 2021-04-01 03:49:02 +05:30 committed by GitHub
parent 722a085f10
commit f86c859bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -574,42 +574,42 @@ class _TabBarScrollController extends ScrollController {
///
/// ```dart
/// Widget build(BuildContext context) {
/// return DefaultTabController(
/// initialIndex: 1,
/// length: 3,
/// child: Scaffold(
/// appBar: AppBar(
/// title: const Text('TabBar Widget'),
/// bottom: const TabBar(
/// tabs: <Widget>[
/// Tab(
/// icon: Icon(Icons.cloud_outlined),
/// ),
/// Tab(
/// icon: Icon(Icons.beach_access_sharp),
/// ),
/// Tab(
/// icon: Icon(Icons.brightness_5_sharp),
/// ),
/// ],
/// ),
/// ),
/// body: const TabBarView(
/// children: <Widget>[
/// Center(
/// child: Text('It\'s cloudy here'),
/// ),
/// Center(
/// child: Text('It\'s rainy here'),
/// ),
/// Center(
/// child: Text('It\'s sunny here'),
/// ),
/// ],
/// ),
/// ),
/// );
/// }
/// return DefaultTabController(
/// initialIndex: 1,
/// length: 3,
/// child: Scaffold(
/// appBar: AppBar(
/// title: const Text('TabBar Widget'),
/// bottom: const TabBar(
/// tabs: <Widget>[
/// Tab(
/// icon: Icon(Icons.cloud_outlined),
/// ),
/// Tab(
/// icon: Icon(Icons.beach_access_sharp),
/// ),
/// Tab(
/// icon: Icon(Icons.brightness_5_sharp),
/// ),
/// ],
/// ),
/// ),
/// body: const TabBarView(
/// children: <Widget>[
/// Center(
/// child: Text('It\'s cloudy here'),
/// ),
/// Center(
/// child: Text('It\'s rainy here'),
/// ),
/// Center(
/// child: Text('It\'s sunny here'),
/// ),
/// ],
/// ),
/// ),
/// );
/// }
/// ```
/// {@end-tool}
///