38 Commits

Author SHA1 Message Date
Michael Goderbauer
807bb29888
enable prefer_function_declarations_over_variables lint (#77398) 2021-03-05 18:29:04 -08:00
Greg Spencer
fa3d2e2116
Remove nullOk parameter from Focus.of, FocusTraversalOrder.of, and FocusTraversalGroup.of (#68917)
This removes the nullOk parameter from Focus.of, FocusTraversalOrder.of and FocusTraversalGroup.of, and creates maybeOf equivalents for each. The of methods now return non-nullable values, and the maybeOf equivalents return nullable values.
2020-10-29 14:02:09 -07:00
Darren Austin
ca065f6456
Migrate more Material framework tests to null safety. (#67790)
* Migrate more Material framework tests to null safety.
2020-10-13 16:48:41 -07:00
TheBirb
a1097d70ed
Added tests (#62635) 2020-08-19 22:31:05 -07:00
Hans Muller
f3b1e31c1e
Remove old button references from the Stepper widget (#63012) 2020-08-05 19:41:41 -07:00
Jimmy Wei
14dcbb2d84
Fix overflow issue caused by a long title/subtitle for the vertical stepper (#61623) 2020-07-17 14:21:03 -07:00
Alexandre Ardhuin
4d7525f05c
Opt out nnbd in packages/flutter (#59186)
* add language version 2.8 in packages/flutter

* enable non-nullable analyzer flag
2020-06-11 14:11:30 +02:00
Michael Goderbauer
bc5ea0a05a
Reland "Do not rebuild Routes when a new opaque Route is pushed on top" (#49376) 2020-01-27 23:56:41 -08:00
Maurice Parrish
52c665d23f
Revert "Do not rebuild Routes when a new opaque Route is pushed on top (#48900)" (#49366)
This reverts commit 8eecdbe823ea09dd723a8af34c7c275e5536d728.
2020-01-23 11:32:04 -08:00
Michael Goderbauer
8eecdbe823
Do not rebuild Routes when a new opaque Route is pushed on top (#48900) 2020-01-21 16:24:17 -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
Greg Spencer
0028887a69
Don't allow Disabled InkWells to be focusable (#43848)
Makes sure that disabled InkWell/InkResponse and widgets that use them don't allow themselves to be focused.

ListTile, PopupMenu, and Stepper were not setting canRequestFocus properly on the InkWell, and InkWell was allowing focus even if it was disabled (it was basically just relying on the containing widget to set canRequestFocus properly). Now InkWell must both be enabled (have an onTap or similar) and have canRequestFocus set to true.
2019-10-31 12:58:14 -07:00
Albertus Angga Raharja
b31ca1aaca
Add more structure to errors (continuation of #34684) (#42640)
* Add structured errors in Animations, TabView, ChangeNotifier

* Add structured error on MaterialPageRoute, BoxBorder, DecorationImagePainter, TextSpan

* Add structured errors in Debug

* Fix test errors

* Add structured errors in Scaffold and Stepper

* Add structured errors in part of Rendering Layer

* Fix failing test due to FloatingPoint precision

* Fix failing tests due to precision error and not using final

* Fix failing test due to floating precision error with RegEx instead

* Add structured error in CustomLayout and increase test coverage

* Add structured error & its test in ListBody

* Add structured error in ProxyBox and increase test coverage

* Add structured error message in Viewport

* Fix styles and add more assertions on ErrorHint and DiagnosticProperty

* Add structured error in scheduler/binding and scheduler/ticker

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in AssetBundle and TextInput

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured errors in several widgets #1

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove unused import

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add assertions on hint messages

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix catch spacing

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in several widgets part 2 and increase code coverage

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in flutter_test/widget_tester

* Fix floating precision accuracy by using RegExp

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove todo to add tests in Scaffold showBottomSheet

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix reviews by indenting lines and fixing the assertion orders

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix failing tests due to renaming class

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Try skipping the NetworkBundleTest

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove leading space in material/debug error hint

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>
2019-10-28 11:00:49 -07:00
Alexandre Ardhuin
e9965f5636
add missing trailing commas in packages/flutter (#41076) 2019-09-24 08:05:41 +02:00
chunhtai
a76e39f984
Rendering errors with root causes in the widget layer should have a reference to the widget (#32511) 2019-07-09 10:18:30 -07:00
Jacob Richman
38f849015c
Add more structure to errors messages. (#34684)
Breaking change to extremely rarely used ParentDataWidget.debugDescribeInvalidAncestorChain api changing the return type of the method from String to DiagnosticsNode.
2019-06-20 10:56:03 -07:00
Alexandre Ardhuin
5169ab5974
format parameter list (#27261) 2019-02-21 09:27:07 +01:00
Jake Gough
dfce0a7f0b Added 'physics' prop to Stepper. (#26297)
* Update stepper.dart

Added 'physics' prop which allows the developer to assign the Stepper's scroll view's 'ScrollPhysics' which can solve with unwanted scrolling behaviour if the parent is also a scroll view. Defaults to 'AlwaysScrollableScrollPhysics' if null.

* Update stepper.dart

Removed unnecessary import and defaulting to 'AlwaysScrollableScrollPhysics' if physics prop is null.

* Update stepper.dart

Ran through format to remove unwanted whitespace which Analysis isn't happy about.

* Update stepper.dart

Tried reformatting again.

* Update stepper.dart

Tried reformatting again.

* Update stepper.dart

Formatting again why do you hate me github editor.

* Update stepper.dart

* Update stepper.dart

if this format doesn't work i'll cry

* Update stepper_test.dart

Added Stepper scroll tests. One that fails to find Text after Stepper if physics left as null and one that succeeds if physics set to `ClampingScrollPhysics()`

* Update stepper_test.dart

Added const constructors

* Update stepper_test.dart

trying to get rid of whitespace again

* Update stepper_test.dart

* Update stepper_test.dart

why whitespace why

* Update stepper_test.dart

* Update stepper_test.dart

* Update stepper_test.dart

* Update stepper_test.dart

Swapped to `findsNothing` because I'm an idiot.

* Update stepper_test.dart

* Update stepper.dart
2019-02-12 14:02:36 -08:00
jslavitz
60de2deb4d
Adds custom control builder functionality to Stepper (#23310)
* Adds test and builder
2018-10-25 10:59:14 -07: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
Ian Hickson
88c94f57c7
Remove unnecessary consts (#21410) 2018-09-04 17:05:30 -07:00
Marcin Szałek
1658fd9412 Added size to stepper icons (#19313)
* Added size to stepper icons

* Added Stepper icons size test
2018-09-04 16:51:39 -07:00
Alexandre Ardhuin
eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00
Todd Volkert
00aac68e2d
Revert flutter/flutter#19592 (#19861)
It was causing problems rolling Flutter into Fuchsia
2018-07-27 08:44:39 -07:00
Alexandre Ardhuin
27018359d2
re-enable lint unnecessary_const (#19592)
* re-enable lint unnecessary_const

* remove trailling whitespaces

* remove unnecessary const (after merge)
2018-07-23 08:31:48 +02:00
Ian Hickson
f630f90d6d
Revert "enable lint unnecessary_const (#19342)" (#19423)
This reverts commit cc1cf13eec6752af992d3db0265cf04cc90bfd13.
2018-07-16 13:30:27 -07:00
Alexandre Ardhuin
cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02:00
Alexandre Ardhuin
0fe1e5bf5b
apply upcoming lint prefer_const_literals_to_create_immutables (#14029) 2018-01-11 08:38:55 +01:00
Ian Hickson
f235a2c104 RTL: Padding, Flex (#11709)
* Introduce a Directionality inherited widget which sets the ambient LTR vs RTL mode (defaulting to null, which means you cannot use directionality-influenced values).

* Make it possible to configure Padding (including Container.padding and Container.margin) using a directionality-agnostic EdgeInsets variant.

* Provide textDirection and verticalDirection controls on Row and Column to make them RTL-aware.

* Introduce a variant of FractionalOffset based on the EdgeInsets variant. Not yet actually used.

* Fix all the tests that depended on Row defaulting to LTR.
2017-08-28 12:50:24 -07:00
Alexandre Ardhuin
83fce211a3 More const immutable classes (#9544)
* more widget const constructors

* prefer const constructors

* address review comments
2017-04-23 22:37:29 +02:00
Ian Hickson
3eb87830e9 Constants! Constants everywhere! (#9286)
Aggressively apply the const lint.
2017-04-07 12:24:32 -07:00
Chris Bracken
46291903e0 Declare locals final where not reassigned (tests) (#8566) 2017-03-03 17:43:22 -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
Adam Barth
90574b0478 Remove Scrollable1 (#8225)
All the clients have migrated to Scrollable2.
2017-02-16 16:41:24 -08:00
Adam Barth
3231465769 Add PageView (#7809)
This widget is a start towards replacing PageableList. There are still a number
of features that we'll need to add before this widget can replace PageableList.
2017-02-02 16:16:20 -08:00
Ian Hickson
5928d221d4 ShrinkWrap Viewport (#7790) 2017-02-02 14:50:04 -08:00
Alexandre Ardhuin
c8447c91a9 prefer_const_constructor in packages/flutter/test (#7181) 2016-12-09 15:20:27 -08:00
Dragoș Tiselice
14054646ca Added Material steppers. (#5765)
Added a widget that gives fine control over the use of steppers.
At any single moment, one step is shown with it own controls and
content.
2016-09-16 13:22:15 -07:00