From 3352b91f2cbcb1983a74bafa569f4d88848d9da1 Mon Sep 17 00:00:00 2001 From: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com> Date: Tue, 29 Oct 2019 14:31:27 -0700 Subject: [PATCH] CupertinoPicker doc update (#43736) --- packages/flutter/lib/src/cupertino/picker.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/cupertino/picker.dart b/packages/flutter/lib/src/cupertino/picker.dart index 080cca09cda..df95cccef9f 100644 --- a/packages/flutter/lib/src/cupertino/picker.dart +++ b/packages/flutter/lib/src/cupertino/picker.dart @@ -26,6 +26,10 @@ const double _kForegroundScreenOpacityFraction = 0.7; /// Displays its children widgets on a wheel for selection and /// calls back when the currently selected item changes. /// +/// By default, the first child in [children] will be the initially selected child. +/// The index of a different child can be specified in [scrollController], to make +/// that child the initially selected child. +/// /// Can be used with [showCupertinoModalPopup] to display the picker modally at the /// bottom of the screen. /// @@ -154,7 +158,8 @@ class CupertinoPicker extends StatefulWidget { /// {@macro flutter.rendering.wheelList.magnification} final double magnification; - /// A [FixedExtentScrollController] to read and control the current item. + /// A [FixedExtentScrollController] to read and control the current item, and + /// to set the initial item. /// /// If null, an implicit one will be created internally. final FixedExtentScrollController scrollController;