This fix isn't completely statisfying because it has a scaling limit. The ideal
fix would actually viewport the tiles in the grid. However, this fix is much
easier at the moment.
Fixes#4395
Although beautiful, having a continuous animation on the front page of the
gallery gives the impression that Flutter burns battery and makes phones hot.
This patch replaces the animation with solid purple. However, we might
eventually want to use a static image.
This demo burns battery continuously even when there's no change to the visual
appearance. This patch removes this demo to avoid giving the impression that
Flutter burns battery.
Related to #4120
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.
Looks like our intent here was to show the tab label rather than
"Instance of '_Page'".
Also, fix an issue where the scrollableKey wasn't being forwarded to the
actual scrollable.
Fixes#3090
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.
This reverts commit 55f9145ef4.
Turns out that this commit breaks apps that use the material library,
because of the _errorTextStyle DefaultTextStyle which has inherit:true.
Just setting it to false doesn't work, unfortunately, because then you
hit some sort of issue with merging that text style with others that
have inherit:true.
To make it clear that this constructor requires an explicit style. Also
throw a descriptive error recommending the inherit constructor for
styles with the inherit bit set.
Fixes#3842
It's safe to remove the unneeded `void`s from setters since the blocking issues in the
`always_declare_return_types` lint have been fixed (https://github.com/dart-lang/linter/). We can also safely flip the bit on `avoid_return_types_on_setters`.