This commit is contained in:
2025-03-12 11:39:18 +02:00
parent 1ebdcb3125
commit 616ab88351

View File

@@ -92,7 +92,8 @@ class AstromicImage extends StatelessWidget {
assert( assert(
(assetPath != null && assetBytes == null && assetURL == null) || (assetPath != null && assetBytes == null && assetURL == null) ||
(assetPath == null && assetBytes != null && assetURL == null) || (assetPath == null && assetBytes != null && assetURL == null) ||
(assetPath == null && assetBytes == null && assetURL != null), (assetPath == null && assetBytes == null && assetURL != null) ||
(assetFallback != null),
'Please specify only ONE Asset Source.', 'Please specify only ONE Asset Source.',
), ),
// Assert that correct sizing plan is provided. // Assert that correct sizing plan is provided.
@@ -255,7 +256,7 @@ class AstromicImage extends StatelessWidget {
//SECTION - Build Return //SECTION - Build Return
return LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) { return LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) {
Size size = _calculateSize(constraints); Size size = _calculateSize(constraints);
return SizedBox(width: size.width == double.infinity? null : size.width, height: size.height == double.infinity? null : size.height, child: buildImage(size)); return SizedBox(width: size.width == double.infinity ? null : size.width, height: size.height == double.infinity ? null : size.height, child: buildImage(size));
}); });
//!SECTION //!SECTION
} }