74 Commits

Author SHA1 Message Date
Alexandre Ardhuin
2958d7d0fc use bool in assert (#12170) 2017-09-21 09:33:01 +02:00
Jacob Richman
93a98327a8 Add Diagnosticable base class and add documentation. (#11458)
Add Diagnosticable base class and documentation
2017-08-03 09:49:44 -07:00
Jacob Richman
595cd23c8c Change all occurrences of '$runtimeType#$hashCode' to use the describeIdentity (#10888)
* Revert "Revert "Change all ocurrences of '$runtimeType#$hashCode' to use the idAndType method. (#10871)" (#10880)"

This reverts commit ceb814aa647ecd310794a72a7a5c28820ec57a25.
2017-06-21 10:47:06 -07:00
Jacob Richman
ceb814aa64 Revert "Change all ocurrences of '$runtimeType#$hashCode' to use the idAndType method. (#10871)" (#10880)
This reverts commit d46e208b98d4af93d7029c3e806d443dd51fd116.
2017-06-20 22:14:59 -07:00
Jacob Richman
d46e208b98 Change all ocurrences of '$runtimeType#$hashCode' to use the idAndType method. (#10871)
* Change all instances of '$runtimeType#$hashCode' to use the describeIdentity method.

The describeIdentity method generates a shorter description with a consistent length
consisting of the runtime type and the a 5 hex character long truncated
version of the hash code.
2017-06-20 18:13:28 -07:00
Ian Hickson
0f1a703a6b More documentation (#10589) 2017-06-08 17:13:03 -07:00
Ian Hickson
f9d24f652b More docs. (#10214) 2017-05-23 19:19:00 -07:00
xster
8aacc288ce Simplify change notifier toString and handle nulls (#9368) 2017-04-12 23:09:40 -07:00
Ian Hickson
2f4835429b Better toStrings for Listenable subclasses (#9244) 2017-04-05 22:46:36 -07:00
Adam Barth
ae8994860e Rationalize text input widgets (#9119)
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
2017-04-01 17:30:21 -07:00
xster
1a87e8182a Change foundation references in foundation to meta (#9107)
* Change foundation references to meta

* Remove specified shows
2017-03-30 18:19:00 -07:00
xster
bc7801bf8e Remove imports of meta (#9081) 2017-03-29 10:59:18 -07:00
Hans Muller
44dbecc6be Animation Demo performance tweaks (#8586) 2017-03-06 11:06:05 -08:00
Adam Barth
9a83659d78 Add ValueNotifier (#8463)
It's common to have a ChangeNotifier that wraps a single value. This class
makes that easy by providing a generic implementation.
2017-02-28 11:25:23 -08:00
Ian Hickson
e8c9797d1a Various documentation fixes. (#7726)
Fixes for: https://github.com/flutter/flutter/issues/7570 https://github.com/flutter/flutter/issues/7231 https://github.com/flutter/flutter/issues/2841 and others
2017-01-29 22:39:15 -08:00
Adam Barth
0f1d97756d Strengthen animation listener iteration patterns (#7566)
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
2017-01-20 15:38:53 -08:00
Adam Barth
aa82b741e2 Revert "Strengthen animation listener iteration patterns" (#7552) 2017-01-19 14:36:25 -08:00
Adam Barth
3312af7da5 Strengthen animation listener iteration patterns (#7537)
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).

Fixes #7533
2017-01-18 22:17:13 -08:00
Ian Hickson
9ece6daff6 Add more asserts and docs to ChangeNotifier. (#7513)
It took me a while to figure out what was going on (I was removing a
listener after disposal). These asserts helped.
2017-01-17 14:17:00 -08:00
Ian Hickson
b2c244efe8 Allow nulls in Listenable.merge (#7355)
This lets you use `Listenable.merge` without having to sanitize your
incoming list of change notifiers, in case your semantics are that
they are optional.
2017-01-05 13:10:30 -08:00
Ian Hickson
977a25f29c Listenable.merge (#7256)
Sometimes you have several listenables, but you want to hand them to an
API (e.g. CustomPainter) that only expects one.
2016-12-15 13:54:53 -08:00
Adam Barth
058620007b Extract a Listenable base class from Animation and ChangeNotifier (#5889)
Having this base class lets classes like CustomPainter and DataTableSource be
more agnostic as to what's generating the repaints.
2016-09-15 13:13:51 -07:00
Adam Barth
b00efda7fc Improve change notifier (#4747)
This patch improves some subtle behaviors about the change notifier.
2016-06-24 15:53:48 -07:00
Ian Hickson
0618da7ca2 PaginatedDataTable (part 1) (#4306)
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.
2016-06-01 16:13:40 -07:00