This commit is contained in:
2025-03-04 18:57:05 +02:00
parent d3b6bc5b38
commit 7654acd887
2 changed files with 17 additions and 17 deletions

View File

@@ -57,26 +57,26 @@ class AstromicImage extends StatelessWidget {
this.assetBytes, this.assetBytes,
this.assetFallback, this.assetFallback,
// //
this.sizingMaster = ImageSizingMaster.w, this.sizingMaster ,
this.widthSizing, this.widthSizing,
this.heightSizing, this.heightSizing,
this.fixedWidth, this.fixedWidth,
this.fixedHeight, this.fixedHeight,
// //
this.isCircular = false, this.isCircular,
this.borderWidth, this.borderWidth,
this.borderColor, this.borderColor,
this.borderPadding, this.borderPadding,
this.radius = BorderRadius.zero, this.radius,
this.shadow, this.shadow,
this.overlayColor, this.overlayColor,
this.overlayGradient, this.overlayGradient,
// //
this.fit = BoxFit.cover, this.fit,
this.alignment = Alignment.center, this.alignment,
this.blendMode, this.blendMode,
this.fadeInCurve = Curves.ease, this.fadeInCurve,
this.fadeInDuration = const Duration(milliseconds: 250), this.fadeInDuration,
// //
this.svgColor, this.svgColor,
// //
@@ -112,7 +112,7 @@ class AstromicImage extends StatelessWidget {
/// Used when the height is Master and want to set fixed height OR if width is Master and want to constraint the height /// Used when the height is Master and want to set fixed height OR if width is Master and want to constraint the height
final double? fixedHeight; final double? fixedHeight;
//S1 -- STYLING //S1 -- STYLING
final bool isCircular; final bool? isCircular;
final double? borderWidth; final double? borderWidth;
final Color? borderColor; final Color? borderColor;
final EdgeInsetsGeometry? borderPadding; final EdgeInsetsGeometry? borderPadding;
@@ -223,15 +223,15 @@ class AstromicImage extends StatelessWidget {
color: borderColor ?? const Color(0xff000000), color: borderColor ?? const Color(0xff000000),
) )
: null, : null,
borderRadius: isCircular ? BorderRadius.circular(10000000) : radius, borderRadius: isCircular! ? BorderRadius.circular(10000000) : radius,
boxShadow: shadow, boxShadow: shadow,
), ),
child: isCircular child: isCircular!
? ClipOval( ? ClipOval(
child: isSVG ? finalSVGWidget(size, loadingWidget != null ? loadingWidget!(null, null) : defaultLoadingWidget) : image, child: isSVG ? finalSVGWidget(size, loadingWidget != null ? loadingWidget!(null, null) : defaultLoadingWidget) : image,
) )
: ClipRRect( : ClipRRect(
borderRadius: isCircular ? BorderRadius.circular(10000000) : radius!, borderRadius: isCircular! ? BorderRadius.circular(10000000) : radius!,
child: isSVG ? finalSVGWidget(size, loadingWidget != null ? loadingWidget!(null, null) : defaultLoadingWidget) : image, child: isSVG ? finalSVGWidget(size, loadingWidget != null ? loadingWidget!(null, null) : defaultLoadingWidget) : image,
), ),
), ),

View File

@@ -52,7 +52,7 @@ class AstromicWidgets {
assetURL: assetURL, assetURL: assetURL,
assetBytes: assetBytes, assetBytes: assetBytes,
assetFallback: assetFallback, assetFallback: assetFallback,
sizingMaster: sizingMaster, sizingMaster: sizingMaster ?? ImageSizingMaster.w,
widthSizing: widthSizing, widthSizing: widthSizing,
/// Used when the width is Master and want to set fixed width OR if height is Master and want to constraint the width /// Used when the width is Master and want to set fixed width OR if height is Master and want to constraint the width
@@ -65,15 +65,15 @@ class AstromicWidgets {
borderWidth: borderWidth, borderWidth: borderWidth,
borderColor: borderColor, borderColor: borderColor,
borderPadding: borderPadding, borderPadding: borderPadding,
radius: radius, radius: radius ?? BorderRadius.zero,
shadow: shadow, shadow: shadow,
overlayColor: overlayColor, overlayColor: overlayColor,
overlayGradient: overlayGradient, overlayGradient: overlayGradient,
alignment: alignment, alignment: alignment ?? Alignment.center,
fit: fit, fit: fit ?? BoxFit.cover,
blendMode: blendMode, blendMode: blendMode,
fadeInCurve: fadeInCurve, fadeInCurve: fadeInCurve ?? Curves.ease,
fadeInDuration: fadeInDuration, fadeInDuration: fadeInDuration ?? const Duration(milliseconds: 250),
svgColor: svgColor, svgColor: svgColor,
loadingWidget: loadingWidget, loadingWidget: loadingWidget,
errorWidget: errorWidget, errorWidget: errorWidget,