1
+ 40 columns |
2
+ >>> many parameters
3
+ Function(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth,
4
+ tenth, eleventh, twelfth) f;
5
+ <<<
6
+ Function(
7
+ first,
8
+ second,
9
+ third,
10
+ fourth,
11
+ fifth,
12
+ sixth,
13
+ seventh,
14
+ eighth,
15
+ ninth,
16
+ tenth,
17
+ eleventh,
18
+ twelfth) f;
19
+ >>> parameters fit but ) does not
20
+ Function(int firstArgume, int argumentTo) f;
21
+ <<<
22
+ Function(
23
+ int firstArgume, int argumentTo) f;
24
+ >>> keep mandatory and positional on same line
25
+ Function(param, [foo, bar]) f;
26
+ <<<
27
+ Function(param, [foo, bar]) f;
28
+ >>> keep mandatory and named on same line
29
+ Function(param, {T foo, T bar}) f;
30
+ <<<
31
+ Function(param, {T foo, T bar}) f;
32
+ >>> move just optional positional to second line even though all fit on second
33
+ Function(parameter, [int foo, String bar]) f;
34
+ <<<
35
+ Function(parameter,
36
+ [int foo, String bar]) f;
37
+ >>> move just named to second line even though all fit on second
38
+ Function(parameter, {int foo, String bar}) f;
39
+ <<<
40
+ Function(parameter,
41
+ {int foo, String bar}) f;
42
+ >>> avoid splitting in function type parameters
43
+ Function(parameter1, void printFn(param1, param2)) f;
44
+ <<<
45
+ Function(parameter1,
46
+ void printFn(param1, param2)) f;
47
+ >>> allow splitting in function type parameters
48
+ Function(v callback(parameter1, parameter2, parameter3, parameter4)) f;
49
+ <<<
50
+ Function(
51
+ v callback(parameter1, parameter2,
52
+ parameter3, parameter4)) f;
53
+ >>> split optional onto one per line if they don't fit on one line
54
+ Function([parameter1, parameter2, parameter3]) f;
55
+ <<<
56
+ Function(
57
+ [parameter1,
58
+ parameter2,
59
+ parameter3]) f;
60
+ >>> split between type and name
61
+ Function(VerylongParameterType parameterName) f;
62
+ <<<
63
+ Function(
64
+ VerylongParameterType
65
+ parameterName) f;
66
+ >>> split in function type and on variable name
67
+ Function(VeryVeryVeryVeryLongParameterType) veryLongVariableName;
68
+ <<<
69
+ Function(
70
+ VeryVeryVeryVeryLongParameterType)
71
+ veryLongVariableName;
72
+ >>> split in nested function type forces outer split
73
+ Function(int, String, Function(parameter1, parameter2, parameter3)) f;
74
+ <<<
75
+ Function(
76
+ int,
77
+ String,
78
+ Function(parameter1, parameter2,
79
+ parameter3)) f;
80
+ >>> split in type arguments and variable
81
+ Function<Parameter1, Parameter2, Parameter3>() veryVeryLongVariableName;
82
+ <<<
83
+ Function<Parameter1, Parameter2,
84
+ Parameter3>()
85
+ veryVeryLongVariableName;
86
+ >>> split after return type
87
+ GenericClass<Parameter1, Parameter2> Function() f;
88
+ <<<
89
+ GenericClass<Parameter1, Parameter2>
90
+ Function() f;
91
+ >>> chained return types
92
+ Function<Argument>(String) Function<Argument>(num) Function<Argument>(int) Function<Argument>(bool) longVariable;
93
+ <<<
94
+ Function<Argument>(String)
95
+ Function<Argument>(num)
96
+ Function<Argument>(int)
97
+ Function<Argument>(bool)
98
+ longVariable;
0 commit comments