From 20d889bcfb07218264c794233af1f4bae4743970 Mon Sep 17 00:00:00 2001 From: Mateusz Pietras Date: Tue, 12 Nov 2024 12:37:21 +0100 Subject: [PATCH] Update changelog, fix syntax --- packages/leancode_cubit_utils/CHANGELOG.md | 4 ++++ .../lib/src/paginated/paginated_cubit_layout.dart | 8 ++++---- packages/leancode_cubit_utils/pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/leancode_cubit_utils/CHANGELOG.md b/packages/leancode_cubit_utils/CHANGELOG.md index c3e227e..583f389 100644 --- a/packages/leancode_cubit_utils/CHANGELOG.md +++ b/packages/leancode_cubit_utils/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.1 + +* Rename `headerBuilder` and `footerBuilder` to `headerSliverBuilder` and `footerSliverBuilder` in `PaginatedCubitLayout` + ## 0.3.0 * Export `RequestCubitConfig` from `leancode_cubit_utils.dart` 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 0c6aed9..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 @@ -93,8 +93,8 @@ class PaginatedCubitLayout extends StatelessWidget { controller: controller, physics: physics, slivers: [ - if (headerSliverBuilder != null) - headerSliverBuilder!(context, cubit.state), + if (headerSliverBuilder case final headerSliverBuilder?) + headerSliverBuilder(context, cubit.state), BlocBuilder, PaginatedState>( bloc: cubit, @@ -119,8 +119,8 @@ class PaginatedCubitLayout extends StatelessWidget { }; }, ), - if (footerSliverBuilder != null) - footerSliverBuilder!(context, cubit.state), + if (footerSliverBuilder case final footerSliverBuilder?) + footerSliverBuilder(context, cubit.state), ], ); } diff --git a/packages/leancode_cubit_utils/pubspec.yaml b/packages/leancode_cubit_utils/pubspec.yaml index bd40859..970e7ff 100644 --- a/packages/leancode_cubit_utils/pubspec.yaml +++ b/packages/leancode_cubit_utils/pubspec.yaml @@ -1,6 +1,6 @@ name: leancode_cubit_utils description: A collection of cubits and widgets that facilitate the creation of repetitive pages, eliminating boilerplate. -version: 0.3.0 +version: 0.3.1 repository: https://github.com/leancodepl/leancode_cubit_utils environment: