12 Commits

Author SHA1 Message Date
Alexandre Ardhuin
dfbd585668 implicit-casts:false in flutter/test (#46245) 2019-12-16 15:03:02 -08:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Dan Field
fe9512fa72
Re-enable const (#31600)
* Re-enable const
2019-04-29 16:02:42 -07:00
Alexandre Ardhuin
387f885481
Add missing trailing commas (#28673)
* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
2019-03-01 08:17:55 +01:00
Alexandre Ardhuin
0fb84e96c7
Prefer void to null (#22977)
* Future<void> main

* Future<void>.delayed

* prefer_void_to_Null

* address review comments
2018-10-16 22:03:06 +02:00
Alexandre Ardhuin
d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Adam Barth
c46347b6df Add RTL support to Stack (#11973)
Notice that the default alignment for Stack needs to know the
directionality.
2017-09-07 22:52:36 -07:00
Ian Hickson
14e728d01d Support chaining await calls on controllers (#9389)
With this patch, you can do:

```dart
   Future<Null> foo() async {
     try {
       await controller.forward().orCancel;
       await controller.reverse().orCancel;
       await controller.forward().orCancel;
     } on TickerCanceled {
       // did not complete
     }
   }
```

...in a State's async method, and so long as you dispose of the
controller properly in your dispose, you'll have a nice way of doing
animations in sequence without leaking the controller. try/finally
works as well, if you need to allocate resources and discard them when
canceled.

Simultaneously, you can do:

```dart
   Future<Null> foo() async {
     await controller.forward().orCancel;
     await controller.reverse().orCancel;
     await controller.forward().orCancel;
   }
```

...and have the same effect, where the method will just silently hang
(and get GC'ed) if the widget is disposed, without leaking anything,
if you don't need to catch the controller being killed.

And all this, without spurious errors for uncaught exceptions on
controllers.
2017-04-14 18:27:31 -07:00
Chris Bracken
46291903e0 Declare locals final where not reassigned (tests) (#8566) 2017-03-03 17:43:22 -08:00
Alexandre Ardhuin
2888139c6b prefer const constructor (#8292) 2017-02-20 14:07:16 -08:00
Ian Hickson
8ecaff2906 Positioned.fromRelativeRect (#8123)
Since RelativeRect's whole purpose in life is to make work with Stack
easier, it's silly that you can't directly use it with Positioned.

Also, tests for RelativeRect.
And fixes for the bugs that found...
2017-02-14 14:34:33 -08:00
Ian Hickson
57be959887 Rename test/widget to test/widgets to match the library (#6716) 2016-11-07 10:03:11 -08:00