Skip to content

Commit

Permalink
formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
shivams1110 committed Dec 9, 2024
1 parent 40dc291 commit f906871
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Example extends StatelessWidget {
title: const Text('Simple Example'),
subtitle: const Text(
'A simple example that uses an Infinite List '
'in a StatefulWidget.',
'in a StatefulWidget.',
),
trailing: const Icon(Icons.chevron_right),
),
Expand All @@ -50,8 +50,8 @@ class Example extends StatelessWidget {
title: const Text('Centralized Example'),
subtitle: const Text(
'An example that uses an Infinite List '
'in a StatefulWidget and centralizes the loading, '
'empty and error states.',
'in a StatefulWidget and centralizes the loading, '
'empty and error states.',
),
trailing: const Icon(Icons.chevron_right),
),
Expand All @@ -62,7 +62,7 @@ class Example extends StatelessWidget {
title: const Text('Advanced Example'),
subtitle: const Text(
'An advanced example that uses an Infinite List '
'in combination with a Cubit from the Bloc package.',
'in combination with a Cubit from the Bloc package.',
),
trailing: const Icon(Icons.chevron_right),
),
Expand All @@ -85,7 +85,7 @@ class Example extends StatelessWidget {
title: const Text('Simple Grid Example'),
subtitle: const Text(
'A simple example that uses an Infinite Grid '
'in a StatefulWidget.',
'in a StatefulWidget.',
),
trailing: const Icon(Icons.chevron_right),
),
Expand All @@ -96,7 +96,7 @@ class Example extends StatelessWidget {
title: const Text('Simple Grid Example'),
subtitle: const Text(
'A simple example that uses an Infinite Grid '
'in a StatefulWidget.',
'in a StatefulWidget.',
),
trailing: const Icon(Icons.chevron_right),
),
Expand Down
5 changes: 2 additions & 3 deletions lib/src/infinite_grid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ class InfiniteGrid extends StatelessWidget {
/// {@endtemplate}
final int? Function(Key)? findChildIndexCallback;


/// {@template grid_delegate}
///
/// {@endtemplate}
Expand Down Expand Up @@ -257,9 +256,9 @@ class _ContextualSliverPadding extends StatelessWidget {
if (mediaQuery != null) {
// Automatically pad sliver with padding from MediaQuery.
late final mediaQueryHorizontalPadding =
mediaQuery.padding.copyWith(top: 0, bottom: 0);
mediaQuery.padding.copyWith(top: 0, bottom: 0);
late final mediaQueryVerticalPadding =
mediaQuery.padding.copyWith(left: 0, right: 0);
mediaQuery.padding.copyWith(left: 0, right: 0);
// Consume the main axis padding with SliverPadding.
effectivePadding = scrollDirection == Axis.vertical
? mediaQueryVerticalPadding
Expand Down
2 changes: 1 addition & 1 deletion lib/src/sliver_infinite_grid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class _SliverInfiniteGridState extends State<SliverInfiniteGrid> {
delegate: SliverChildBuilderDelegate(
childCount: effectiveItemCount,
findChildIndexCallback: widget.findChildIndexCallback,
(context, index) {
(context, index) {
if (index == lastItemIndex) {
onBuiltLast(lastItemIndex);
}
Expand Down
1 change: 0 additions & 1 deletion test/infinite_grid_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,5 @@ void main() {
expect(find.byType(CircularProgressIndicator), findsOneWidget);
});
});

});
}

0 comments on commit f906871

Please sign in to comment.