XButton.file constructor

XButton.file({
  1. required String path,
  2. double width = 24,
  3. double height = 24,
  4. double? size,
  5. BoxFit fit = BoxFit.cover,
  6. VoidCallback? onPressed,
  7. VoidCallback? onLongPressed,
  8. XButtonType? buttonType,
  9. XButtonShape? buttonShape,
  10. BorderRadiusGeometry? borderRadius,
  11. Color? overlayColor,
  12. Size? minSize,
  13. EdgeInsetsGeometry? padding,
})

Implementation

XButton.file(
    {required String path,
    double width = 24,
    double height = 24,
    double? size,
    BoxFit fit = BoxFit.cover,
    this.onPressed,
    this.onLongPressed,
    this.buttonType,
    this.buttonShape,
    this.borderRadius,
    this.overlayColor,
    this.minSize,
    this.padding})
    : child = Image.file(File(path),
          width: size ?? width, height: size ?? height);