114 Commits

Author SHA1 Message Date
Alexander Aprelev
a7d954eb31
Add TODOs to remove lint ignore directives. (#21170)
This is follow-up to https://github.com/flutter/flutter/pull/21143.
2018-08-29 10:25:19 -07:00
Alexander Aprelev
abc17236f7
Roll engine to f3ff83a5db71262d240aa5337a2a9a22c73c4749. (dart roll). (#21143)
* Roll engine to 56139397e6ae1257bdabd1ef79ff7aca96c67d4.6

Changes since last roll:
```
56139397e Roll src/third_party/skia 7ba1d64f0706..5f0726b01019 (12 commits) (#6104)
47a1ce0e6 Allow embedders to set the root surface transformation. (#6085)
```

* Roll engine to f3ff83a5db71262d240aa5337a2a9a22c73c4749. (dart roll).

* Add const

* Add ignore analyzer prefer_const_constructors_in_immutables
2018-08-28 21:30:36 -07:00
Ian Hickson
94f9604a96
Cleanup (#20754)
- remove an //ignore that is no longer needed
- fix some intrinsic methods that used the API incorrectly (shouldn't affect correctness but should make things a tiny bit more efficient)
- add some asserts to help track down bugs quicker
- update a TODO to point to the currently relevant bug
- fix some indenting
- improve the naming of some privates to improve readability
2018-08-21 14:02:48 -07:00
xster
ede7c15a2f
Add doc describing sliver children's lifecycle and persistence options (#19795) 2018-08-15 17:24:32 -07:00
Hans Muller
7ac183794b
Deferred ListView.separator cleanups (#18720) 2018-07-06 15:21:29 -07:00
Hans Muller
bec912165a
Added ListView.separated() constructor (#18619) 2018-06-21 16:04:16 -07:00
xster
210e2fa333
Fix ListView dartdoc where a paragraph doesn't flow with the section heading and the other paragraphs in the section (#18430) 2018-06-13 12:37:51 -07:00
Alexandre Ardhuin
09276bea25
enable lint prefer_equal_for_default_values (#18156) 2018-06-05 08:50:40 +02:00
Michael Goderbauer
7984f6e043
Implicit a11y scrolling for iOS (and caching in Viewports) (#17021) 2018-05-04 10:48:06 -07:00
Konstantin Scheglov
9fe53b0d2b
Export @required from src/widgets/framework.dart (#17208) 2018-05-03 08:50:40 -07:00
Alexandre Ardhuin
cc1cf9e12a
apply upcomming lint avoid_renaming_method_parameters (#15526) 2018-03-20 12:53:41 +01:00
Ian Hickson
3ac9449ad4
Fix the confusing-zero case with NestedScrollView. (#14133)
* Fix the confusing-zero case with NestedScrollView.

* Update mock_canvas.dart

* Update tabs_demo.dart

* more tweaks
2018-01-18 20:21:15 -08:00
xster
ecf5041807
Let translucent Cupertino bars have its scaffold children automatically pad their heights - second try (#13440)
* Let translucent Cupertino bars have its scaffold children automatically pad their heights (#13194)

* Let lists automatically add sliver padding from media query. Translucent nav and tab bars leave behind media query paddings in scaffolds.

* tests

* const lint

* Rename base abstract class to generalized ObstructingPreferredSizeWidget

* review

* More docs and comments from #13317
2017-12-08 09:00:20 -08:00
xster
2d6f268df6 Revert "Let translucent Cupertino bars have its scaffold children automatically pad their heights (#13194)" (#13317)
This reverts commit 5c4ffa13a6c4f00ea6f752866e9393ee6395d469.
2017-12-01 21:18:36 -08:00
xster
5c4ffa13a6
Let translucent Cupertino bars have its scaffold children automatically pad their heights (#13194)
* Let lists automatically add sliver padding from media query. Translucent nav and tab bars leave behind media query paddings in scaffolds.

* tests

* const lint

* Rename base abstract class to generalized ObstructingPreferredSizeWidget
2017-11-30 13:55:30 -08:00
Greg Spencer
0259be90b8
Fix spelling errors in all the dartdocs. (#13061)
I got tired of drive-by spelling fixes, so I figured I'd just take care of them all at once.

This only corrects errors in the dartdocs, not regular comments, and I skipped any sample code in the dartdocs. It doesn't touch any identifiers in the dartdocs either. No code changes, just comments.
2017-11-17 10:05:21 -08:00
Yegor
19227a9988
fix miscellaneous typos in dartdocs (#12801)
* fix miscellaneous typos in dartdocs

* moar typos
2017-10-31 09:17:16 -07:00
Adam Barth
a30b109c9e Add RTL support to ListBody (#12414)
Fixes #11930
2017-10-05 09:45:41 -07:00
Adam Barth
2b126bcd0d Add Alignment, which will replace FractionalOffset (#12342)
Unlike FractionalOffset, Alignment uses the center as the zero of the
coordinate system, which makes the RTL math work out much cleaner.

Also, make FractionalOffset into a subclass of Alignment so that clients
can continue to use FractionalOffset.
2017-10-01 23:06:18 -07:00
Ian Hickson
78a29260ff Some more tests for AnimatedPositionedDirectional and more debugging checks (#12231) 2017-09-24 00:29:21 -07:00
xster
038981bed9 Mini doc addition to mention that slivers must be filled with RenderSlivers (#11972) 2017-09-07 10:56:17 -07:00
Adam Barth
8eb6ad2776 Add RTL support to GridView (#11921)
Fixes #11855
2017-09-05 11:29:20 -07:00
Adam Barth
15bf91fb3d Add RTL support to scrolling (#11842)
This patch includes:

 * SliverPadding
 * ScrollView
 * PageView

Fixes #11764
Fixes #11836
2017-08-31 09:55:42 -07: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
Ian Hickson
6655074b37 Fix documentation based on dartdoc's warnings (#11428) 2017-07-28 15:44:38 -07:00
Jacob Richman
9f510ebdc9 Refactor RenderObject.toStringDeep and Widget.toStringDeep code to use DiagnosticsNode (#11359)
Refactor RenderObject.toStringDeep and Widget.toStringDeep code to use DiagnosticsNode.
2017-07-25 09:25:13 -07:00
Ian Hickson
8f56f6fdd1 Add documentation and clean up code. (#11330)
Mainly, this adds documentation to members that were previously
lacking documentation.

It also adds a big block of documentation about improving performance
of widgets.

This also removes some references to package:collection and adds
global setEquals and listEquals methods in foundation that we can use.
(setEquals in particular should be much faster than the
package:collection equivalent, though both should be faster as they
avoid allocating new objects.) All remaining references now qualify
the import so we know what our remaining dependencies are.

Also lots of code reordering in Flutter driver to make the code
consistent and apply the style guide more thoroughly.
2017-07-21 16:39:04 -07:00
Ian Hickson
7ba1879bfc Automatic silver keep alive (#11067)
* AutomaticKeepAlive

A Widget that listens for notifications from widgets that don't want to die.

* Automatically wrap SliverList and SliverGrid children in AutomaticKeepAlive widgets

* Fixes for review comments
2017-07-01 14:16:36 -07:00
Ian Hickson
5279563071 Keep-alive for widgets in lazy lists (#11010) 2017-06-28 14:06:40 -07:00
Ian Hickson
dbb734ddb5 More documentation. (#10953)
Applies comments I missed from https://github.com/flutter/flutter/pull/10904.
2017-06-26 12:05:49 -07:00
Ian Hickson
df1a01b3b3 Add documentation. Also, add constructors to SliverGrid. (#10904) 2017-06-23 14:36:58 -07:00
Ian Hickson
ba520e7078 Some clarifications for ListView constructors (#10907) 2017-06-23 14:06:18 -07:00
Alexandre Ardhuin
e3bab988ce preview of prefer_asserts_in_initializer_list lint (#10441)
* preview of prefer_asserts_in_initializer_list lint

* fix issue
2017-06-02 13:15:49 +02:00
Ian Hickson
f50caddfbd Much work on the documentation (#10331)
Minor fixes throughout, e.g. removing trailing commas from the end of sample code expressions, changing headings to "sample code" more consistently, removing stale todos, fix typos in a private method name, minor grammar fixes, added some clarifications to CircularProgressIndicator, LinearProgressIndicator, CrossAxisAlignment, added some cross-references to various members, made it slightly clearer that layout algorithms are implementation details.

Clarified "elevation" throughout.

Added docs to InkResponse and InkWell.

Added sample code for: SliverAppBar, Card, ListTile, EdgeInsets, Row, Column, CustomScrollView, ListView, SliverFixedExtentList, and SliverGrid.

Fixes #10317.
Fixes #10316.
Fixes #10267. (sort of, see comment therein)
Fixes #9331. (sort of, see comment therein)
Fixes #9407. (sort of, see comment therein)
2017-05-26 17:15:09 -07:00
Ian Hickson
c7469e005d Fix many dartdoc typos (#9822) 2017-05-04 19:54:06 -07:00
Ian Hickson
89856c0e5b Adjust the defaults behaviour of scroll views. (#9679)
* Adjust the defaults behaviour of scroll views.

Now, primary scroll views scroll by default. Others only scroll if necessary.

* apply suggested changes
2017-05-02 09:14:50 -07:00
Adam Barth
c288c7064f Refactor scrolling code to prepare for nested scrolling (#9575)
This patch reworks some of the guts of scrolling to make it easier to
implement nested scrolling effects. The actually nested scrolling effect
will be included in a later patch.
2017-04-24 23:32:55 -07:00
Adam Barth
a57018a4bb Add GridView.builder (#9522)
This constructor makes it easier to use a GridView with a builder
callback.

Fixes #8952
2017-04-21 14:09:53 -07:00
Adam Barth
af170c8e56 Add more dartdocs (#9183)
Mostly related to semantics and scrolling.
2017-04-04 22:41:24 -07:00
Adam Barth
830d163c21 Add more dartdocs for slivers (#9164)
This patch adds docs for many of the sliver widgets.
2017-04-03 22:47:02 -07:00
xster
bc7801bf8e Remove imports of meta (#9081) 2017-03-29 10:59:18 -07:00
Adam Barth
6e20d62b9e Add dartdocs to scroll_view.dart (#8846) 2017-03-17 13:26:40 -07:00
Alexandre Ardhuin
a0769f2488 apply the upcoming rule unnecessary_this (#8838) 2017-03-17 08:05:42 +01:00
Adam Barth
fd51093146 Rename SliverPadding.child to SliverPadding.sliver (#8757)
The new name follows the pattern of the name suggesting which layout
protocol the parent expects the child to speak.

Fixes #8664
2017-03-14 14:07:13 -07:00
Chris Bracken
8916b101f3 Avoid potential ConcurrentModificationError (#8534)
Also make locals final where possible.

Followup to 527154679466940189a86e24378c2fa4e5db04a3.
2017-03-02 11:28:30 -08:00
Chris Bracken
5271546794 Better defaulting for scroll view primary-ness (#8506)
* Improved defaults for scroll view primary-ness

* Vertical scroll views default to primary:true.
* Horizontal scroll views default to primary:false.
* If a scroll view is primary and it got a non-null inherited primary
  scroll controller, it introduces a primary scroll controller inherited
  with a value of null for its descendants.

ScrollController now multiplexes writes to all registered positions;
reads of position continue to assert that only one position is
registered. Reads still require a single position.
2017-03-01 16:13:09 -08:00
Chris Bracken
6491cbf7a3 Ensure PrimaryScrollController is returned when primary: true (#8440)
Also a small formatting fix.
2017-02-27 17:17:29 -08:00
Adam Barth
e0b12ca17e Two becomes one (#8253)
Rename all the "2" classes related to scrolling to remove the "2". Now that the
old scrolling code is gone, we don't need to use the suffix.
2017-02-17 14:06:15 -08:00
Ian Hickson
83a4cf269f Port AppBar to Scrollable2 (#7996)
Move the back button and drawer opening logic into the app bar.

Move the tap-status-bar-to-scroll-to-top logic to using
ScrollControllers. Provide a PrimaryScrollController and a `primary`
flag on scroll views.

Make it possible to track when a route becomes or stops being poppable.
2017-02-08 18:16:19 -08:00
Adam Barth
2eb4f2c37a Add PageController (#7948)
This patch improves PageView to the point where we can use it in the date
picker. Specifically, you now get onPageChanged notifications and you can
control which page is visible using a PageController.
2017-02-07 15:51:41 -08:00