From 5d303b25fabe23bbfe496c6e64e7eb5781bb34f6 Mon Sep 17 00:00:00 2001 From: Ketan Choyal Date: Sat, 3 Jun 2023 13:40:19 -0400 Subject: [PATCH] minor bug fixed --- CHANGELOG.md | 3 +++ example/lib/main.dart | 3 +++ lib/CustomButtons/CustomCheckBoxGroup.dart | 9 +++++---- lib/CustomButtons/CustomRadioButton.dart | 7 ++++--- pubspec.yaml | 2 +- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af57471..d8e653b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# [2.2.0+1] - 03 June 2023 +- Deprecated `radius` in favor of `borderRadius` + ## [2.2.0] - 31 March 2023 - Added way to select buttons programmatically (Fix #69) - Fixed bug where buttons were not being selected when value and label were different diff --git a/example/lib/main.dart b/example/lib/main.dart index e88c2ec..a8999d2 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -182,6 +182,9 @@ class GroupedButton extends StatelessWidget { "S", "S", ], + disabledValues: [ + "Monday", + ], buttonValuesList: [ "Monday", "Tuesday", diff --git a/lib/CustomButtons/CustomCheckBoxGroup.dart b/lib/CustomButtons/CustomCheckBoxGroup.dart index 39eec87..7316932 100644 --- a/lib/CustomButtons/CustomCheckBoxGroup.dart +++ b/lib/CustomButtons/CustomCheckBoxGroup.dart @@ -117,6 +117,7 @@ class CustomCheckBoxGroup extends StatefulWidget { final bool enableButtonWrap; /// Radius for non-shape radio button + @Deprecated('Use shapeRadius instead') final double radius; /// Radius for shape radio button @@ -194,8 +195,8 @@ class CustomCheckBoxGroupState extends State> { ? OutlineInputBorder( borderSide: BorderSide(color: _borderColor(e), width: 1), - borderRadius: - BorderRadius.all(Radius.circular(widget.radius)), + borderRadius: BorderRadius.all( + Radius.circular(widget.shapeRadius)), ) : widget.customShape : OutlineInputBorder( @@ -254,8 +255,8 @@ class CustomCheckBoxGroupState extends State> { ? OutlineInputBorder( borderSide: BorderSide(color: _borderColor(e), width: 1), - borderRadius: - BorderRadius.all(Radius.circular(widget.radius)), + borderRadius: BorderRadius.all( + Radius.circular(widget.shapeRadius)), ) : widget.customShape : OutlineInputBorder( diff --git a/lib/CustomButtons/CustomRadioButton.dart b/lib/CustomButtons/CustomRadioButton.dart index cdaa5b5..3588cfc 100644 --- a/lib/CustomButtons/CustomRadioButton.dart +++ b/lib/CustomButtons/CustomRadioButton.dart @@ -121,6 +121,7 @@ class CustomRadioButton extends StatefulWidget { final double elevation; /// Radius for non-shape radio button + @Deprecated('Use shapeRadius instead') final double radius; /// Radius for shape radio button @@ -194,8 +195,8 @@ class CustomRadioButtonState extends State> { OutlineInputBorder( borderSide: BorderSide(color: _borderColor(e), width: 1), - borderRadius: - BorderRadius.all(Radius.circular(widget.radius)), + borderRadius: BorderRadius.all( + Radius.circular(widget.shapeRadius)), ) : OutlineInputBorder( borderSide: BorderSide(color: _borderColor(e), width: 1), @@ -252,7 +253,7 @@ class CustomRadioButtonState extends State> { OutlineInputBorder( borderSide: BorderSide(color: _borderColor(e), width: 1), borderRadius: - BorderRadius.all(Radius.circular(widget.radius)), + BorderRadius.all(Radius.circular(widget.shapeRadius)), ) : OutlineInputBorder( borderSide: BorderSide(color: _borderColor(e), width: 1), diff --git a/pubspec.yaml b/pubspec.yaml index 5d1543a..a7c659e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: custom_radio_grouped_button description: Custom Radio Buttons and Grouped Check Box Button -version: 2.2.0 +version: 2.2.0+1 homepage: https://github.com/ketanchoyal/custom_radio_grouped_button