Skip to content

Commit 62d4764

Browse files
committed
update example
1 parent a9073a7 commit 62d4764

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

example/staggered_grid.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ class StaggeredGridExample extends StatelessWidget {
4848
id: ConstraintId('horizontalList'),
4949
left: parent.left,
5050
top: parent.top,
51-
margin: const EdgeInsets.only(
52-
left: 100,
53-
),
5451
itemCount: 50,
5552
columnCount: columnCount,
5653
itemBuilder: (index) {

lib/src/constraint_layout.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ List<Widget> constraintGrid({
138138
int currentRowUsedSpanCount = columnCount + 1;
139139
int totalUsedSpanCount = 0;
140140
late int currentRowBarrierCount;
141-
Map<int, ConstraintId> currentSpanSlot = HashMap();
141+
List<ConstraintId?> currentSpanSlot = List.filled(columnCount + 1, null);
142142
for (int i = 0; i < itemCount; i++) {
143143
ConstraintId itemId = ConstraintId(id.id + '_grid_item_$i');
144144
allChildIds.add(itemId);

0 commit comments

Comments
 (0)