You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Force a cascade to split if an indirect method call section splits. (#1509)
We always split a cascade if it has multiple sections. We don't require it to split if it has only one:
```dart
cascadeTarget..method(argument);
```
We also don't require it to split if the section is a method call whose argument list splits:
```dart
cascadeTarget..method(
argument,
);
```
But the section might not be an immediate method call like `method()` here. It could be some longer call chain as in:
```
cascadeTarget..some.property.chain.method(argument);
```
In that case, if the ultimate trailing argument list splits, I think it's better to force the cascade section to split too:
```
cascadeTarget..some.property.chain.method(
argument,
);
// Better:
cascadeTarget
..some.property.chain.method(
argument,
);
```
Otherwise, I think the preceding call chain gets sort of buried in the line with the cascade target.
This makes that change.
0 commit comments