Commit Graph

10 Commits

Author SHA1 Message Date
pq
e54196d7fc Turn on avoid_return_types_on_setters and cleanup annotated setters.
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`.
2016-05-12 11:45:30 -07:00
Adam Barth
ee903af03f Move TextAlign out of TextStyle (#3789)
TextAlign applies to a whole paragraph instead of applying to an individual
text span. This patch moves the property out of TextStyle and into a separate
property on Text and RichText.
2016-05-06 17:33:27 -07:00
Adam Barth
e41120bc68 Improve the TextPainter API (#3621)
Instead of using properties, TextPainter now receives min and max width as
parameters to layout. Also, this patch integrates the intrinsic sizing logic
into the main layout function, which satisfies all the existing uses cases.
2016-04-28 20:44:52 -07:00
Hixie
797e27edd3 Add @override annotations to flutter framework 2016-03-14 14:02:26 -07:00
Hixie
c7339de6bc Enable always_declare_return_types lint
And fix a zillion omissions this uncovered.
2016-03-09 17:57:39 -08:00
Adam Barth
fb4dbf4584 Improve TextSpan
Now we just have one TextSpan class that handles both simple strings, trees of
children, and styling both. This approach simplifies the interface for most
clients.

This patch also removes StyledText, which was weakly typed and tricky to use
correctly. The replacement is RichText, which is strongly typed and uses
TextSpan.
2016-02-24 14:07:10 -08:00
Adam Barth
abf0359569 Remove PaintingCanvas
We can just use Canvas now.  The two are the same thing.
2015-12-04 20:26:08 -08:00
Adam Barth
69a0689a33 Right-aligned text paints offscreen sometimes
We were assuming that the text extended from 0.0 to its max content width.
That's not correct for right-aligned text. Instead, we need to layout the text
again at the width we want it to occupy.
2015-10-26 15:49:47 -07:00
Hixie
a6c473ea95 Strong modeify the examples
This makes skyanalyzer also check the examples, and fixes everything it
found there.
2015-10-23 18:13:25 -07:00
Adam Barth
a88a85e695 Rename skysprites to flutter_sprites 2015-10-13 16:34:01 -07:00