This reverts commit 4ec8883b83.
This commit is contained in:
@@ -82,9 +82,6 @@ class TweenSequence<T> extends Animatable<T> {
|
||||
assert(false, 'TweenSequence.evaluate() could not find a interval for $t');
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'TweenSequence(${_items.length} items)';
|
||||
}
|
||||
|
||||
/// A simple holder for one element of a [TweenSequence].
|
||||
|
||||
@@ -127,7 +127,6 @@ class TextField extends StatefulWidget {
|
||||
this.keyboardAppearance,
|
||||
this.scrollPadding = const EdgeInsets.all(20.0),
|
||||
this.enableInteractiveSelection = true,
|
||||
this.onTap,
|
||||
}) : assert(textAlign != null),
|
||||
assert(autofocus != null),
|
||||
assert(obscureText != null),
|
||||
@@ -145,44 +144,9 @@ class TextField extends StatefulWidget {
|
||||
/// If null, this widget will create its own [TextEditingController].
|
||||
final TextEditingController controller;
|
||||
|
||||
/// Defines the keyboard focus for this widget.
|
||||
///
|
||||
/// The [focusNode] is a long-lived object that's typically managed by a
|
||||
/// [StatefulWidget] parent. See [FocusNode] for more information.
|
||||
///
|
||||
/// To give the keyboard focus to this widget provide a [focusNode] and then
|
||||
/// use the current [FocusScope] to request the focus:
|
||||
///
|
||||
/// ```dart
|
||||
/// FocusScope.of(context).requestFocus(myFocusNode);
|
||||
/// ```
|
||||
///
|
||||
/// This happens automatically when the widget is tapped.
|
||||
///
|
||||
/// To be notified when the widget gains or loses the focus, add a listener
|
||||
/// to the [focusNode]:
|
||||
///
|
||||
/// ```dart
|
||||
/// focusNode.addListener(() { print(myFocusNode.hasFocus); });
|
||||
/// ```
|
||||
/// Controls whether this widget has keyboard focus.
|
||||
///
|
||||
/// If null, this widget will create its own [FocusNode].
|
||||
///
|
||||
/// ## Keyboard
|
||||
///
|
||||
/// Requesting the focus will typically cause the the keyboard to be shown
|
||||
/// if it's not showing already.
|
||||
///
|
||||
/// On Android, the user can hide the keyboard - withouth changing the focus -
|
||||
/// with the system back button. They can restore the keyboard's visibility
|
||||
/// by tapping on a text field. The user might hide the keyboard and
|
||||
/// switch to a physical keyboard, or they might just need to get it
|
||||
/// out of the way for a moment, to expose something it's
|
||||
/// obscuring. In this case requesting the focus again will not
|
||||
/// cause the focus to change, and will not make the keyboard visible.
|
||||
///
|
||||
/// This widget builds an [EditableText] and will ensure that the keyboard is
|
||||
/// showing when it is tapped by calling [EditableTextState.requestKeyboard()].
|
||||
final FocusNode focusNode;
|
||||
|
||||
/// The decoration to show around the text field.
|
||||
@@ -334,26 +298,6 @@ class TextField extends StatefulWidget {
|
||||
/// {@macro flutter.widgets.editableText.enableInteractiveSelection}
|
||||
final bool enableInteractiveSelection;
|
||||
|
||||
/// Called when the user taps on this textfield.
|
||||
///
|
||||
/// The textfield builds a [GestureDetector] to handle input events like tap,
|
||||
/// to trigger focus requests, to move the caret, adjust the selection, etc.
|
||||
/// Handling some of those events by wrapping the textfield with a competing
|
||||
/// GestureDetector is problematic.
|
||||
///
|
||||
/// To unconditionally handle taps, without interfering with the textfield's
|
||||
/// internal gesture detector, provide this callback.
|
||||
///
|
||||
/// If the textfield is created with [enabled] false, taps will not be
|
||||
/// recognized.
|
||||
///
|
||||
/// To be notified when the textfield gains or loses the focus, provide a
|
||||
/// [focusNode] and add a listener to that.
|
||||
///
|
||||
/// To listen to arbitrary pointer events without competing with the
|
||||
/// textfield's internal gesture detector, use a [Listener].
|
||||
final GestureTapCallback onTap;
|
||||
|
||||
@override
|
||||
_TextFieldState createState() => _TextFieldState();
|
||||
|
||||
@@ -371,7 +315,6 @@ class TextField extends StatefulWidget {
|
||||
properties.add(IntProperty('maxLines', maxLines, defaultValue: 1));
|
||||
properties.add(IntProperty('maxLength', maxLength, defaultValue: null));
|
||||
properties.add(FlagProperty('maxLengthEnforced', value: maxLengthEnforced, ifTrue: 'max length enforced'));
|
||||
properties.add(DiagnosticsProperty<GestureTapCallback>('onTap', onTap, defaultValue: false));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,8 +453,6 @@ class _TextFieldState extends State<TextField> with AutomaticKeepAliveClientMixi
|
||||
_renderEditable.handleTap();
|
||||
_requestKeyboard();
|
||||
_confirmCurrentSplash();
|
||||
if (widget.onTap != null)
|
||||
widget.onTap();
|
||||
}
|
||||
|
||||
void _handleTapCancel() {
|
||||
|
||||
@@ -9,7 +9,7 @@ environment:
|
||||
|
||||
dependencies:
|
||||
# To update these, use "flutter update-packages --force-upgrade".
|
||||
analyzer: 0.33.3+2
|
||||
analyzer: 0.33.3
|
||||
archive: 2.0.4
|
||||
args: 1.5.1
|
||||
cli_util: 0.1.3+2
|
||||
@@ -51,12 +51,12 @@ dependencies:
|
||||
convert: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
csslib: 0.14.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
dart2_constant: 1.0.2+dart2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
front_end: 0.1.6+5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
front_end: 0.1.6+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
glob: 1.1.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
html: 0.13.3+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http_parser: 3.1.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
io: 0.3.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
kernel: 0.3.6+5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
kernel: 0.3.6+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
logging: 0.11.3+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
matcher: 0.12.3+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
package_resolver: 1.0.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
@@ -94,4 +94,4 @@ dartdoc:
|
||||
# Exclude this package from the hosted API docs.
|
||||
nodoc: true
|
||||
|
||||
# PUBSPEC CHECKSUM: 1cc9
|
||||
# PUBSPEC CHECKSUM: 1368
|
||||
|
||||
Reference in New Issue
Block a user