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

[NNBD] Migrate sample code pt 5 (#72845)

parent b21e08c8
...@@ -48,7 +48,7 @@ class _ActiveItem implements Comparable<_ActiveItem> { ...@@ -48,7 +48,7 @@ class _ActiveItem implements Comparable<_ActiveItem> {
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=ZtfItHwFlZ8} /// {@youtube 560 315 https://www.youtube.com/watch?v=ZtfItHwFlZ8}
/// ///
/// {@tool dartpad --template=freeform_no_null_safety} /// {@tool dartpad --template=freeform}
/// This sample application uses an [AnimatedList] to create an effect when /// This sample application uses an [AnimatedList] to create an effect when
/// items are removed or added to the list. /// items are removed or added to the list.
/// ///
...@@ -65,9 +65,9 @@ class _ActiveItem implements Comparable<_ActiveItem> { ...@@ -65,9 +65,9 @@ class _ActiveItem implements Comparable<_ActiveItem> {
/// ///
/// class _AnimatedListSampleState extends State<AnimatedListSample> { /// class _AnimatedListSampleState extends State<AnimatedListSample> {
/// final GlobalKey<AnimatedListState> _listKey = GlobalKey<AnimatedListState>(); /// final GlobalKey<AnimatedListState> _listKey = GlobalKey<AnimatedListState>();
/// ListModel<int> _list; /// late ListModel<int> _list;
/// int _selectedItem; /// int? _selectedItem;
/// int _nextItem; // The next item inserted when the user presses the '+' button. /// late int _nextItem; // The next item inserted when the user presses the '+' button.
/// ///
/// @override /// @override
/// void initState() { /// void initState() {
...@@ -111,14 +111,14 @@ class _ActiveItem implements Comparable<_ActiveItem> { ...@@ -111,14 +111,14 @@ class _ActiveItem implements Comparable<_ActiveItem> {
/// ///
/// // Insert the "next item" into the list model. /// // Insert the "next item" into the list model.
/// void _insert() { /// void _insert() {
/// final int index = _selectedItem == null ? _list.length : _list.indexOf(_selectedItem); /// final int index = _selectedItem == null ? _list.length : _list.indexOf(_selectedItem!);
/// _list.insert(index, _nextItem++); /// _list.insert(index, _nextItem++);
/// } /// }
/// ///
/// // Remove the selected item from the list model. /// // Remove the selected item from the list model.
/// void _remove() { /// void _remove() {
/// if (_selectedItem != null) { /// if (_selectedItem != null) {
/// _list.removeAt(_list.indexOf(_selectedItem)); /// _list.removeAt(_list.indexOf(_selectedItem!));
/// setState(() { /// setState(() {
/// _selectedItem = null; /// _selectedItem = null;
/// }); /// });
...@@ -168,30 +168,30 @@ class _ActiveItem implements Comparable<_ActiveItem> { ...@@ -168,30 +168,30 @@ class _ActiveItem implements Comparable<_ActiveItem> {
/// /// of [AnimatedListState.insertItem] and [AnimatedList.removeItem]. /// /// of [AnimatedListState.insertItem] and [AnimatedList.removeItem].
/// class ListModel<E> { /// class ListModel<E> {
/// ListModel({ /// ListModel({
/// @required this.listKey, /// required this.listKey,
/// @required this.removedItemBuilder, /// required this.removedItemBuilder,
/// Iterable<E> initialItems, /// Iterable<E>? initialItems,
/// }) : assert(listKey != null), /// }) : _items = List<E>.from(initialItems ?? <E>[]);
/// assert(removedItemBuilder != null),
/// _items = List<E>.from(initialItems ?? <E>[]);
/// ///
/// final GlobalKey<AnimatedListState> listKey; /// final GlobalKey<AnimatedListState> listKey;
/// final dynamic removedItemBuilder; /// final dynamic removedItemBuilder;
/// final List<E> _items; /// final List<E> _items;
/// ///
/// AnimatedListState get _animatedList => listKey.currentState; /// AnimatedListState? get _animatedList => listKey.currentState;
/// ///
/// void insert(int index, E item) { /// void insert(int index, E item) {
/// _items.insert(index, item); /// _items.insert(index, item);
/// _animatedList.insertItem(index); /// _animatedList!.insertItem(index);
/// } /// }
/// ///
/// E removeAt(int index) { /// E removeAt(int index) {
/// final E removedItem = _items.removeAt(index); /// final E removedItem = _items.removeAt(index);
/// if (removedItem != null) { /// if (removedItem != null) {
/// _animatedList.removeItem( /// _animatedList!.removeItem(
/// index, /// index,
/// (BuildContext context, Animation<double> animation) => removedItemBuilder(removedItem, context, animation), /// (BuildContext context, Animation<double> animation) {
/// return removedItemBuilder(removedItem, context, animation);
/// },
/// ); /// );
/// } /// }
/// return removedItem; /// return removedItem;
...@@ -212,24 +212,22 @@ class _ActiveItem implements Comparable<_ActiveItem> { ...@@ -212,24 +212,22 @@ class _ActiveItem implements Comparable<_ActiveItem> {
/// /// varies from 0 to 128 as the animation varies from 0.0 to 1.0. /// /// varies from 0 to 128 as the animation varies from 0.0 to 1.0.
/// class CardItem extends StatelessWidget { /// class CardItem extends StatelessWidget {
/// const CardItem({ /// const CardItem({
/// Key key, /// Key? key,
/// @required this.animation,
/// this.onTap, /// this.onTap,
/// @required this.item, /// this.selected = false,
/// this.selected: false /// required this.animation,
/// }) : assert(animation != null), /// required this.item,
/// assert(item != null && item >= 0), /// }) : assert(item >= 0),
/// assert(selected != null),
/// super(key: key); /// super(key: key);
/// ///
/// final Animation<double> animation; /// final Animation<double> animation;
/// final VoidCallback onTap; /// final VoidCallback? onTap;
/// final int item; /// final int item;
/// final bool selected; /// final bool selected;
/// ///
/// @override /// @override
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
/// TextStyle textStyle = Theme.of(context).textTheme.headline4; /// TextStyle textStyle = Theme.of(context).textTheme.headline4!;
/// if (selected) /// if (selected)
/// textStyle = textStyle.copyWith(color: Colors.lightGreenAccent[400]); /// textStyle = textStyle.copyWith(color: Colors.lightGreenAccent[400]);
/// return Padding( /// return Padding(
...@@ -517,7 +515,7 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi ...@@ -517,7 +515,7 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi
/// [GlobalKey] or use the static [SliverAnimatedList.of] method from an item's /// [GlobalKey] or use the static [SliverAnimatedList.of] method from an item's
/// input callback. /// input callback.
/// ///
/// {@tool dartpad --template=freeform_no_null_safety} /// {@tool dartpad --template=freeform}
/// This sample application uses a [SliverAnimatedList] to create an animated /// This sample application uses a [SliverAnimatedList] to create an animated
/// effect when items are removed or added to the list. /// effect when items are removed or added to the list.
/// ///
...@@ -538,9 +536,9 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi ...@@ -538,9 +536,9 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi
/// final GlobalKey<SliverAnimatedListState> _listKey = GlobalKey<SliverAnimatedListState>(); /// final GlobalKey<SliverAnimatedListState> _listKey = GlobalKey<SliverAnimatedListState>();
/// final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>(); /// final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
/// final GlobalKey<ScaffoldMessengerState> _scaffoldMessengerKey = GlobalKey<ScaffoldMessengerState>(); /// final GlobalKey<ScaffoldMessengerState> _scaffoldMessengerKey = GlobalKey<ScaffoldMessengerState>();
/// ListModel<int> _list; /// late ListModel<int> _list;
/// int _selectedItem; /// int? _selectedItem;
/// int _nextItem; // The next item inserted when the user presses the '+' button. /// late int _nextItem; // The next item inserted when the user presses the '+' button.
/// ///
/// @override /// @override
/// void initState() { /// void initState() {
...@@ -583,19 +581,19 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi ...@@ -583,19 +581,19 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi
/// ///
/// // Insert the "next item" into the list model. /// // Insert the "next item" into the list model.
/// void _insert() { /// void _insert() {
/// final int index = _selectedItem == null ? _list.length : _list.indexOf(_selectedItem); /// final int index = _selectedItem == null ? _list.length : _list.indexOf(_selectedItem!);
/// _list.insert(index, _nextItem++); /// _list.insert(index, _nextItem++);
/// } /// }
/// ///
/// // Remove the selected item from the list model. /// // Remove the selected item from the list model.
/// void _remove() { /// void _remove() {
/// if (_selectedItem != null) { /// if (_selectedItem != null) {
/// _list.removeAt(_list.indexOf(_selectedItem)); /// _list.removeAt(_list.indexOf(_selectedItem!));
/// setState(() { /// setState(() {
/// _selectedItem = null; /// _selectedItem = null;
/// }); /// });
/// } else { /// } else {
/// _scaffoldMessengerKey.currentState.showSnackBar(SnackBar( /// _scaffoldMessengerKey.currentState!.showSnackBar(SnackBar(
/// content: Text( /// content: Text(
/// 'Select an item to remove from the list.', /// 'Select an item to remove from the list.',
/// style: TextStyle(fontSize: 20), /// style: TextStyle(fontSize: 20),
...@@ -658,18 +656,16 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi ...@@ -658,18 +656,16 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi
/// // of [AnimatedListState.insertItem] and [AnimatedList.removeItem]. /// // of [AnimatedListState.insertItem] and [AnimatedList.removeItem].
/// class ListModel<E> { /// class ListModel<E> {
/// ListModel({ /// ListModel({
/// @required this.listKey, /// required this.listKey,
/// @required this.removedItemBuilder, /// required this.removedItemBuilder,
/// Iterable<E> initialItems, /// Iterable<E>? initialItems,
/// }) : assert(listKey != null), /// }) : _items = List<E>.from(initialItems ?? <E>[]);
/// assert(removedItemBuilder != null),
/// _items = List<E>.from(initialItems ?? <E>[]);
/// ///
/// final GlobalKey<SliverAnimatedListState> listKey; /// final GlobalKey<SliverAnimatedListState> listKey;
/// final dynamic removedItemBuilder; /// final dynamic removedItemBuilder;
/// final List<E> _items; /// final List<E> _items;
/// ///
/// SliverAnimatedListState get _animatedList => listKey.currentState; /// SliverAnimatedListState get _animatedList => listKey.currentState!;
/// ///
/// void insert(int index, E item) { /// void insert(int index, E item) {
/// _items.insert(index, item); /// _items.insert(index, item);
...@@ -702,18 +698,16 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi ...@@ -702,18 +698,16 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi
/// // transitions from 0.0 to 1.0. /// // transitions from 0.0 to 1.0.
/// class CardItem extends StatelessWidget { /// class CardItem extends StatelessWidget {
/// const CardItem({ /// const CardItem({
/// Key key, /// Key? key,
/// @required this.animation,
/// @required this.item,
/// this.onTap, /// this.onTap,
/// this.selected = false, /// this.selected = false,
/// }) : assert(animation != null), /// required this.animation,
/// assert(item != null && item >= 0), /// required this.item,
/// assert(selected != null), /// }) : assert(item >= 0),
/// super(key: key); /// super(key: key);
/// ///
/// final Animation<double> animation; /// final Animation<double> animation;
/// final VoidCallback onTap; /// final VoidCallback? onTap;
/// final int item; /// final int item;
/// final bool selected; /// final bool selected;
/// ///
......
...@@ -11,7 +11,7 @@ import 'framework.dart'; ...@@ -11,7 +11,7 @@ import 'framework.dart';
/// Animated widget that automatically transitions its size over a given /// Animated widget that automatically transitions its size over a given
/// duration whenever the given child's size changes. /// duration whenever the given child's size changes.
/// ///
/// {@tool dartpad --template=stateful_widget_scaffold_center_freeform_state_no_null_safety} /// {@tool dartpad --template=stateful_widget_scaffold_center_freeform_state}
/// This example makes a [Container] react to being touched, causing the child /// This example makes a [Container] react to being touched, causing the child
/// of the [AnimatedSize] widget, here a [FlutterLogo], to animate. /// of the [AnimatedSize] widget, here a [FlutterLogo], to animate.
/// ///
......
...@@ -51,7 +51,7 @@ enum AutofillContextAction { ...@@ -51,7 +51,7 @@ enum AutofillContextAction {
/// autofillable input fields in an [AutofillGroup], so the user input of the /// autofillable input fields in an [AutofillGroup], so the user input of the
/// [Form] can be saved for future autofill by the platform. /// [Form] can be saved for future autofill by the platform.
/// ///
/// {@tool dartpad --template=stateful_widget_scaffold_no_null_safety} /// {@tool dartpad --template=stateful_widget_scaffold}
/// ///
/// An example form with autofillable fields grouped into different /// An example form with autofillable fields grouped into different
/// `AutofillGroup`s. /// `AutofillGroup`s.
...@@ -92,8 +92,10 @@ enum AutofillContextAction { ...@@ -92,8 +92,10 @@ enum AutofillContextAction {
/// const Text('Billing address'), /// const Text('Billing address'),
/// Checkbox( /// Checkbox(
/// value: isSameAddress, /// value: isSameAddress,
/// onChanged: (bool newValue) { /// onChanged: (bool? newValue) {
/// setState(() { isSameAddress = newValue; }); /// if (newValue != null) {
/// setState(() { isSameAddress = newValue; });
/// }
/// }, /// },
/// ), /// ),
/// // Again the address fields are grouped together for the same reason. /// // Again the address fields are grouped together for the same reason.
......
...@@ -65,7 +65,7 @@ enum DismissDirection { ...@@ -65,7 +65,7 @@ enum DismissDirection {
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=iEMgjrfuc58} /// {@youtube 560 315 https://www.youtube.com/watch?v=iEMgjrfuc58}
/// ///
/// {@tool dartpad --template=stateful_widget_scaffold_no_null_safety} /// {@tool dartpad --template=stateful_widget_scaffold}
/// ///
/// This sample shows how you can use the [Dismissible] widget to /// This sample shows how you can use the [Dismissible] widget to
/// remove list items using swipe gestures. Swipe any of the list /// remove list items using swipe gestures. Swipe any of the list
......
...@@ -48,7 +48,7 @@ import 'inherited_notifier.dart'; ...@@ -48,7 +48,7 @@ import 'inherited_notifier.dart';
/// the focus traversal order, call `Focus.of(context).nextFocus()`. To unfocus /// the focus traversal order, call `Focus.of(context).nextFocus()`. To unfocus
/// a widget, call `Focus.of(context).unfocus()`. /// a widget, call `Focus.of(context).unfocus()`.
/// ///
/// {@tool dartpad --template=stateful_widget_scaffold_no_null_safety} /// {@tool dartpad --template=stateful_widget_scaffold}
/// This example shows how to manage focus using the [Focus] and [FocusScope] /// This example shows how to manage focus using the [Focus] and [FocusScope]
/// widgets. See [FocusNode] for a similar example that doesn't use [Focus] or /// widgets. See [FocusNode] for a similar example that doesn't use [Focus] or
/// [FocusScope]. /// [FocusScope].
...@@ -93,7 +93,7 @@ import 'inherited_notifier.dart'; ...@@ -93,7 +93,7 @@ import 'inherited_notifier.dart';
/// debugLabel: 'Scope', /// debugLabel: 'Scope',
/// autofocus: true, /// autofocus: true,
/// child: DefaultTextStyle( /// child: DefaultTextStyle(
/// style: textTheme.headline4, /// style: textTheme.headline4!,
/// child: Focus( /// child: Focus(
/// onKey: _handleKeyPress, /// onKey: _handleKeyPress,
/// debugLabel: 'Button', /// debugLabel: 'Button',
...@@ -128,7 +128,7 @@ import 'inherited_notifier.dart'; ...@@ -128,7 +128,7 @@ import 'inherited_notifier.dart';
/// ``` /// ```
/// {@end-tool} /// {@end-tool}
/// ///
/// {@tool dartpad --template=stateless_widget_material_no_null_safety} /// {@tool dartpad --template=stateless_widget_material}
/// This example shows how to wrap another widget in a [Focus] widget to make it /// This example shows how to wrap another widget in a [Focus] widget to make it
/// focusable. It wraps a [Container], and changes the container's color when it /// focusable. It wraps a [Container], and changes the container's color when it
/// is set as the [FocusManager.primaryFocus]. /// is set as the [FocusManager.primaryFocus].
...@@ -139,7 +139,10 @@ import 'inherited_notifier.dart'; ...@@ -139,7 +139,10 @@ import 'inherited_notifier.dart';
/// ///
/// ```dart preamble /// ```dart preamble
/// class FocusableText extends StatelessWidget { /// class FocusableText extends StatelessWidget {
/// const FocusableText(this.data, {Key key, this.autofocus}) : super(key: key); /// const FocusableText(this.data, {
/// Key? key,
/// required this.autofocus,
/// }) : super(key: key);
/// ///
/// /// The string to display as the text for this widget. /// /// The string to display as the text for this widget.
/// final String data; /// final String data;
...@@ -186,7 +189,7 @@ import 'inherited_notifier.dart'; ...@@ -186,7 +189,7 @@ import 'inherited_notifier.dart';
/// ``` /// ```
/// {@end-tool} /// {@end-tool}
/// ///
/// {@tool dartpad --template=stateful_widget_material_no_null_safety} /// {@tool dartpad --template=stateful_widget_material}
/// This example shows how to focus a newly-created widget immediately after it /// This example shows how to focus a newly-created widget immediately after it
/// is created. /// is created.
/// ///
...@@ -738,7 +741,7 @@ class _FocusState extends State<Focus> { ...@@ -738,7 +741,7 @@ class _FocusState extends State<Focus> {
/// the focus traversal order, call `Focus.of(context).nextFocus()`. To unfocus /// the focus traversal order, call `Focus.of(context).nextFocus()`. To unfocus
/// a widget, call `Focus.of(context).unfocus()`. /// a widget, call `Focus.of(context).unfocus()`.
/// ///
/// {@tool dartpad --template=stateful_widget_material_no_null_safety} /// {@tool dartpad --template=stateful_widget_material}
/// This example demonstrates using a [FocusScope] to restrict focus to a particular /// This example demonstrates using a [FocusScope] to restrict focus to a particular
/// portion of the app. In this case, restricting focus to the visible part of a /// portion of the app. In this case, restricting focus to the visible part of a
/// Stack. /// Stack.
...@@ -749,19 +752,19 @@ class _FocusState extends State<Focus> { ...@@ -749,19 +752,19 @@ class _FocusState extends State<Focus> {
/// /// This is just a separate widget to simplify the example. /// /// This is just a separate widget to simplify the example.
/// class Pane extends StatelessWidget { /// class Pane extends StatelessWidget {
/// const Pane({ /// const Pane({
/// Key key, /// Key? key,
/// this.focusNode, /// required this.focusNode,
/// this.onPressed, /// this.onPressed,
/// required this.backgroundColor,
/// required this.icon,
/// this.child, /// this.child,
/// this.backgroundColor,
/// this.icon,
/// }) : super(key: key); /// }) : super(key: key);
/// ///
/// final FocusNode focusNode; /// final FocusNode focusNode;
/// final VoidCallback onPressed; /// final VoidCallback? onPressed;
/// final Widget child;
/// final Color backgroundColor; /// final Color backgroundColor;
/// final Widget icon; /// final Widget icon;
/// final Widget? child;
/// ///
/// @override /// @override
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
...@@ -835,7 +838,7 @@ class _FocusState extends State<Focus> { ...@@ -835,7 +838,7 @@ class _FocusState extends State<Focus> {
/// child: Text('ANOTHER BUTTON TO FOCUS'), /// child: Text('ANOTHER BUTTON TO FOCUS'),
/// ), /// ),
/// DefaultTextStyle( /// DefaultTextStyle(
/// style: Theme.of(context).textTheme.headline2, /// style: Theme.of(context).textTheme.headline2!,
/// child: Text('BACKDROP')), /// child: Text('BACKDROP')),
/// ], /// ],
/// ), /// ),
...@@ -864,7 +867,7 @@ class _FocusState extends State<Focus> { ...@@ -864,7 +867,7 @@ class _FocusState extends State<Focus> {
/// ? null /// ? null
/// : () => setState(() => backdropIsVisible = true), /// : () => setState(() => backdropIsVisible = true),
/// child: DefaultTextStyle( /// child: DefaultTextStyle(
/// style: Theme.of(context).textTheme.headline2, /// style: Theme.of(context).textTheme.headline2!,
/// child: Text('FOREGROUND')), /// child: Text('FOREGROUND')),
/// ), /// ),
/// ), /// ),
......
...@@ -44,7 +44,7 @@ enum OverflowBarAlignment { ...@@ -44,7 +44,7 @@ enum OverflowBarAlignment {
/// If the layout overflows, then children's order within their /// If the layout overflows, then children's order within their
/// column is specified by [overflowDirection] instead. /// column is specified by [overflowDirection] instead.
/// ///
/// {@tool dartpad --template=stateless_widget_scaffold_center_no_null_safety} /// {@tool dartpad --template=stateless_widget_scaffold_center}
/// ///
/// This example defines a simple approximation of a dialog /// This example defines a simple approximation of a dialog
/// layout, where the layout of the dialog's action buttons are /// layout, where the layout of the dialog's action buttons are
......
...@@ -203,7 +203,7 @@ class _RenderSliverFractionalPadding extends RenderSliverEdgeInsetsPadding { ...@@ -203,7 +203,7 @@ class _RenderSliverFractionalPadding extends RenderSliverEdgeInsetsPadding {
/// of space that has been scrolled beforehand has not exceeded the main axis /// of space that has been scrolled beforehand has not exceeded the main axis
/// extent of the viewport. /// extent of the viewport.
/// ///
/// {@tool dartpad --template=stateless_widget_scaffold_no_null_safety} /// {@tool dartpad --template=stateless_widget_scaffold}
/// ///
/// In this sample the [SliverFillRemaining] sizes its [child] to fill the /// In this sample the [SliverFillRemaining] sizes its [child] to fill the
/// remaining extent of the viewport in both axes. The icon is centered in the /// remaining extent of the viewport in both axes. The icon is centered in the
...@@ -239,7 +239,7 @@ class _RenderSliverFractionalPadding extends RenderSliverEdgeInsetsPadding { ...@@ -239,7 +239,7 @@ class _RenderSliverFractionalPadding extends RenderSliverEdgeInsetsPadding {
/// [SliverFillRemaining] will defer to the size of its [child] if the /// [SliverFillRemaining] will defer to the size of its [child] if the
/// child's size exceeds the remaining space in the viewport. /// child's size exceeds the remaining space in the viewport.
/// ///
/// {@tool dartpad --template=stateless_widget_scaffold_no_null_safety} /// {@tool dartpad --template=stateless_widget_scaffold}
/// ///
/// In this sample the [SliverFillRemaining] defers to the size of its [child] /// In this sample the [SliverFillRemaining] defers to the size of its [child]
/// because the child's extent exceeds that of the remaining extent of the /// because the child's extent exceeds that of the remaining extent of the
...@@ -281,7 +281,7 @@ class _RenderSliverFractionalPadding extends RenderSliverEdgeInsetsPadding { ...@@ -281,7 +281,7 @@ class _RenderSliverFractionalPadding extends RenderSliverEdgeInsetsPadding {
/// [SliverFillRemaining] will defer to the size of its [child] if the /// [SliverFillRemaining] will defer to the size of its [child] if the
/// [SliverConstraints.precedingScrollExtent] exceeded the length of the viewport's main axis. /// [SliverConstraints.precedingScrollExtent] exceeded the length of the viewport's main axis.
/// ///
/// {@tool dartpad --template=stateless_widget_scaffold_no_null_safety} /// {@tool dartpad --template=stateless_widget_scaffold}
/// ///
/// In this sample the [SliverFillRemaining] defers to the size of its [child] /// In this sample the [SliverFillRemaining] defers to the size of its [child]
/// because the [SliverConstraints.precedingScrollExtent] has gone /// because the [SliverConstraints.precedingScrollExtent] has gone
...@@ -330,7 +330,7 @@ class _RenderSliverFractionalPadding extends RenderSliverEdgeInsetsPadding { ...@@ -330,7 +330,7 @@ class _RenderSliverFractionalPadding extends RenderSliverEdgeInsetsPadding {
/// ///
/// {@animation 250 500 https://flutter.github.io/assets-for-api-docs/assets/widgets/sliver_fill_remaining_fill_overscroll.mp4} /// {@animation 250 500 https://flutter.github.io/assets-for-api-docs/assets/widgets/sliver_fill_remaining_fill_overscroll.mp4}
/// ///
/// {@tool sample --template=stateless_widget_scaffold_no_null_safety} /// {@tool sample --template=stateless_widget_scaffold}
/// ///
/// In this sample the [SliverFillRemaining]'s child stretches to fill the /// In this sample the [SliverFillRemaining]'s child stretches to fill the
/// overscroll area when [fillOverscroll] is true. This sample also features a /// overscroll area when [fillOverscroll] is true. This sample also features a
......
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