From be1271f2da442bc8839d565cd51a2fae28114d79 Mon Sep 17 00:00:00 2001 From: "Michael W. Aziz" Date: Sat, 18 May 2024 15:46:07 +0300 Subject: [PATCH] [FIX] Null value on the bools --- lib/src/Buttons/buttons.astromic.dart | 8 ++++---- lib/src/Buttons/src/icon_button.dart | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/src/Buttons/buttons.astromic.dart b/lib/src/Buttons/buttons.astromic.dart index 4893a24..42bf3cc 100644 --- a/lib/src/Buttons/buttons.astromic.dart +++ b/lib/src/Buttons/buttons.astromic.dart @@ -68,11 +68,11 @@ class AstromicButtons { onTap: onTap, onHold: onHold, // - isEnabled: isEnabled, - withFeedback: withFeedback, - withHighlightChange: withHighlightChange, + isEnabled: isEnabled ?? true, + withFeedback: withFeedback ?? true, + withHighlightChange: withHighlightChange ?? true, // - isCircular: isCircular, + isCircular: isCircular ?? true, splashFactory: splashFactory, style: style, // diff --git a/lib/src/Buttons/src/icon_button.dart b/lib/src/Buttons/src/icon_button.dart index 8b083f8..5f55dc5 100644 --- a/lib/src/Buttons/src/icon_button.dart +++ b/lib/src/Buttons/src/icon_button.dart @@ -25,12 +25,12 @@ class AstromicIconButton extends StatefulWidget { final void Function(VoidCallback start, VoidCallback stop)? onTap; final Function(VoidCallback start, VoidCallback stop)? onHold; //s1 -- Configurations - final bool? isEnabled; - final bool? withFeedback; - final bool? withHighlightChange; + final bool isEnabled; + final bool withFeedback; + final bool withHighlightChange; //s1 -- Style final InteractiveInkFeatureFactory? splashFactory; - final bool? isCircular; + final bool isCircular; final AstromicButtonStyle Function(bool isEnabled, bool isHighlighted, bool isLoading)? style; //s1 -- Content final Widget? loadingContent; @@ -43,12 +43,12 @@ class AstromicIconButton extends StatefulWidget { this.onTap, this.onHold, // - this.isEnabled = true, - this.withFeedback = true, - this.withHighlightChange = true, + required this.isEnabled, + required this.withFeedback, + required this.withHighlightChange, //s1 -- Style this.splashFactory, - this.isCircular = true, + required this.isCircular, this.style, //s1 -- Content this.loadingContent, @@ -101,7 +101,7 @@ class _AstromicIconButtonState extends State { //s1 -Widgets //----- Widget baseChild = AstromicButtonBase( - isEnabled: widget.isEnabled!, + isEnabled: widget.isEnabled, withFeedback: widget.withFeedback!, withHighlightChange: widget.withHighlightChange!, isFullWidth: false,