Refactor tabbar code sample (#76387)
This commit is contained in:
parent
722a085f10
commit
f86c859bea
@ -574,42 +574,42 @@ class _TabBarScrollController extends ScrollController {
|
|||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Widget build(BuildContext context) {
|
/// Widget build(BuildContext context) {
|
||||||
/// return DefaultTabController(
|
/// return DefaultTabController(
|
||||||
/// initialIndex: 1,
|
/// initialIndex: 1,
|
||||||
/// length: 3,
|
/// length: 3,
|
||||||
/// child: Scaffold(
|
/// child: Scaffold(
|
||||||
/// appBar: AppBar(
|
/// appBar: AppBar(
|
||||||
/// title: const Text('TabBar Widget'),
|
/// title: const Text('TabBar Widget'),
|
||||||
/// bottom: const TabBar(
|
/// bottom: const TabBar(
|
||||||
/// tabs: <Widget>[
|
/// tabs: <Widget>[
|
||||||
/// Tab(
|
/// Tab(
|
||||||
/// icon: Icon(Icons.cloud_outlined),
|
/// icon: Icon(Icons.cloud_outlined),
|
||||||
/// ),
|
/// ),
|
||||||
/// Tab(
|
/// Tab(
|
||||||
/// icon: Icon(Icons.beach_access_sharp),
|
/// icon: Icon(Icons.beach_access_sharp),
|
||||||
/// ),
|
/// ),
|
||||||
/// Tab(
|
/// Tab(
|
||||||
/// icon: Icon(Icons.brightness_5_sharp),
|
/// icon: Icon(Icons.brightness_5_sharp),
|
||||||
/// ),
|
/// ),
|
||||||
/// ],
|
/// ],
|
||||||
/// ),
|
/// ),
|
||||||
/// ),
|
/// ),
|
||||||
/// body: const TabBarView(
|
/// body: const TabBarView(
|
||||||
/// children: <Widget>[
|
/// children: <Widget>[
|
||||||
/// Center(
|
/// Center(
|
||||||
/// child: Text('It\'s cloudy here'),
|
/// child: Text('It\'s cloudy here'),
|
||||||
/// ),
|
/// ),
|
||||||
/// Center(
|
/// Center(
|
||||||
/// child: Text('It\'s rainy here'),
|
/// child: Text('It\'s rainy here'),
|
||||||
/// ),
|
/// ),
|
||||||
/// Center(
|
/// Center(
|
||||||
/// child: Text('It\'s sunny here'),
|
/// child: Text('It\'s sunny here'),
|
||||||
/// ),
|
/// ),
|
||||||
/// ],
|
/// ],
|
||||||
/// ),
|
/// ),
|
||||||
/// ),
|
/// ),
|
||||||
/// );
|
/// );
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
/// {@end-tool}
|
/// {@end-tool}
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user