Skip to content

Commit 09361a9

Browse files
committed
Responsive Grid Update #2
*Add clip behavior and restoration ID properties.
1 parent 1e8863d commit 09361a9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/responsive_grid.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ class ResponsiveGridView extends StatelessWidget {
3636
final int? semanticChildCount;
3737
final DragStartBehavior dragStartBehavior;
3838
final ScrollViewKeyboardDismissBehavior keyboardDismissBehavior;
39+
final Clip clipBehavior;
40+
final String? restorationId;
3941

4042
ResponsiveGridView.builder({
4143
Key? key,
@@ -58,6 +60,8 @@ class ResponsiveGridView extends StatelessWidget {
5860
this.semanticChildCount,
5961
this.dragStartBehavior = DragStartBehavior.start,
6062
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
63+
this.clipBehavior = Clip.hardEdge,
64+
this.restorationId,
6165
});
6266

6367
@override
@@ -182,6 +186,8 @@ class ResponsiveGridView extends StatelessWidget {
182186
semanticChildCount: semanticChildCount,
183187
dragStartBehavior: dragStartBehavior,
184188
keyboardDismissBehavior: keyboardDismissBehavior,
189+
clipBehavior: clipBehavior,
190+
restorationId: restorationId,
185191
),
186192
);
187193
});
@@ -211,6 +217,8 @@ class _ResponsiveGridViewLayout extends BoxScrollView {
211217
DragStartBehavior dragStartBehavior = DragStartBehavior.start,
212218
ScrollViewKeyboardDismissBehavior keyboardDismissBehavior =
213219
ScrollViewKeyboardDismissBehavior.manual,
220+
String? restorationId,
221+
Clip clipBehavior = Clip.hardEdge,
214222
}) : super(
215223
key: key,
216224
scrollDirection: scrollDirection,
@@ -224,6 +232,8 @@ class _ResponsiveGridViewLayout extends BoxScrollView {
224232
semanticChildCount: semanticChildCount ?? itemCount,
225233
dragStartBehavior: dragStartBehavior,
226234
keyboardDismissBehavior: keyboardDismissBehavior,
235+
restorationId: restorationId,
236+
clipBehavior: clipBehavior,
227237
);
228238

229239
@override

0 commit comments

Comments
 (0)