- 10 Apr, 2019 1 commit
-
-
Todd Volkert authored
This reverts commit 949023b2.
-
- 08 Apr, 2019 1 commit
-
-
Todd Volkert authored
When submitting data to a server, callers need a callback that will get invoked after all the individual form fields are saved. If they have a button that submits the form, they could just do this logic in the click handler for the button (save the form, then submit to the server), but if they have more ways than one to submit the form (i.e. hitting enter while in a text form field), then it becomes more convoluted and calls for a unified callback that will get notified when the form is submitted.
-
- 01 Mar, 2019 1 commit
-
-
Alexandre Ardhuin authored
* add trailing commas on list/map/parameters * add trailing commas on Invocation with nb of arg>1 * add commas for widget containing widgets * add trailing commas if instantiation contains trailing comma * revert bad change
-
- 29 Jan, 2019 1 commit
-
-
jslavitz authored
* Fixes cursor on iOS devices
-
- 16 Oct, 2018 1 commit
-
-
Alexandre Ardhuin authored
* Future<void> main * Future<void>.delayed * prefer_void_to_Null * address review comments
-
- 12 Sep, 2018 1 commit
-
-
Alexandre Ardhuin authored
* enable lint unnecessary_new * fix tests * fix tests * fix tests
-
- 26 Jun, 2018 1 commit
-
-
Ian Hickson authored
-
- 14 Mar, 2018 1 commit
-
-
Hans Muller authored
-
- 16 Feb, 2018 1 commit
-
-
Alexandre Ardhuin authored
* fix potential call on null * review
-
- 01 Feb, 2018 1 commit
-
-
Alexandre Ardhuin authored
-
- 29 Sep, 2017 1 commit
-
-
Chris Bracken authored
This patch fixes a collection of issues with widgets involved in text editing: * Fire widget.onChanged on EditableText value change: The value of an EditableText is composed of the text value as well as other editing-related data such as selection-related information. Previously, widget.onChanged() was only called for updates via updateEditingValue(). For pastes via a TextSelectionOverlay, updates are signalled via _handleSelectionOverlayChanged(), which only ever triggered widget.onSelectionChanged(), but not widget.onChanged(). Both updateEditingValue() and _handleSelectionOverlayChanged() perform the value update via _formatAndSetValue(), which is where this patch moves the widget.onChanged() call. * Correctly update TextFormField value on edits via controller: The textual value of a TextFormField exists in two locations: 1. FormField.value, as with all FormFields and subclasses. 2. TextEditingController.value associated with the TextField underlying the TextFormField. Previously, edits to the TextEditingController associated with a TextFormField resulted in updates to the rendered TextField widget, but did not update TextFormField.value. FormField.value is updated via FormField's onChanged function, which is called from the EditableText underlying the TextField underlying the TextFormField. EditableText only fires onChanged when it receives changes from the engine. It does not fire onChanged for changes made to the underlying TextController, since the owner of the TextController is the one making these changes and thus, already aware of them. FormField, however, *does* need to listen to these changes to update its value. * Adds an initialValue parameter to the TextFormField constructor: FormField's constructor already takes an initialValue parameter, which specifies the initial value in the field, which is also the value to which reset() returns the field. Previously, TextFormField took its initial value from the controller value (if a controller was passed in) or the empty string (if not). This had the undesirable effect that calling reset() always resets the value to the current value of the controller... i.e., does nothing. We now take an initial value explicitly.
-
- 07 Sep, 2017 1 commit
-
-
Ian Hickson authored
-
- 05 Sep, 2017 1 commit
-
-
Adam Barth authored
Fixes #11855
-
- 14 Apr, 2017 1 commit
-
-
Hans Muller authored
-
- 11 Apr, 2017 1 commit
-
-
xster authored
Rename State.config to State.widget Rename State.didUpdateConfig to State.didUpdateWidget Renamed all State subclasses' local variables named config to something else
-
- 02 Apr, 2017 2 commits
-
-
Adam Barth authored
Also, fix an issue where hint text wasn't visible when the InputDecoration was collapsed. Fixes #8541
-
Adam Barth authored
After this patch, there are three major text input widgets: * EditableText. This widget is a low-level editing control that interacts with the IME and displays a blinking cursor. * TextField. This widget is a Material Design text field, with all the bells and whistles. It is highly configurable and can be reduced down to a fairly simple control by setting its `decoration` property to null. * TextFormField. This widget is a FormField that wraps a TextField. This patch also replaces the InputValue data model for these widgets with a Listenable TextEditingController, which is much more flexible. Fixes #7031
-
- 31 Mar, 2017 1 commit
-
-
Adam Barth authored
We now have an explicit focus tree that we manage. Instead of using GlobalKeys to manage focus, we use FocusNode and FocusScopeNode objects. The FocusNode is Listenable and notifies when its focus state changes. Focus notifications trigger by tree mutations are now delayed by one frame, which is necessary to handle certain complex tree mutations. In the common case of focus changes being triggered by user input, the focus notificiation still arives in the same frame.
-
- 04 Mar, 2017 1 commit
-
-
Chris Bracken authored
-
- 07 Feb, 2017 1 commit
-
-
Hans Muller authored
-
- 04 Feb, 2017 1 commit
-
-
Ian Hickson authored
This prepares us for a CustomScrollView that takes slivers.
-
- 25 Jan, 2017 1 commit
-
-
Adam Barth authored
This patch introduces ScrollView, which is a convenience widget for using a SliverBlock. This patch also switches a number of tests from Block to ScrollView. Once we support more features of block (e.g., padding and shrinkwrapping), we'll be able to move over more clients.
-
- 20 Jan, 2017 1 commit
-
-
Adam Barth authored
This patch is part of a series to rationalize our text input classes. See #7031
-
- 19 Jan, 2017 1 commit
-
-
Adam Barth authored
This patch is the first of a series to rationalize the names of the text-input related widgets. See #7031
-
- 09 Jan, 2017 1 commit
-
-
Matt Perry authored
Fixes https://github.com/flutter/flutter/issues/7210
-
- 16 Dec, 2016 1 commit
-
-
Matt Perry authored
Callers can manually validate by calling validate(), or tell the Form to validate on every change by setting the `autovalidate` parameter. Fixes https://github.com/flutter/flutter/issues/7219
-
- 08 Nov, 2016 1 commit
-
-
Matt Perry authored
Fixes https://github.com/flutter/flutter/issues/6603
-
- 07 Nov, 2016 2 commits
-
-
Hans Muller authored
-
Ian Hickson authored
-
- 02 Nov, 2016 1 commit
-
-
Matt Perry authored
FormField is now a widget that can contain any type of field. Input no longer has special code to handle form fields. Instead, there is a helper widget InputFormField for using an Input inside a FormField. Fixes https://github.com/flutter/flutter/issues/6097 and based on feedback from the same.
-
- 19 Oct, 2016 2 commits
-
-
Adam Barth authored
This patch removes uses of keyboard.mojom in favor of the TextInputPlugin.
-
Matt Perry authored
They support multiline text now.
-
- 07 Oct, 2016 1 commit
-
-
Adam Barth authored
This patch adds `@checked` everywhere is needed to remove the `strong_mode_invalid_method_override` strong mode error.
-
- 21 Sep, 2016 2 commits
-
-
James Robinson authored
This rewrites imports of various mojom.dart files from the Flutter engine repo to instead import normal-looking dart files from the (new) flutter_services package. This package handles exporting the correct symbols from generated code wherever that may live. Includes an engine roll to 3551e7a48e2e336777b15c7637af92fd7605b6c5 which contains the new flutter_services package.
-
Lex Berezhny authored
Adds unit test to verify the initial value of Input widgets.
-
- 29 May, 2016 1 commit
-
-
Adam Barth authored
The new mojom.dart code makes mocking services a bit tricky. I've filed https://github.com/domokit/mojo/issues/786 about improving that.
-
- 16 May, 2016 1 commit
-
-
Ian Hickson authored
This makes it possible to substitute 'flutter run' for 'flutter test' and actually watch a test run on a device. For any test that depends on flutter_test: 1. Remove any import of 'package:test/test.dart'. 2. Replace `testWidgets('...', (WidgetTester tester) {` with `testWidgets('...', (WidgetTester tester) async {` 3. Add an "await" in front of calls to any of the following: * tap() * tapAt() * fling() * flingFrom() * scroll() * scrollAt() * pump() * pumpWidget() 4. Replace any calls to `tester.flushMicrotasks()` with calls to `await tester.idle()`. There's a guarding API that you can use, if you have particularly complicated tests, to get better error messages. Search for TestAsyncUtils.
-
- 29 Apr, 2016 1 commit
-
-
Ian Hickson authored
* Refactor widget test framework Instead of: ```dart test("Card Collection smoke test", () { testWidgets((WidgetTester tester) { ``` ...you now say: ```dart testWidgets("Card Collection smoke test", (WidgetTester tester) { ``` Instead of: ```dart expect(tester, hasWidget(find.text('hello'))); ``` ...you now say: ```dart expect(find.text('hello'), findsOneWidget); ``` Instead of the previous API (exists, widgets, widget, stateOf, elementOf, etc), you now have the following comprehensive API. All these are functions that take a Finder, except the all* properties. * `any()` - true if anything matches, c.f. `Iterable.any` * `allWidgets` - all the widgets in the tree * `widget()` - the one and only widget that matches the finder * `firstWidget()` - the first widget that matches the finder * `allElements` - all the elements in the tree * `element()` - the one and only element that matches the finder * `firstElement()` - the first element that matches the finder * `allStates` - all the `State`s in the tree * `state()` - the one and only state that matches the finder * `firstState()` - the first state that matches the finder * `allRenderObjects` - all the render objects in the tree * `renderObject()` - the one and only render object that matches the finder * `firstRenderObject()` - the first render object that matches the finder There's also `layers' which returns the list of current layers. `tap`, `fling`, getCenter, getSize, etc, take Finders, like the APIs above, and expect there to only be one matching widget. The finders are: * `find.text(String text)` * `find.widgetWithText(Type widgetType, String text)` * `find.byKey(Key key)` * `find.byType(Type type)` * `find.byElementType(Type type)` * `find.byConfig(Widget config)` * `find.byWidgetPredicate(WidgetPredicate predicate)` * `find.byElementPredicate(ElementPredicate predicate)` The matchers (for `expect`) are: * `findsNothing` * `findsWidgets` * `findsOneWidget` * `findsNWidgets(n)` * `isOnStage` * `isOffStage` * `isInCard` * `isNotInCard` Benchmarks now use benchmarkWidgets instead of testWidgets. Also, for those of you using mockers, `serviceMocker` now automatically handles the binding initialization. This patch also: * changes how tests are run so that we can more easily swap the logic out for a "real" mode instead of FakeAsync. * introduces CachingIterable. * changes how flutter_driver interacts with the widget tree to use the aforementioned new API rather than ElementTreeTester, which is gone. * removes ElementTreeTester. * changes the semantics of a test for scrollables because we couldn't convince ourselves that the old semantics made sense; it only worked before because flushing the microtasks after every event was broken. * fixes the flushing of microtasks after every event. * Reindent the tests * Fix review comments
-
- 22 Apr, 2016 1 commit
-
-
Ian Hickson authored
The old names were getting silly and started stepping on valuable namespace. The new names are consistent and clear.
-
- 14 Apr, 2016 1 commit
-
-
Yegor authored
-