[DEV] Done with the buttons

This commit is contained in:
2024-05-19 10:18:19 +03:00
parent 2cf19e40b8
commit 343b51a781

View File

@@ -58,7 +58,7 @@ class AstromicStateButton extends StatefulWidget {
//s1 -- Content
this.loadingContent,
required this.content,
});
}) : assert(heightSizingStrategy != SizingStrategy.fill, 'Height strategy cannot be fill');
@override
State<AstromicStateButton> createState() => _AstromicStateButtonState();
@@ -160,15 +160,22 @@ class _AstromicStateButtonState extends State<AstromicStateButton> {
//!SECTION
//SECTION - Build Return
return SizedBox(
width: widget.widthSizingStrategy == SizingStrategy.fixed && widget.style != null ? widget.style!(widget.isEnabled, isHighlighted, isLoading).fixedWidth : null,
height: widget.heightSizingStrategy == SizingStrategy.fixed && widget.style != null ? widget.style!(widget.isEnabled, isHighlighted, isLoading).fixedHeight : null,
child: Row(
return Row(
mainAxisSize: widget.widthSizingStrategy == SizingStrategy.hug ? MainAxisSize.min : MainAxisSize.max,
children: [
baseChild,
],
widget.widthSizingStrategy == SizingStrategy.fill
? Expanded(
child: SizedBox(
height: widget.heightSizingStrategy == SizingStrategy.fixed && widget.style != null ? widget.style!(widget.isEnabled, isHighlighted, isLoading).fixedHeight : null,
child: baseChild,
),
)
: SizedBox(
width: widget.widthSizingStrategy == SizingStrategy.fixed && widget.style != null ? widget.style!(widget.isEnabled, isHighlighted, isLoading).fixedWidth : null,
height: widget.heightSizingStrategy == SizingStrategy.fixed && widget.style != null ? widget.style!(widget.isEnabled, isHighlighted, isLoading).fixedHeight : null,
child: baseChild,
),
],
);
//!SECTION
}