From 4da6f50a90e69b92d7a3e002f196a0e7ba92f722 Mon Sep 17 00:00:00 2001 From: Mateusz Pietras Date: Tue, 12 Nov 2024 12:50:47 +0100 Subject: [PATCH] Rename PaginatedCubitLayout parameters --- .../lib/src/paginated/paginated_cubit_layout.dart | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/leancode_cubit_utils/lib/src/paginated/paginated_cubit_layout.dart b/packages/leancode_cubit_utils/lib/src/paginated/paginated_cubit_layout.dart index 21c4eec..c5a6cd9 100644 --- a/packages/leancode_cubit_utils/lib/src/paginated/paginated_cubit_layout.dart +++ b/packages/leancode_cubit_utils/lib/src/paginated/paginated_cubit_layout.dart @@ -38,8 +38,8 @@ class PaginatedCubitLayout extends StatelessWidget { this.physics, this.controller, this.separatorBuilder, - this.headerBuilder, - this.footerBuilder, + this.headerSliverBuilder, + this.footerSliverBuilder, this.initialStateBuilder, this.emptyStateBuilder, this.firstPageLoadingBuilder, @@ -64,10 +64,10 @@ class PaginatedCubitLayout extends StatelessWidget { final IndexedWidgetBuilder? separatorBuilder; /// An optional builder for the header. - final PaginatedWidgetBuilder? headerBuilder; + final PaginatedWidgetBuilder? headerSliverBuilder; /// An optional builder for the footer. - final PaginatedWidgetBuilder? footerBuilder; + final PaginatedWidgetBuilder? footerSliverBuilder; /// An optional builder for the initial state. final PaginatedWidgetBuilder? initialStateBuilder; @@ -93,7 +93,8 @@ class PaginatedCubitLayout extends StatelessWidget { controller: controller, physics: physics, slivers: [ - if (headerBuilder != null) headerBuilder!(context, cubit.state), + if (headerSliverBuilder case final headerSliverBuilder?) + headerSliverBuilder(context, cubit.state), BlocBuilder, PaginatedState>( bloc: cubit, @@ -118,7 +119,8 @@ class PaginatedCubitLayout extends StatelessWidget { }; }, ), - if (footerBuilder != null) footerBuilder!(context, cubit.state), + if (footerSliverBuilder case final footerSliverBuilder?) + footerSliverBuilder(context, cubit.state), ], ); }