Skip to content

Commit

Permalink
added color in refreshIndicator
Browse files Browse the repository at this point in the history
  • Loading branch information
twaflutterpackages committed Nov 25, 2021
1 parent 72bcef1 commit 582fc0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/pagination_view.dart
Expand Up @@ -20,6 +20,7 @@ class PaginationView<T> extends StatefulWidget {
required this.onEmpty,
required this.onError,
this.pullToRefresh = false,
this.color = Colors.blue,
this.gridDelegate =
const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2),
List<T>? preloadedItems,
Expand Down Expand Up @@ -50,6 +51,7 @@ class PaginationView<T> extends StatefulWidget {
final ScrollPhysics? physics;
final List<T> preloadedItems;
final bool pullToRefresh;
final Color color;
final bool reverse;
final ScrollController? scrollController;
final Axis scrollDirection;
Expand Down Expand Up @@ -98,6 +100,7 @@ class PaginationViewState<T> extends State<PaginationView<T>> {
} else if (state is PaginationError<T>) {
if (widget.pullToRefresh) {
return RefreshIndicator(
color: widget.color,
onRefresh: refresh,
child: _buildSingleWidgetView(widget.onError(state.error)),
);
Expand Down

0 comments on commit 582fc0d

Please sign in to comment.