Skip to content

Commit 819132a

Browse files
committed
Minor refactor to GridView childAlignment function.
1 parent 3f3592f commit 819132a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/src/api/nodes/grid_view_node.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,22 +168,22 @@ class GridViewNode extends SinglePlaceholderNode
168168
};
169169
}
170170

171-
/// Creates a [GridViewNode] from a JSON object.
172-
factory GridViewNode.fromJson(Map json) => _$GridViewNodeFromJson(json);
173-
174-
@override
175-
Map toJson() => _$GridViewNodeToJson(this);
176-
177171
/// Returns the appropriate alignment of the child based on the
178172
/// [scrollDirection] and [reverse] properties.
179-
AlignmentModel childAlignment() {
173+
AlignmentModel gridChildAlignment() {
180174
switch (scrollDirection) {
181175
case AxisC.horizontal:
182176
return reverse ? AlignmentModel.topRight : AlignmentModel.topLeft;
183177
case AxisC.vertical:
184178
return reverse ? AlignmentModel.bottomLeft : AlignmentModel.topLeft;
185179
}
186180
}
181+
182+
/// Creates a [GridViewNode] from a JSON object.
183+
factory GridViewNode.fromJson(Map json) => _$GridViewNodeFromJson(json);
184+
185+
@override
186+
Map toJson() => _$GridViewNodeToJson(this);
187187
}
188188

189189
/// The properties of a [GridViewNode].

0 commit comments

Comments
 (0)