From e8cf6740826ae6099aa922231681a95077d2fecf Mon Sep 17 00:00:00 2001 From: Shi-Hao Hong Date: Wed, 6 Jan 2021 08:26:53 +0800 Subject: [PATCH] [NNBD] Migrate sample code (#72938) --- packages/flutter/lib/src/material/input_decorator.dart | 2 +- .../flutter/lib/src/widgets/nested_scroll_view.dart | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/flutter/lib/src/material/input_decorator.dart b/packages/flutter/lib/src/material/input_decorator.dart index 3f449e28a7..9055b9f38d 100644 --- a/packages/flutter/lib/src/material/input_decorator.dart +++ b/packages/flutter/lib/src/material/input_decorator.dart @@ -3014,7 +3014,7 @@ class InputDecoration { /// If null, a [BoxConstraints] with a minimum width and height of 48px is /// 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 /// [suffixIconConstraints] is set to the default value and when one is not. /// diff --git a/packages/flutter/lib/src/widgets/nested_scroll_view.dart b/packages/flutter/lib/src/widgets/nested_scroll_view.dart index c0c059356e..22d52c6c8e 100644 --- a/packages/flutter/lib/src/widgets/nested_scroll_view.dart +++ b/packages/flutter/lib/src/widgets/nested_scroll_view.dart @@ -58,7 +58,7 @@ typedef NestedScrollViewHeaderSliversBuilder = List Function(BuildContex /// (those inside the [TabBarView], hooking them together so that they appear, /// 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 /// [TabBar] in a [SliverAppBar] and whose body is a [TabBarView]. It uses a @@ -220,7 +220,7 @@ typedef NestedScrollViewHeaderSliversBuilder = List Function(BuildContex /// configuration, the flexible space of the app bar will open and collapse, /// 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 /// floating [SliverAppBar]. By using the [floatHeaderSlivers] property, the @@ -281,7 +281,7 @@ typedef NestedScrollViewHeaderSliversBuilder = List Function(BuildContex /// 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. /// -/// {@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 /// snapping, floating [SliverAppBar]. _Without_ setting any additional flags, @@ -500,7 +500,7 @@ class NestedScrollView extends StatefulWidget { /// [NestedScrollView], you can get its [NestedScrollViewState] by supplying a /// `GlobalKey` 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]. /// Using the following setup, you can access the inner scroll controller /// using `globalKey.currentState.innerController`. @@ -527,7 +527,7 @@ class NestedScrollView extends StatefulWidget { /// } /// /// ScrollController get innerController { -/// return globalKey.currentState.innerController; +/// return globalKey.currentState!.innerController; /// } /// ``` /// {@end-tool}