[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 //s1 -- Content
this.loadingContent, this.loadingContent,
required this.content, required this.content,
}); }) : assert(heightSizingStrategy != SizingStrategy.fill, 'Height strategy cannot be fill');
@override @override
State<AstromicStateButton> createState() => _AstromicStateButtonState(); State<AstromicStateButton> createState() => _AstromicStateButtonState();
@@ -160,15 +160,22 @@ class _AstromicStateButtonState extends State<AstromicStateButton> {
//!SECTION //!SECTION
//SECTION - Build Return //SECTION - Build Return
return SizedBox( return Row(
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(
mainAxisSize: widget.widthSizingStrategy == SizingStrategy.hug ? MainAxisSize.min : MainAxisSize.max, mainAxisSize: widget.widthSizingStrategy == SizingStrategy.hug ? MainAxisSize.min : MainAxisSize.max,
children: [ 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 //!SECTION
} }