Commit graph

16 commits

Author SHA1 Message Date
b-stime c1339411bb Adds assist for basic Flutter Builder
Fixes issues such as

* https://github.com/flutter/flutter-intellij/issues/814
* https://github.com/dart-lang/sdk/issues/33957 .

Essentially, in Flutter, it's often useful to create a new context in the UI/widget tree as a place to begin a search towards the trunk of the tree for various state structures attached to lower levels of the tree. The basic `Builder` widget is the official means for creating such a context/entry-point.

The patches in this PR are essentially a copy-paste-tweak from two types of existing, similar assists. The main origin was taken from `FlutterWrapStreamBuilder` which wraps client code with a constructor for the StreamBuilder sub-class. The new assist, provided here, is a little more basic/general than the StreamBuilder so it was able to also adopt assertion and test code from some of the other assists for basic widgets.

Closes https://github.com/dart-lang/sdk/pull/45656
https://github.com/dart-lang/sdk/pull/45656

GitOrigin-RevId: 00a5043e5dbd410f24f30f6503711413341dbe7a
Change-Id: I5f93837af571b4974e35da131112f82cd9359697
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-12 17:33:06 +00:00
Konstantin Shcheglov 9f986d2501 Migrate package:analyzer to null safety.
Change-Id: Iffe4370431587e46a141ddc72a86ceec29c163b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-02-01 18:56:04 +00:00
Danny Tuppeny b613265c85 [Analyzer] Reanalyze analysis_options when .packages changes
Fixes https://github.com/dart-lang/stagehand/issues/619.

Change-Id: I30022215b23de2b690b5cde95c9dd256a9ef83d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160068
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-25 15:03:29 +00:00
Devon Carew 31335728d1 [analyzer] add a new wrap with widget for SizedBox
Change-Id: Ib94b254ebdff82309d8761c8bb769e15e19d23ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157423
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-06 04:34:26 +00:00
pq aea99b2f5c scope debug property assist to Diagnosticables
Fixes: https://github.com/dart-lang/sdk/issues/42783

Change-Id: Ied9b0fa04e0f99b4d5b4604c72696b5cfaec737d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-22 22:18:24 +00:00
Brian Wilkerson 486467c02d Bulk sort of a subset of the files in analysis_server
Change-Id: Id811d37ad565c6f3c0ed508ae2b42e22469cbd3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139830
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-17 19:13:14 +00:00
pq 7eaafa01cc linter 0.1.111+1
Change-Id: I9e311527a41f65b888c4208615158715e3ff6dbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137321
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-26 20:34:31 +00:00
Brian Wilkerson e2a528d976 Remove the lint marker from more fix tests
Some of the tests were fairly seriously broken, so this fixes them.

Some of the tests were testing that we don't provide a fix when there is
no lint, but I don't think that it's useful to test that.

One test required no changes other than removing the marker.

Change-Id: I6d85fd98506fa20d8bf4996d30603feb8b1ff252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134500
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-05 18:10:49 +00:00
Kevin Moore 8342ec2c71 Fix pub.dev URLs throughout SDK repo
Change-Id: I5bcb7c40be12ee1dc887620281b4807469d67bbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125729
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2019-11-20 11:30:48 +00:00
pq 0a63bd4b0a diagnostic fix support for colors, iterables, lists, matrices
See: https://github.com/dart-lang/sdk/issues/38633

Change-Id: I8d7baa32bcea22f2c162bd9d77c7dd0b95b308de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-10-03 20:05:33 +00:00
Konstantin Shcheglov a62de52d04 Insert new named arguments before 'child' or 'children'.
R=brianwilkerson@google.com

Change-Id: Idbe5bb7efbeaa81a8f2319fab929944e7b3492d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112027
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-06 01:31:27 +00:00
Konstantin Shcheglov 1390201177 Support for 'padding' property, and EdgeInsets type.
R=brianwilkerson@google.com

Change-Id: I536ee3952d6e280a56b048773a3a5696bc508b07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-07-22 17:15:28 +00:00
Konstantin Shcheglov 1014272f3b Extent 'alignment' property, copy from Align, virtual Container.
R=brianwilkerson@google.com

Change-Id: I9bec5b32e91f3cb77c4996f0ba0e7c2dd424316b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109724
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-19 21:41:03 +00:00
Konstantin Shcheglov 9d204ca5d8 Start adding 'Container' properties.
R=brianwilkerson@google.com

Change-Id: I88c8194545dc3944318b897616e5a500c97ae4d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-07-17 20:03:54 +00:00
Konstantin Shcheglov 65f8cd4365 Start implementing widget properties.
Only self properties for now.

No compound properties.

No virtual Container properties.

R=brianwilkerson@google.com

Change-Id: Icd61f45ecc95c45037c3998a927eb267fd13c4cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-07-15 21:06:56 +00:00
Konstantin Shcheglov 8b012ac780 Replace package mock in strings with files in tests/mock_packages.
R=brianwilkerson@google.com

Change-Id: I5240fbd90c8220d14ff41d6a98069f943e56aa6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108920
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-12 17:17:33 +00:00