Fix sample code (#67940)
This commit is contained in:
parent
7f1540f323
commit
9464661a98
@ -61,7 +61,7 @@ typedef NestedScrollViewHeaderSliversBuilder = List<Widget> Function(BuildContex
|
|||||||
/// (those inside the [TabBarView], hooking them together so that they appear,
|
/// (those inside the [TabBarView], hooking them together so that they appear,
|
||||||
/// to the user, as one coherent scroll view.
|
/// to the user, as one coherent scroll view.
|
||||||
///
|
///
|
||||||
/// {@tool sample --template=stateless_widget_scaffold}
|
/// {@tool sample --template=stateless_widget_material}
|
||||||
///
|
///
|
||||||
/// This example shows a [NestedScrollView] whose header is the combination of a
|
/// This example shows a [NestedScrollView] whose header is the combination of a
|
||||||
/// [TabBar] in a [SliverAppBar] and whose body is a [TabBarView]. It uses a
|
/// [TabBar] in a [SliverAppBar] and whose body is a [TabBarView]. It uses a
|
||||||
@ -76,7 +76,8 @@ typedef NestedScrollViewHeaderSliversBuilder = List<Widget> Function(BuildContex
|
|||||||
/// final List<String> _tabs = ['Tab 1', 'Tab 2'];
|
/// final List<String> _tabs = ['Tab 1', 'Tab 2'];
|
||||||
/// return DefaultTabController(
|
/// return DefaultTabController(
|
||||||
/// length: _tabs.length, // This is the number of tabs.
|
/// length: _tabs.length, // This is the number of tabs.
|
||||||
/// child: NestedScrollView(
|
/// child: Scaffold(
|
||||||
|
/// body: NestedScrollView(
|
||||||
/// headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
/// headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
||||||
/// // These are the slivers that show up in the "outer" scroll view.
|
/// // These are the slivers that show up in the "outer" scroll view.
|
||||||
/// return <Widget>[
|
/// return <Widget>[
|
||||||
@ -173,6 +174,7 @@ typedef NestedScrollViewHeaderSliversBuilder = List<Widget> Function(BuildContex
|
|||||||
/// }).toList(),
|
/// }).toList(),
|
||||||
/// ),
|
/// ),
|
||||||
/// ),
|
/// ),
|
||||||
|
/// ),
|
||||||
/// );
|
/// );
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user