Skip to content

Commit bd48759

Browse files
committed
Format with new formatter
1 parent 687f466 commit bd48759

17 files changed

+76
-64
lines changed

analysis_options.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ analyzer:
44
plugins:
55
- custom_lint
66

7+
formatter:
8+
trailing_commas: preserve
9+
page_width: 120
10+
711
linter:
812
rules:
913
prefer_int_literals: false

lib/models/ast_node_info.dart

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,18 @@ class AstNodeInfo {
203203
final ForPartsWithPattern node => AstNodeInfo._fromForPartsWithPattern(node),
204204
final ForStatement node => AstNodeInfo._fromForStatement(node),
205205
final FunctionDeclaration node => AstNodeInfo._fromFunctionDeclaration(node),
206-
final FunctionDeclarationStatement node => AstNodeInfo._fromFunctionDeclarationStatement(node),
206+
final FunctionDeclarationStatement node => AstNodeInfo._fromFunctionDeclarationStatement(
207+
node,
208+
),
207209
final FunctionExpression node => AstNodeInfo._fromFunctionExpression(node),
208-
final FunctionExpressionInvocation node => AstNodeInfo._fromFunctionExpressionInvocation(node),
210+
final FunctionExpressionInvocation node => AstNodeInfo._fromFunctionExpressionInvocation(
211+
node,
212+
),
209213
final FunctionReference node => AstNodeInfo._fromFunctionReference(node),
210214
final FunctionTypeAlias node => AstNodeInfo._fromFunctionTypeAlias(node),
211-
final FunctionTypedFormalParameter node => AstNodeInfo._fromFunctionTypedFormalParameter(node),
215+
final FunctionTypedFormalParameter node => AstNodeInfo._fromFunctionTypedFormalParameter(
216+
node,
217+
),
212218
final GenericFunctionType node => AstNodeInfo._fromGenericFunctionType(node),
213219
final GenericTypeAlias node => AstNodeInfo._fromGenericTypeAlias(node),
214220
final GuardedPattern node => AstNodeInfo._fromGuardedPattern(node),
@@ -265,12 +271,16 @@ class AstNodeInfo {
265271
final RecordLiteral node => AstNodeInfo._fromRecordLiteral(node),
266272
final RecordPattern node => AstNodeInfo._fromRecordPattern(node),
267273
final RecordTypeAnnotation node => AstNodeInfo._fromRecordTypeAnnotation(node),
268-
final RecordTypeAnnotationNamedField node => AstNodeInfo._fromRecordTypeAnnotationNamedField(node),
274+
final RecordTypeAnnotationNamedField node => AstNodeInfo._fromRecordTypeAnnotationNamedField(
275+
node,
276+
),
269277
final RecordTypeAnnotationNamedFields node => AstNodeInfo._fromRecordTypeAnnotationNamedFields(node),
270278
final RecordTypeAnnotationPositionalField node => AstNodeInfo._fromRecordTypeAnnotationPositionalField(node),
271279
final RedirectingConstructorInvocation node => AstNodeInfo._fromRedirectingConstructorInvocation(node),
272280
final RelationalPattern node => AstNodeInfo._fromRelationalPattern(node),
273-
final RepresentationConstructorName node => AstNodeInfo._fromRepresentationConstructorName(node),
281+
final RepresentationConstructorName node => AstNodeInfo._fromRepresentationConstructorName(
282+
node,
283+
),
274284
final RepresentationDeclaration node => AstNodeInfo._fromRepresentationDeclaration(node),
275285
final RestPatternElement node => AstNodeInfo._fromRestPatternElement(node),
276286
final RethrowExpression node => AstNodeInfo._fromRethrowExpression(node),
@@ -303,7 +313,9 @@ class AstNodeInfo {
303313
final TypeParameterList node => AstNodeInfo._fromTypeParameterList(node),
304314
final VariableDeclaration node => AstNodeInfo._fromVariableDeclaration(node),
305315
final VariableDeclarationList node => AstNodeInfo._fromVariableDeclarationList(node),
306-
final VariableDeclarationStatement node => AstNodeInfo._fromVariableDeclarationStatement(node),
316+
final VariableDeclarationStatement node => AstNodeInfo._fromVariableDeclarationStatement(
317+
node,
318+
),
307319
final WhenClause node => AstNodeInfo._fromWhenClause(node),
308320
final WhileStatement node => AstNodeInfo._fromWhileStatement(node),
309321
final WildcardPattern node => AstNodeInfo._fromWildcardPattern(node),
@@ -2212,7 +2224,9 @@ class AstNodeInfo {
22122224
);
22132225
}
22142226

2215-
factory AstNodeInfo._fromPatternVariableDeclarationStatement(PatternVariableDeclarationStatement node) {
2227+
factory AstNodeInfo._fromPatternVariableDeclarationStatement(
2228+
PatternVariableDeclarationStatement node,
2229+
) {
22162230
return AstNodeInfo(
22172231
node: node,
22182232
nodeEntries: [
@@ -2368,7 +2382,9 @@ class AstNodeInfo {
23682382
);
23692383
}
23702384

2371-
factory AstNodeInfo._fromRecordTypeAnnotationPositionalField(RecordTypeAnnotationPositionalField node) {
2385+
factory AstNodeInfo._fromRecordTypeAnnotationPositionalField(
2386+
RecordTypeAnnotationPositionalField node,
2387+
) {
23722388
return AstNodeInfo(
23732389
node: node,
23742390
nodeEntries: [

lib/models/ast_node_kind.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ enum AstNodeKind {
170170
whileStatement(whileStatementExample),
171171
wildcardPattern(wildcardPatternExample),
172172
withClause(withClauseExample),
173-
yieldStatement(yieldStatementExample),
174-
;
173+
yieldStatement(yieldStatementExample);
175174

176175
final String example;
177176

lib/models/tree_node.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class TreeNode<T> {
66
final List<TreeNode<T>> children;
77

88
const TreeNode(
9-
this.value,{
9+
this.value, {
1010
List<TreeNode<T>>? children,
1111
}) : children = children ?? const [];
1212

lib/pages/home_page.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ class _HomePageState extends State<HomePage> {
4040
late TreeNode<AstNode> _treeNode;
4141

4242
AstNode? get _selectedAstNode => switch (_selectedSyntacticEntity) {
43-
final AstNode node => node,
44-
_ => null,
45-
};
43+
final AstNode node => node,
44+
_ => null,
45+
};
4646

4747
@override
4848
void initState() {

lib/providers/app_init.g.dart

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/providers/code_theme.g.dart

Lines changed: 6 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/providers/package_info.g.dart

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/providers/prefs.g.dart

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/providers/theme_mode.g.dart

Lines changed: 2 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)