Closed dcharkes closed 2 months ago
Yeah, this is working as intended.
It's a little strange but, honestly, there's probably no perfect style here. I chose this approach in the new style in part because it felt weird to me to indent the variable name, when the variable type is subordinate to it. The new style has a similar approach for function return types:
SomeVeryLongReturnType
function() {
...
}
And likewise there it would feel weird to me to indent the function name when it "owns" the return type.
So I decided to not indent at all whenever we split between a type annotation and the thing it annotates. Also, I think it looks pretty nice, especially in things like parameter lists.
Very long typed final variables do not get indented:
->
I'm not sure if this is intended. I could probably get used to the new style.
Source file: https://github.com/dart-lang/native/blob/main/pkgs/ffigen/lib/src/config_provider/config_impl.dart