FIcon constructor

FIcon(
  1. FIconType type, {
  2. Key? key,
  3. double? width,
  4. double? height,
  5. FColorI fColor = FColor.lightBlack,
  6. BoxFit fit = BoxFit.contain,
  7. AlignmentGeometry alignment = Alignment.center,
  8. String package = 'fidooo_design_system',
  9. SvgTheme theme = const SvgTheme(),
  10. String? semanticsLabel,
  11. bool allowDrawingOutsideViewBox = false,
  12. bool matchTextDirection = false,
  13. Clip clipBehavior = Clip.hardEdge,
  14. bool excludeFromSemantics = false,
  15. AssetBundle? bundle,
  16. WidgetBuilder? placeholderBuilder,
})

Fidooo Icon Widget

Implementation

FIcon(
  FIconType type, {
  Key? key,
  double? width,
  double? height,
  this.fColor = FColor.lightBlack,
  BoxFit fit = BoxFit.contain,
  AlignmentGeometry alignment = Alignment.center,
  String package = 'fidooo_design_system',
  SvgTheme theme = const SvgTheme(),
  String? semanticsLabel,
  bool allowDrawingOutsideViewBox = false,
  bool matchTextDirection = false,
  Clip clipBehavior = Clip.hardEdge,
  bool excludeFromSemantics = false,
  AssetBundle? bundle,
  WidgetBuilder? placeholderBuilder,
  // ... any other properties we want to expose from SvgPicture
})  : _svgPicture = SvgPicture.asset(
        type.path,
        width: width,
        height: height,
        fit: fit,
        package: package,
        alignment: alignment,
        theme: theme,
        semanticsLabel: semanticsLabel,
        allowDrawingOutsideViewBox: allowDrawingOutsideViewBox,
        matchTextDirection: matchTextDirection,
        clipBehavior: clipBehavior,
        colorFilter: ColorFilter.mode(fColor.color, BlendMode.srcIn),
        excludeFromSemantics: excludeFromSemantics,
        bundle: bundle,
        placeholderBuilder: placeholderBuilder,
        // ... forward any other properties
      ),
      super(key: key);