Commit graph

14721 commits

Author SHA1 Message Date
Miguel Beltran da58f5e6fe
Pass RouteSettings to the internal Route in showCupertinoModalPopup (#56024) 2020-10-12 15:53:54 -07:00
Jonah Williams 18bb4d7254
Revert "[flutter_tools] reland: fold process resolution logic into the flutter tool (#67957)" (#67968)
This reverts commit bd8138797e.
2020-10-12 15:53:16 -07:00
Jonah Williams 52f8b89c0e
[flutter_tools] dont allow creating package name that is invalid (#67786)
According to https://dart.dev/tools/pub/pubspec#name , uppercase is not permitted for package names.
2020-10-12 15:38:23 -07:00
Jonah Williams bd8138797e
[flutter_tools] reland: fold process resolution logic into the flutter tool (#67957)
Reland of #67669

The flutter tool has a number of crashes on stable where an ArgumentError is thrown due to the process manager not being able to resolve an executable.

So that we can adjust/modify this logic, fold it into flutter and add some additional logging.
caches the resolved executable per target directory, to avoid repeated look ups.
Instead of throwing an argument error, attempts to run the executable as given if an exact path can't be found
Accept files or symlinks for the executable path.
user where/which to resolve path instead of package:process logic.
2020-10-12 15:37:02 -07:00
Jonah Williams c606f044d7
[gestures] make stylus pointer types use touch pan/drag slop (#67885) 2020-10-12 15:20:50 -07:00
Dan Field b6c56fdeaf
Add test for TabBarView (#67799) 2020-10-12 14:25:17 -07:00
Hans Muller 6219b30850
Replace obsolete FlatButton reference in flutter_driver extension_test.dart (#67952) 2020-10-12 14:22:13 -07:00
Kate Lovett 9464661a98
Fix sample code (#67940) 2020-10-12 14:22:03 -07:00
Anurag Roy 7f1540f323
Add contentPadding property for RadioListTile (#67438)
Exposes contentPadding property for RadioListTile from its appropriate ListTile.
2020-10-12 14:22:01 -07:00
Michael Goderbauer 053ebf2c08
Make CupertinoTabScaffold restorable (#67770) 2020-10-12 14:17:02 -07:00
LongCatIsLooong daa6b2cc29
More EditableText docs (#66864) 2020-10-12 14:12:06 -07:00
xubaolin dd41f41f34
CupertinoTextField should not accept requestFocus when disabled (#65235) 2020-10-12 14:07:05 -07:00
Jonah Williams 408cd71d82
[flutter_tools] check asset files while the tool waits for the frontend_server compile (#67826)
On every hot reload, the flutter tool must file stat each asset in the bundle. With a large number of assets or a slow file system, this can take 20 - 30 ms. Do this operation while the flutter tool is waiting for a response from the frontend_server.

No tests updated since this is only a timing update. Any difference in behavior will be shown on benchmarks
2020-10-12 14:06:40 -07:00
Jonah Williams 354e2a57b1
Revert "[flutter_tools] fold executable resolution into flutter (#67669)" (#67954)
This reverts commit 10c78c264a.
2020-10-12 13:15:39 -07:00
Jonah Williams 10c78c264a
[flutter_tools] fold executable resolution into flutter (#67669)
The flutter tool has a number of crashes on stable where an ArgumentError is thrown due to the process manager not being able to resolve an executable. Fold the resolution logic into the tool and use where/which instead of the package:process specific logic.
2020-10-12 12:51:37 -07:00
Jonah Williams ac614de7ac
[flutter_tools] validate that SkSL bundle path exists (#67883)
Fixes #61772

tool exit if there is no file at the path provided when building/running with sksl
2020-10-12 12:49:51 -07:00
Jonah Williams fd11d149f7
[flutter_tools] teach flutter drive to uninstall if install fails (#67936)
Work towards #39925

Currently flutter run will uninstall and reinstall if the initial install fails and the APK was previously installed. Allow drive to share this same logic by moving it into installApp and out of startApp.

This should reduce the occurrence of the error in the devicelab.
2020-10-12 12:49:36 -07:00
Sergey Solodukhin 3e069a433b
fix issue #55400 PopupMenuButton positions menu incorrectly with nest… (#65832) 2020-10-12 11:52:04 -07:00
Darren Austin 7ce0dce2e5
Migrate even more Material framework tests to null safety. (#67849) 2020-10-12 11:30:26 -07:00
Michael Goderbauer 18795b471e
Migrate some widget tests to NNBD (#67776) 2020-10-12 11:18:52 -07:00
Jonah Williams b4e4e8d965
[flutter_tools] do not crash validator if intellij JAR file is missing (#67931)
This failure has been happening for a while but was covered by the overly broad catch. Removing that revealed that newer intellij versions have a different plugins file. The tool still can't find the file, but it won't crash now

Fixes #67918
2020-10-12 10:34:05 -07:00
Per Classon 7668f06ffe
[Material] Use primary color for selected rows and checkboxes in DataTable (#67919) 2020-10-12 10:17:03 -07:00
Justin McCandless b93f71f9c8
NNDB TextField tests (#67696)
Just another nnbd conversion PR.
2020-10-12 09:59:05 -07:00
Sam Rawlins 23c7ee9deb
Bump meta to 1.3.0-nullsafety.4 (#67744) 2020-10-12 09:50:30 -07:00
Jonah Williams 0afddf3578
[flutter_tools] use fixed entry for dill uploads (#67837)
For historical reasons, the flutter tool uploads dill files to paths based on the entrypoint URI. This isn't actually necessary, and the tool can use specific files : main.dart.incremental.dill for incremental dills, and main.dart.dill/main.dart.swap.dill for full dills. This allows hot restarting applications with an entrypoint outside of lib/ and simplifies the devFS code.

Fixes #63243
2020-10-12 09:47:41 -07:00
xubaolin 8538b4f546
Fix TextField bug when the formatter repeatedly format (#67892) 2020-10-12 09:37:03 -07:00
chunhtai 345188d40e
make Router.of nullable (#67683) 2020-10-12 09:32:07 -07:00
Jonah Williams 08576cb671
[flutter_tools] HACKTOBERFEST (#67882)
HACKTOBERFEST
2020-10-12 09:31:02 -07:00
xubaolin 8211aaa2ae
Fix ListTile assert when layout at zero size (#66798)
* Fix ListTile assert when layout at zero size #66636
2020-10-12 17:25:38 +08:00
xubaolin d914d5d2f9
Fix typos in the [BottomNavigationBar] document (#67811) 2020-10-12 02:22:01 -07:00
Alexandre Ardhuin eefcff900c
Final definite assignment (#67682) 2020-10-10 14:42:02 -07:00
Jonah Williams 1a9d635f64
[flutter_tools] remove --with-driver-test (#67783)
Remove flutter create --with-driver-test . Fixes #64095
2020-10-09 21:03:37 -07:00
Dan Field 8bb61c3801
Reland ensure visible fix for nested viewports (#67773)
* Revert "Revert "Improve the behavior of Scrollable.ensureVisible when Scrollable nested (#65226)" (#66918)"

This reverts commit e8812c409b.

* Fix for page views

* comment
2020-10-09 17:40:33 -07:00
Marcin Jeleński 439992472a
Export finder factory (#67779) 2020-10-09 16:50:54 -07:00
Alexander Markov 1973cf2d6c
Remove uses of bytecode mode of Dart VM (#67755) 2020-10-09 16:33:06 -07:00
James D. Lin e4206ac5dd
[flutter tools] Add a DelegatingLogger class (#67581)
[flutter tools] Add a DelegatingLogger class

Move most of `DelegateLogger` `from test/src/testbed.dart` to
`lib/src/base/logger.dart` to better formalize the common practice of
chaining `Logger`s together.  I renamed the class since it isn't
itself the delegate and to better match the `Delegating...` classes
from `package:collection`.

Additionally, add a freestanding `asLogger<T>` function to "cast" a
`Logger` into a matching delegate if possible.  This will allow
`Logger` chains to be ordered a *bit* more freely (e.g.
`NotifyingLogger` and `AppRunLogger` will no longer required to be
at the end of the chain, an unwritten rule that has led to breakage in
google3).  Chain order still matters since lack of virtual dispatch
means that parent `Logger`s can never invoke child methods, however.

I made `asLogger<T>` a freestanding function because I didn't want to
make it part of the `Logger` interface (and I thought that making it
an extension method might be weird).

Bonus cleanup:
There no longer appears to be a way to construct an `AppRunLogger`
with a null parent, so remove all of code paths for that case and
make the `parent` construction parameter required.
2020-10-09 15:55:24 -07:00
Jonah Williams bdb830a833
[flutter_tools] pretty print hot reload rejection error (#66701)
If the vm of an attached device rejects a hot reload, pretty print the reason. Suggest a hot restart so that users are aware that they do not have to detach and rebuild. Also resets the last compilation time, so a subsequent restart would still apply the last change. Adds an integration test for the const field removal.

Fixes #64027
2020-10-09 15:44:52 -07:00
Jonah Williams 5fa801718f
[flutter_tools] remove train and inject-plugins command (#67766)
The train command does nothing and was originally added to provide a no-output default for generating app-jit snapshots. The inject-plugins command is only for a repo-only analysis check, which is not necessary since we regenerate during pub get.

#29805
2020-10-09 15:43:39 -07:00
Jonah Williams 92702a28ec
Revert "Flutter driver patch: export finder factory (#67769)" (#67777)
This reverts commit be5830cdf0.
2020-10-09 15:16:24 -07:00
Greg Spencer c083f02f3a
Migrate more material tests to NNBD (#67674)
This migrates more material tests to NNBD.
2020-10-09 14:58:13 -07:00
Marcin Jeleński be5830cdf0
Flutter driver patch: export finder factory (#67769) 2020-10-09 14:49:45 -07:00
Marcin Jeleński 759ddb1ccd
Reland "Flutter Driver - Create widget finders from serialized finders extensions" with null safety (#67711)
* Flutter Driver - Create widget finders from serialized finders extensions
2020-10-09 13:28:25 -07:00
Matej Knopp 24abe59f38
Provide oldLayer where possible (#67320) 2020-10-09 13:07:05 -07:00
Jonah Williams cba84d5127
[flutter_tools] remove globals from IntelliJ validator, refactor tests to remove dependency on JAR (#67240)
Move the intellij validator to its own file, and split off the tests. Remove globals from each, and remove dependency on a real jar/filesystem by creating a minimal version of the manifest xml and setting it up in the memory file system.

#47161
2020-10-09 13:05:42 -07:00
Jonah Williams 9a3a0dc18f
[flutter_tools] hot reload/restart update for asset manager change (#66742)
Do not upload all assets on initial devFS sync. This should increase the reliability of the initial connection, even in the face of flaky devfs behavior, in addition to a moderate perf improvement.

Updates fast-start to build assets as part of the initial bundle

Requires flutter/engine#21436
Requires flutter/engine#21586
Requires flutter/engine#21611
2020-10-09 12:25:15 -07:00
nturgut a755c03819
Add web e2e to the flutter/flutter repo (#67693)
* adding tests that uses integration_test (e2e) package to flutter

* change the package name for the import

* fix licenses. fix README commands. add links

* adding dependency change auto generated by the tool

* more analyzer error fixes
2020-10-09 12:24:36 -07:00
Michael Goderbauer 0dc10deb79
Fix tree (#67751) 2020-10-09 11:12:57 -07:00
Michael Goderbauer 793678d50e
Migrate tests to null-safety (#67692) 2020-10-09 10:42:02 -07:00
Nan Kim 28a9a6b48c
Add sample code for CupertinoActionSheet (#65274) 2020-10-09 09:08:13 -07:00
Per Classon 8d80592d46
Add tristate to parent checkbox for DataTable (#67414)
* Add tristate to parent checkbox for DataTable to follow Material specifications
2020-10-09 16:33:39 +02:00
Rami bbf1b5579f
[Material] Time picker semantics updates (#67562) 2020-10-09 10:28:20 -04:00
Per Classon ee08c2278a
Add decoration parameter to DataTable and DataTableTheme (#66640)
* Add decoration parameter to DataTable and DataTableTheme
2020-10-09 14:11:17 +02:00
Jenn Magder 98aeef2d98
Build xcarchive command (#67598) 2020-10-08 19:51:35 -07:00
Mouad Debbar ffcf419136
[web] Support custom url strategies (#59797) 2020-10-08 17:57:02 -07:00
Jonah Williams 4f2fcca6a9
Reland "[null-safety] reland: migrate app side flutter driver to null-safety" (#67570) 2020-10-08 17:42:02 -07:00
Greg Spencer 1bcaf94062
Fix nullability warnings in routes_test (#67694) 2020-10-08 17:02:33 -07:00
Jenn Magder f92ba2d2c5
Replace MockUsage with Usage.test in build tests (#67670) 2020-10-08 16:09:49 -07:00
xster 41325b5677
Turn timer_picker_test goldens back on (#67555) 2020-10-08 15:57:03 -07:00
Michael Goderbauer d127f2c94a
Fix nullability for some routing related stuff (#67675) 2020-10-08 15:56:31 -07:00
Jonah Williams 4042eb97b9
Revert "Flutter Driver - Create widget finders from serialized finders extensions (#67456)" (#67687)
This reverts commit 74f6fa4564.
2020-10-08 15:34:55 -07:00
Marcin Jeleński 74f6fa4564
Flutter Driver - Create widget finders from serialized finders extensions (#67456) 2020-10-08 15:27:02 -07:00
chunhtai cb0bdb4994
make router assert more strict (#67672) 2020-10-08 14:12:03 -07:00
Jonah Williams 973404a27f
[flutter_tools] support powershell style help request (#67493) 2020-10-08 14:06:58 -07:00
Jason Simmons e3c441e0fd
Replace the flag emoji in the emoji caret test with a modifier sequence (#67652) 2020-10-08 13:52:09 -07:00
Greg Spencer 58287aceef
Convert services tests to NNBD (#62694)
This converts the packages/flutter/test/services directory to NNBD, now that the services package is converted.

I changed the signature of checkMessageHandler and checkMockMessageHandler on BinaryMessenger to take a nullable handler, since the tests wanted to check to make sure a handler wasn't set, and that functionality no longer works if the handler is non-nullable.
2020-10-08 13:46:44 -07:00
Jonah Williams ddab09f553
[flutter_tools] enable LocalDevFSWriter for desktop devices, iOS simulator (#66678)
* [flutter_tools] enable LocalDevFSWriter for desktop devices, iOS simulator

* Update device.dart

* Update desktop_device_test.dart

* fix analysis errors
2020-10-08 13:40:19 -07:00
Christopher Fujino ccdaa37043
Remove the .zip method from OSUtils, as it was not used (#67367)
We used to use zip to verify the integrity of downloaded zip archives, but we now use unzip. This removes the .zip method from OperatingSystemUtils.
2020-10-08 13:40:01 -07:00
Justin McCandless 96ae589a2e
Fix new analyzer rule failure (#67656) 2020-10-08 12:47:46 -07:00
Alexandre Ardhuin 8693824dfb
fix the tree (#67668) 2020-10-08 21:36:41 +02:00
nero e0c0321e4d
[ReorderableListView] Fix item dropping animation (#64140) 2020-10-08 12:32:02 -07:00
Jonah Williams 30c0fc1bce
[flutter_tools] remove globals from compile and devices (#67485)
Remove global variables from compile.dart and devices.dart (except for dds which needs more changes).

#47161
2020-10-08 12:28:58 -07:00
Yuqian Li 587dd00619
Add the missing parantheses (#67446)
Fixes https://github.com/flutter/flutter/issues/67343
2020-10-08 12:20:30 -07:00
Kate Lovett 72696f77dd
Remove Cirrus support for Gold (#67468) 2020-10-08 14:19:42 -05:00
Alexandre Ardhuin 4acc790252
enable lint cast_nullable_to_non_nullable (#67629) 2020-10-08 21:05:43 +02:00
Ayush Bherwani a67ba2a2ba
[AppBarTheme] adds titleSpacing parameter (#67105)
* adds titleSpacing in AppBarTheme

Co-authored-by: Shi-Hao Hong <shihaohong@google.com>
2020-10-09 02:07:34 +08:00
LongCatIsLooong 731374016b
Reland "Add CompositedTransformFollower.{followerAnchor, leaderAnchor} for custom anchoring (#64930)" (#65871) (#65884) 2020-10-08 11:07:03 -07:00
Michael Goderbauer 4513e96a30
Migrate more material tests (#67591) 2020-10-08 10:42:09 -07:00
Justin McCandless b79e3462a3
Some NNBD Test Conversion (#67558)
Just converting some test files to NNBD
2020-10-08 09:51:38 -07:00
Anthony 82ff246156
Fix Align widthFactor and heightFactor docs to allow 0 values (#67334) 2020-10-08 11:09:27 -04:00
Alexandre Ardhuin d2858f00dd
enable null_check_on_nullable_type_parameter and tighten_type_of_initializing_formals (#67557)
* enable null_check_on_nullable_type_parameter and tighten_type_of_initializing_formals

* fix CI
2020-10-08 09:39:13 +02:00
Alexandre Ardhuin 0d8d4f77aa
unnecessary null comparison (#67525) 2020-10-08 09:26:30 +02:00
Yegor 0b78110b26
Work around the glibc bug that causes rare Chrome crashes (#67466)
Work around the glibc bug that causes rare Chrome crashes
2020-10-07 19:29:47 -07:00
Dan Field 8d9e0d4b95
Respect --enable-software-rendering flag on iOS simulators (#67576) 2020-10-07 18:07:10 -07:00
Michael Goderbauer 1e0007f3f1
Implement documented behavior of WidgetsApp.builder (#67574) 2020-10-07 17:42:04 -07:00
Kate Lovett cfc8ec23b6
Re-land 'Wrap PopupMenu with SafeArea to respect status bar' (#67578) 2020-10-07 17:07:05 -07:00
Darren Austin 3c21775c94
Migrate Material framework tests to null safety (#67556)
Migrate Material framework tests to null safety.
2020-10-07 16:44:00 -07:00
Chris Bracken b851f99794
Preserve composing range if possible on sel change (#67197)
When setting the TextSelection in a TextEditingController, preserve the
composing range so long as the new selection is:

  * a collapsed selection; in other words, a cursor rather than a
    selection with an extent. A selection with an extent is not
    permitted when composing.
  * within the composing region. Moving the cursor outside the composing
    region ends composing mode.

When using physical keyboards for input with an IME, users expect to be
able to navigate using the cursor within the composing region with the
arrow keys in order to edit text in the composing range.

As an example, a user might erroneously enter the composing text
にほんごにゅうろく in kana, then hit the left arrow, followed by
backspace in order to delete the ろ, then input りょ in order to
generate the correct composing text にほんごにゅうりょく, before then
hitting the conversion key to convert to the kanji text 日本語入力 and
commit.
2020-10-07 16:36:01 -07:00
Kate Lovett 019e90f7df
[NNBD] Migrates some rendering tests (#67449) 2020-10-07 16:27:06 -07:00
Ayush Bherwani 3517412446
Exposes ListTile.shape for CheckboxListTile and SwitchListTile (#67419) 2020-10-07 16:22:05 -07:00
Jonah Williams b3f9944f3c
[flutter_tools] remove deprecated flutter command (#67478) 2020-10-07 16:21:08 -07:00
Jonah Williams a4e0e2a8ee
Revert "[flutter_tools] remove all pub caching logic (#66776)" (#67572)
This reverts commit 76cbc462d2.
2020-10-07 15:30:46 -07:00
Jonah Williams 5e4c86d124
Revert "Wrap PopupMenu with SafeArea to respect status bar (#64678)" (#67566)
This reverts commit 2e419ff769.
2020-10-07 14:58:12 -07:00
Dan Field ad49e25a6b
Revert "[null-safety] reland: migrate app side flutter driver to null-safety (#67441)" (#67561)
This reverts commit d411242468.
2020-10-07 13:57:49 -07:00
Justin McCandless e98e0b409f
EditableText action handlers swallow errors (#66851)
Errors that happen in user-defined callbacks (like onChanged) will now make it to the console.
2020-10-07 13:40:38 -07:00
Markus Aksli 571b190f07
Explained parent constraints in SizedBox (#66639) 2020-10-07 13:32:03 -07:00
Juyeong Lee 2e419ff769
Wrap PopupMenu with SafeArea to respect status bar (#64678) 2020-10-07 13:27:06 -07:00
Michael Goderbauer 52d3bef017
Reland removal of examples/catalog (#67545) 2020-10-07 13:17:08 -07:00
YeungKC db25441fd9
Update the cupertino picker visuals (#65501) 2020-10-07 13:12:12 -07:00
Tong Mu 0fbc95df21
Remove the extra wrapping of Listener (#67340) 2020-10-07 13:12:05 -07:00
Jonah Williams 76cbc462d2
[flutter_tools] remove all pub caching logic (#66776)
There have been some more additional reports of a missing 'package:characters' import after upgrading flutter, as well as problems with detecting the correct language version. This has me concerned that our pub caching logic is incorrect. Instead of the tool attempting to guess when pub should be run, always delegate to pub.
2020-10-07 13:11:07 -07:00