[FIX] Null value on the bools

This commit is contained in:
2024-05-18 15:46:07 +03:00
parent 0add2c453c
commit be1271f2da
2 changed files with 13 additions and 13 deletions

View File

@@ -68,11 +68,11 @@ class AstromicButtons {
onTap: onTap, onTap: onTap,
onHold: onHold, onHold: onHold,
// //
isEnabled: isEnabled, isEnabled: isEnabled ?? true,
withFeedback: withFeedback, withFeedback: withFeedback ?? true,
withHighlightChange: withHighlightChange, withHighlightChange: withHighlightChange ?? true,
// //
isCircular: isCircular, isCircular: isCircular ?? true,
splashFactory: splashFactory, splashFactory: splashFactory,
style: style, style: style,
// //

View File

@@ -25,12 +25,12 @@ class AstromicIconButton extends StatefulWidget {
final void Function(VoidCallback start, VoidCallback stop)? onTap; final void Function(VoidCallback start, VoidCallback stop)? onTap;
final Function(VoidCallback start, VoidCallback stop)? onHold; final Function(VoidCallback start, VoidCallback stop)? onHold;
//s1 -- Configurations //s1 -- Configurations
final bool? isEnabled; final bool isEnabled;
final bool? withFeedback; final bool withFeedback;
final bool? withHighlightChange; final bool withHighlightChange;
//s1 -- Style //s1 -- Style
final InteractiveInkFeatureFactory? splashFactory; final InteractiveInkFeatureFactory? splashFactory;
final bool? isCircular; final bool isCircular;
final AstromicButtonStyle Function(bool isEnabled, bool isHighlighted, bool isLoading)? style; final AstromicButtonStyle Function(bool isEnabled, bool isHighlighted, bool isLoading)? style;
//s1 -- Content //s1 -- Content
final Widget? loadingContent; final Widget? loadingContent;
@@ -43,12 +43,12 @@ class AstromicIconButton extends StatefulWidget {
this.onTap, this.onTap,
this.onHold, this.onHold,
// //
this.isEnabled = true, required this.isEnabled,
this.withFeedback = true, required this.withFeedback,
this.withHighlightChange = true, required this.withHighlightChange,
//s1 -- Style //s1 -- Style
this.splashFactory, this.splashFactory,
this.isCircular = true, required this.isCircular,
this.style, this.style,
//s1 -- Content //s1 -- Content
this.loadingContent, this.loadingContent,
@@ -101,7 +101,7 @@ class _AstromicIconButtonState extends State<AstromicIconButton> {
//s1 -Widgets //s1 -Widgets
//----- //-----
Widget baseChild = AstromicButtonBase( Widget baseChild = AstromicButtonBase(
isEnabled: widget.isEnabled!, isEnabled: widget.isEnabled,
withFeedback: widget.withFeedback!, withFeedback: widget.withFeedback!,
withHighlightChange: widget.withHighlightChange!, withHighlightChange: widget.withHighlightChange!,
isFullWidth: false, isFullWidth: false,