Unverified Commit e8cf6740 authored by Shi-Hao Hong's avatar Shi-Hao Hong Committed by GitHub

[NNBD] Migrate sample code (#72938)

parent 47bad772
...@@ -3014,7 +3014,7 @@ class InputDecoration { ...@@ -3014,7 +3014,7 @@ class InputDecoration {
/// If null, a [BoxConstraints] with a minimum width and height of 48px is /// If null, a [BoxConstraints] with a minimum width and height of 48px is
/// used. /// used.
/// ///
/// {@tool dartpad --template=stateless_widget_scaffold_no_null_safety} /// {@tool dartpad --template=stateless_widget_scaffold}
/// This example shows the differences between two `TextField` widgets when /// This example shows the differences between two `TextField` widgets when
/// [suffixIconConstraints] is set to the default value and when one is not. /// [suffixIconConstraints] is set to the default value and when one is not.
/// ///
......
...@@ -58,7 +58,7 @@ typedef NestedScrollViewHeaderSliversBuilder = List<Widget> Function(BuildContex ...@@ -58,7 +58,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_material_no_null_safety} /// {@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
...@@ -220,7 +220,7 @@ typedef NestedScrollViewHeaderSliversBuilder = List<Widget> Function(BuildContex ...@@ -220,7 +220,7 @@ typedef NestedScrollViewHeaderSliversBuilder = List<Widget> Function(BuildContex
/// configuration, the flexible space of the app bar will open and collapse, /// configuration, the flexible space of the app bar will open and collapse,
/// while the primary portion of the app bar remains pinned. /// while the primary portion of the app bar remains pinned.
/// ///
/// {@tool sample --template=stateless_widget_material_no_null_safety} /// {@tool sample --template=stateless_widget_material}
/// ///
/// This simple example shows a [NestedScrollView] whose header contains a /// This simple example shows a [NestedScrollView] whose header contains a
/// floating [SliverAppBar]. By using the [floatHeaderSlivers] property, the /// floating [SliverAppBar]. By using the [floatHeaderSlivers] property, the
...@@ -281,7 +281,7 @@ typedef NestedScrollViewHeaderSliversBuilder = List<Widget> Function(BuildContex ...@@ -281,7 +281,7 @@ typedef NestedScrollViewHeaderSliversBuilder = List<Widget> Function(BuildContex
/// for the nested "inner" scroll view below to end up under the [SliverAppBar] /// for the nested "inner" scroll view below to end up under the [SliverAppBar]
/// even when the inner scroll view thinks it has not been scrolled. /// even when the inner scroll view thinks it has not been scrolled.
/// ///
/// {@tool sample --template=stateless_widget_material_no_null_safety} /// {@tool sample --template=stateless_widget_material}
/// ///
/// This simple example shows a [NestedScrollView] whose header contains a /// This simple example shows a [NestedScrollView] whose header contains a
/// snapping, floating [SliverAppBar]. _Without_ setting any additional flags, /// snapping, floating [SliverAppBar]. _Without_ setting any additional flags,
...@@ -500,7 +500,7 @@ class NestedScrollView extends StatefulWidget { ...@@ -500,7 +500,7 @@ class NestedScrollView extends StatefulWidget {
/// [NestedScrollView], you can get its [NestedScrollViewState] by supplying a /// [NestedScrollView], you can get its [NestedScrollViewState] by supplying a
/// `GlobalKey<NestedScrollViewState>` to the [NestedScrollView.key] parameter). /// `GlobalKey<NestedScrollViewState>` to the [NestedScrollView.key] parameter).
/// ///
/// {@tool dartpad --template=stateless_widget_material_no_null_safety} /// {@tool dartpad --template=stateless_widget_material}
/// [NestedScrollViewState] can be obtained using a [GlobalKey]. /// [NestedScrollViewState] can be obtained using a [GlobalKey].
/// Using the following setup, you can access the inner scroll controller /// Using the following setup, you can access the inner scroll controller
/// using `globalKey.currentState.innerController`. /// using `globalKey.currentState.innerController`.
...@@ -527,7 +527,7 @@ class NestedScrollView extends StatefulWidget { ...@@ -527,7 +527,7 @@ class NestedScrollView extends StatefulWidget {
/// } /// }
/// ///
/// ScrollController get innerController { /// ScrollController get innerController {
/// return globalKey.currentState.innerController; /// return globalKey.currentState!.innerController;
/// } /// }
/// ``` /// ```
/// {@end-tool} /// {@end-tool}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment