- 14 Apr, 2017 1 commit
-
-
Adam Barth authored
There are more places we can use this annotation, but this patch just gets us started.
-
- 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.
-
- 01 Mar, 2017 1 commit
-
-
Mikkel Nygaard Ravn authored
New concepts: PlatformMessageChannel (basic message send/receive superseding some existing PlatformMessages methods), PlatformMethodChannel (method invocation and event streams), pluggable codecs for messages and method calls: unencoded binary, string, json, and 'standard' flutter binary encoding.
-
- 23 Feb, 2017 1 commit
-
-
Alexandre Ardhuin authored
-
- 21 Feb, 2017 1 commit
-
-
Alexandre Ardhuin authored
Fixes #7734
-
- 03 Feb, 2017 1 commit
-
-
Ian Hickson authored
...and fix bugs that the tests uncovered. WRITE TEST FIND BUG
-
- 20 Jan, 2017 1 commit
-
-
Adam Barth authored
This patch aligns the iteration patterns used by animations and ChangeNotifier. They now both respect re-entrant removal of listeners and coalesce duplication registrations. (Also, ChangeNotifier notification is no longer N^2). This patch introduces ObserverList to avoid the performance regression that the previous version of this patch caused. Fixes #7533
-
- 15 Dec, 2016 1 commit
-
-
Ian Hickson authored
Sometimes you have several listenables, but you want to hand them to an API (e.g. CustomPainter) that only expects one.
-
- 19 Nov, 2016 1 commit
-
-
Ian Hickson authored
-
- 15 Sep, 2016 1 commit
-
-
Adam Barth authored
Having this base class lets classes like CustomPainter and DataTableSource be more agnostic as to what's generating the repaints.
-
- 25 Jul, 2016 1 commit
-
-
Adam Barth authored
We'll use this field to adapt material widgets to iOS.
-
- 23 Jun, 2016 1 commit
-
-
Ian Hickson authored
-
- 16 Jun, 2016 1 commit
-
-
Ian Hickson authored
Overview ======== This patch refactors images to achieve the following goals: * it allows references to unresolved assets to be passed around (previously, almost every layer of the system had to know about whether an image came from an asset bundle or the network or elsewhere, and had to manually interact with the image cache). * it allows decorations to use the same API for declaring images as the widget tree. It requires some minor changes to call sites that use images, as discussed below. Widgets ------- Change this: ```dart child: new AssetImage( name: 'my_asset.png', ... ) ``` ...to this: ```dart child: new Image( image: new AssetImage('my_asset.png'), ... ) ``` Decorations ----------- Change this: ```dart child: new DecoratedBox( decoration: new BoxDecoration( backgroundImage: new BackgroundImage( image: DefaultAssetBundle.of(context).loadImage('my_asset.png'), ... ), ... ), child: ... ) ``` ...to this: ```dart child: new DecoratedBox( decoration: new BoxDecoration( backgroundImage: new BackgroundImage( image: new AssetImage('my_asset.png'), ... ), ... ), child: ... ) ``` DETAILED CHANGE LOG =================== The following APIs have been replaced in this patch: * The `AssetImage` and `NetworkImage` widgets have been split in two, with identically-named `ImageProvider` subclasses providing the image-loading logic, and a single `Image` widget providing all the widget tree logic. * `ImageResource` is now `ImageStream`. Rather than configuring it with a `Future<ImageInfo>`, you complete it with an `ImageStreamCompleter`. * `ImageCache.load` and `ImageCache.loadProvider` are replaced by `ImageCache.putIfAbsent`. The following APIs have changed in this patch: * `ImageCache` works in terms of arbitrary keys and caches `ImageStreamCompleter` objects using those keys. With the new model, you should never need to interact with the cache directly. * `Decoration` can now be `const`. The state has moved to the `BoxPainter` class. Instead of a list of listeners, there's now just a single callback and a `dispose()` method on the painter. The callback is passed in to the `createBoxPainter()` method. When invoked, you should repaint the painter. The following new APIs are introduced: * `AssetBundle.loadStructuredData`. * `SynchronousFuture`, a variant of `Future` that calls the `then` callback synchronously. This enables the asynchronous and synchronous (in-the-cache) code paths to look identical yet for the latter to avoid returning to the event loop mid-paint. * `ExactAssetImage`, a variant of `AssetImage` that doesn't do anything clever. * `ImageConfiguration`, a class that describes parameters that configure the `AssetImage` resolver. The following APIs are entirely removed by this patch: * `AssetBundle.loadImage` is gone. Use an `AssetImage` instead. * `AssetVendor` is gone. `AssetImage` handles everything `AssetVendor` used to handle. * `RawImageResource` and `AsyncImage` are gone. The following code-level changes are performed: * `Image`, which replaces `AsyncImage`, `NetworkImage`, `AssetImage`, and `RawResourceImage`, lives in `image.dart`. * `DecoratedBox` and `Container` live in their own file now, `container.dart` (they reference `image.dart`). DIRECTIONS FOR FUTURE RESEARCH ============================== * The `ImageConfiguration` fields are mostly aspirational. Right now only `devicePixelRatio` and `bundle` are implemented. `locale` isn't even plumbed through, it will require work on the localisation logic. * We should go through and make `BoxDecoration`, `AssetImage`, and `NetworkImage` objects `const` where possible. * This patch makes supporting animated GIFs much easier. * This patch makes it possible to create an abstract concept of an "Icon" that could be either an image or a font-based glyph (using `IconData` or similar). (see https://github.com/flutter/flutter/issues/4494) RELATED ISSUES ============== Fixes https://github.com/flutter/flutter/issues/4500 Fixes https://github.com/flutter/flutter/issues/4495 Obsoletes https://github.com/flutter/flutter/issues/4496
-
- 01 Jun, 2016 1 commit
-
-
Ian Hickson authored
This introduces the key parts of a paginated data table, not including the built-in pagination features. * Provide more data for the data table demo, so there's data to page. * Introduce a ChangeNotifier class which abstracts out addListener/removeListener/notifyListeners. We might be able to use this to simplify existing classes as well, though this patch doesn't do that. * Introduce DataTableSource, a delegate for getting data for data tables. This will also be used by ScrollingDataTable in due course. * Introduce PaginatedDataTable, a widget that wraps DataTable and only shows N rows at a time, fed by a DataTableSource.
-
- 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.
-
- 15 Apr, 2016 1 commit
-
-
Ian Hickson authored
We're getting back to the point where we have a bunch of foundation APIs and it's getting confusing having them mixed with services/.
-