From 3c129fe68abec434eb24d2fc8e6b8391efdfacd5 Mon Sep 17 00:00:00 2001 From: mikecoomber Date: Tue, 4 Jun 2024 16:53:25 +0100 Subject: [PATCH] deprecation warnings --- lib/src/components/dropdown/dropdown.dart | 1 + lib/src/components/pagination/pagination.dart | 1 + lib/src/components/search_bar/search_bar.dart | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/src/components/dropdown/dropdown.dart b/lib/src/components/dropdown/dropdown.dart index 52d5f074..311bdfa1 100644 --- a/lib/src/components/dropdown/dropdown.dart +++ b/lib/src/components/dropdown/dropdown.dart @@ -55,6 +55,7 @@ class ZetaDropdown extends StatefulWidget { const ZetaDropdown({ required this.items, this.onChange, + @Deprecated('disabled is deprecated. To disable the dropdown, set onChange to null') bool disabled = false, this.value, this.rounded = true, this.type = ZetaDropdownMenuType.standard, diff --git a/lib/src/components/pagination/pagination.dart b/lib/src/components/pagination/pagination.dart index d0b78a28..252ff2a5 100644 --- a/lib/src/components/pagination/pagination.dart +++ b/lib/src/components/pagination/pagination.dart @@ -26,6 +26,7 @@ class ZetaPagination extends StatefulWidget { this.onChange, this.currentPage = 1, this.rounded = true, + @Deprecated("To disable the pagination, set 'onChange' to null") bool disabled = false, super.key, }) : assert( pages > 0, diff --git a/lib/src/components/search_bar/search_bar.dart b/lib/src/components/search_bar/search_bar.dart index 29bd8049..74d04936 100644 --- a/lib/src/components/search_bar/search_bar.dart +++ b/lib/src/components/search_bar/search_bar.dart @@ -16,6 +16,7 @@ class ZetaSearchBar extends StatefulWidget { this.disabled = false, this.showLeadingIcon = true, this.showSpeechToText = true, + @Deprecated("Use 'disabled' instead") bool enabled = true, }); /// Determines the size of the input field.