- 25 May, 2016 1 commit
-
-
Adam Barth authored
For consistency. Fixes #4142
-
- 16 May, 2016 1 commit
-
-
Devon Carew authored
* send debug events for flutter lifecycle events * remove the route event
-
- 29 Apr, 2016 3 commits
-
-
Yegor authored
-
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
-
Yegor authored
-
- 28 Apr, 2016 1 commit
-
-
Ian Hickson authored
Apps that didn't use [WidgetsApp] were not sending the `'Widgets completed first useful frame'` notification. This fixes that by making the code cleaner.
-
- 25 Apr, 2016 1 commit
-
-
Adam Barth authored
Previously we were locking down the state even when calling layout in LazyBlock. Now we lock only when building children. Making this work well involved moving the catch out of lockState and into the few callers who actually wanted it. Fixes #3534
-
- 22 Apr, 2016 3 commits
-
-
Adam Barth authored
Prior to this patch, we were pushing two frames each time the cursor blinked. In turning the cursor on or off, the markNeedsPaint call was triggering another frame to be scheduled because we cleared a bit in the scheduler at the beginning of the frame instead of at the end of the frame. To implement scheduling correctly, we actually need two bits: one for ensureVisualUpdate, which just promises to get to the end of the pipeline soon, and scheduleFrame, which promises to get to the beginning of the pipeline soon. (Reland)
-
Ian Hickson authored
This adds in particular the ability to track the time at which the framework boots up, and the time at which we are confident we have completed the first useful frame.
-
Ian Hickson authored
The old names were getting silly and started stepping on valuable namespace. The new names are consistent and clear.
-
- 21 Apr, 2016 2 commits
-
-
Ian Hickson authored
Previously the widgets layer only provided a concrete binding, which makes it awkward to extend it compared to other bindings. This moves widgets to the same style as the other layers. In a subsequent patch I'll use this to make the tests layer saner.
-
Eric Seidel authored
This only works for apps which use WidgetsApp. Apps which don't (like the game) could presumably read the static themselves off of WidgetsApp. @devoncarew @hixie
-
- 19 Apr, 2016 1 commit
-
-
Ian Hickson authored
Bindings now have a debugRegisterServiceExtensions() method that is invoked in debug mode (only). (Once we have a profile mode, there'll be a registerProfileServiceExtensions() method that gets called in that mode only to register extensions that apply then.) The BindingBase class provides convenience methods for registering service extensions that do the equivalent of: ```dart void extension() { ... } bool extension([bool enabled]) { ... } double extension([double extension]) { ... } Map<String, String> extension([Map<String, String> parameters]) { ... } ``` The BindingBase class also itself registers ext.flutter.reassemble, which it has call a function on the binding called reassembleApplication(). The Scheduler binding now exposes the preexisting ext.flutter.timeDilation. The Renderer binding now exposes the preexisting ext.flutter.debugPaint. The Renderer binding hooks reassembleApplication to trigger the rendering tree to be reprocessed (in particular, to fix up the optimisation closures). All the logic from rendering/debug.dart about service extensions is replaced by the above. I moved basic_types to foundation. The FlutterWidgets binding hooks reassembleApplication to trigger the widget tree to be entirely rebuilt. Flutter Driver now uses ext.flutter.driver instead of ext.flutter_driver, and is hooked using the same binding mechanism. Eventually we'll probably move the logic into the Flutter library so that you just get it without having to invoke a special method first.
-
- 02 Apr, 2016 1 commit
-
-
Ian Hickson authored
- Create a FlutterErrorDetails struct-like class that describes an exception along with more details that aren't in the exception, like where it was caught and what was going on when it was caught. - Provide a FlutterError static API for handling these objects: - FlutterError.onError which is called whenever Flutter catches an error. - FlutterError.reportError() which handles an error. - FlutterError.dumpErrorToConsole() which is the default behavior for onError. - Removes all the existing exception handler callbacks. - Replaces all the existing places that described exceptions using debugPrint with calls to FlutterError.reportError(). - Extend lockState() to also catch exceptions, so that we catch exceptions that happen during finalizers. - Make the test framework catch errors and treat them as failures. - Provide a mechanism to override this behavior in the test framework. - Make the tests that used to depend on the exception handler callbacks use this new mechanism. - Make pump() also support the phase argument. - Improve some tests using these new features. Fixes #2356, #2988, #2985, #2220.
-
- 31 Mar, 2016 1 commit
-
-
Kris Giesing authored
Adds BuildOwner to manage the dirty list and build processing for widgets/elements, and adds a widget unit test to make sure separation is enforced. Fixes #2723
-
- 18 Mar, 2016 1 commit
-
-
Adam Barth authored
This patch adds a consistent, simple description for the common pattern of having a single child widget.
-
- 14 Mar, 2016 1 commit
-
-
Hixie authored
-
- 12 Mar, 2016 3 commits
-
-
Hixie authored
And fix the zillion issues that uncovered.
-
Ian Hickson authored
This reverts commit f41b3411, reversing changes made to e33d8d96. This was a bad check-in due to my mangling uploading a new version of the branch from a different machine. This reverts https://github.com/flutter/flutter/pull/2639 and will be replaced by https://github.com/flutter/flutter/pull/2640
-
Hixie authored
And fix the zillion issues that uncovered.
-
- 11 Mar, 2016 1 commit
-
-
Adam Barth authored
We'll need this for RTL support because the RTL state will live in the widget tree. Also, remove the `oldWidget` argument to updateRenderObject because there aren't any clients for it.
-
- 10 Mar, 2016 1 commit
-
-
Hixie authored
And fix a zillion omissions this uncovered.
-
- 04 Mar, 2016 2 commits
-
-
Adam Barth authored
Putting this code in a separate library let's services that depend only on the shell be clearer about their dependencies.
-
Kris Giesing authored
Fixes #2198
-
- 11 Feb, 2016 1 commit
-
-
Ian Hickson authored
Each layer is supposed to reexport the parts of the previous layer that are part of its API. - In painting.dart, export from dart:ui all the Canvas-related APIs that make sense to be used at higher levels, e.g. PaintingStyle. - Delete painting/shadows.dart. It was dead code. - In rendering/object.dart, export all of painting.dart. - In widgets/basic.dart, export all of painting.dart and animation.dart. Some classes in animation/ are renamed to make this less disruptive and confusing to the namespace. - Split out Stocks back into an import model rather than a part model, so that it's easier to manage its dependencies on a per-file basis. - Move Ticker to scheduler library. - Remove as many redundant imports as possible now. - Some minor nit picking cleanup in various files.
-
- 01 Feb, 2016 1 commit
-
-
Hixie authored
-
- 24 Jan, 2016 1 commit
-
-
Ian Hickson authored
...instead of a deep walk.
-
- 22 Jan, 2016 2 commits
- 07 Jan, 2016 1 commit
-
-
Adam Barth authored
Previously MaterialApp was responsible for ending the activity when the back stack was empty. However, this behavior is more general than material. This patch moves the behavior to FlutterWidgetBinding, which has a global view of all the binding observers. Fixes #1086
-
- 16 Dec, 2015 1 commit
-
-
Jason Simmons authored
-
- 14 Dec, 2015 2 commits
-
-
Ian Hickson authored
-
Ian Hickson authored
-
- 09 Dec, 2015 2 commits
-
-
Adam Barth authored
-
Adam Barth authored
-
- 08 Dec, 2015 1 commit
-
-
Adam Barth authored
After this patch, if you try to use a widget that depends on being enclosed in a material, you now get an assert and a debugPrint if you're not inside a material. Fixes #243
-
- 02 Dec, 2015 1 commit
-
-
Florian Loitsch authored
-
- 18 Nov, 2015 1 commit
-
-
Adam Barth authored
This change will let us remove the tracing interface from dart:ui and also makes these timeline events show up in Observatory.
-
- 06 Nov, 2015 1 commit
-
-
Adam Barth authored
Inside runApp, we were building the render tree for the app, but we weren't calling layout, which meant we were running a hit test on a dirty tree. Now hitTest specifically asserts that the tree is clean and we synchronously call layout for your app during runApp. Fixes #1960
-
- 22 Oct, 2015 1 commit
-
-
Hixie authored
-