This commit is contained in:
2025-02-11 15:26:44 +02:00
parent 4a0ff120f7
commit 40f17efd30
28 changed files with 580 additions and 781 deletions

View File

@@ -58,75 +58,65 @@ class AstromicWidgets {
);
//S1 -- IMAGE
static Widget image(
BuildContext context, {
//S1 -- Asset
static Widget image({
String? assetPath,
String? assetURL,
Uint8List? assetBytes,
String? assetFallback,
//S1 -- Sizing | Width
double? wFactor,
double? minW,
double? maxW,
ImageSizingMaster? sizingMaster,
(double factor, double? min, double? max)? widthSizing,
/// Used when the width is Master and want to set fixed width OR if height is Master and want to constraint the width
double? fixedWidth,
//S1 -- Sizing | Width
bool useHeight = false,
double? hFactor,
double? minH,
double? maxH,
(double factor, double? min, double? max)? heightSizing,
/// Used when the height is Master and want to set fixed height OR if width is Master and want to constraint the height
double? fixedHeight,
//S1 -- STYLING
bool circular = false,
double? border,
bool? isCircular,
double? borderWidth,
Color? borderColor,
EdgeInsetsGeometry? borderPadding,
BorderRadiusGeometry radius = BorderRadius.zero,
BorderRadiusGeometry? radius,
List<BoxShadow>? shadow,
//S1 -- SVG FILTERS
Color? color,
BlendMode? blend,
//S1 -- CONFIGS
BoxFit fit = BoxFit.cover,
Alignment alignment = Alignment.center,
LinearGradient? linearGradient,
//S1 -- STATE
Widget? loadingWidget,
Widget? errorWidget,
Color? overlayColor,
Gradient? overlayGradient,
Alignment? alignment,
BoxFit? fit,
BlendMode? blendMode,
Curve? fadeInCurve,
Duration? fadeInDuration,
Color? svgColor,
Widget Function(int? loadedBytes, int? totalBytesToLoad)? loadingWidget,
Widget Function(dynamic error, StackTrace? stackTrace)? errorWidget,
}) =>
astromicImage(
context,
//
AstromicImage(
assetPath: assetPath,
assetURL: assetURL,
assetBytes: assetBytes,
assetFallback: assetFallback,
//
wFactor: wFactor,
minW: minW,
maxW: maxW,
sizingMaster: sizingMaster,
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
fixedWidth: fixedWidth,
//
useHeight: useHeight,
hFactor: hFactor,
minH: minH,
maxH: maxH,
heightSizing: heightSizing,
/// Used when the height is Master and want to set fixed height OR if width is Master and want to constraint the height
fixedHeight: fixedHeight,
//
circular: circular,
border: border,
isCircular: isCircular,
borderWidth: borderWidth,
borderColor: borderColor,
borderPadding: borderPadding,
radius: radius,
shadow: shadow,
//
color: color,
blend: blend,
//
fit: fit,
overlayColor: overlayColor,
overlayGradient: overlayGradient,
alignment: alignment,
linearGradient: linearGradient,
//
fit: fit,
blendMode: blendMode,
fadeInCurve: fadeInCurve,
fadeInDuration: fadeInDuration,
svgColor: svgColor,
loadingWidget: loadingWidget,
errorWidget: errorWidget,
);