ImageButton constructor

const ImageButton({
  1. Key? key,
  2. double spaceSize = 16.0,
  3. required String title,
  4. TextStyle? textStyle,
  5. Color? color,
  6. BoxConstraints? constraints,
  7. EdgeInsetsGeometry? padding,
  8. Decoration? decoration,
  9. Icon? left,
  10. Icon? right,
  11. Icon? top,
  12. Icon? bottom,
  13. VoidCallback? onPressed,
})

Implementation

const ImageButton(
    {Key? key,

    /// 文字和图片间的间距
    this.spaceSize = 16.0,
    required this.title,
    this.textStyle,
    this.color,
    this.constraints,
    this.padding,
    this.decoration,
    this.left,
    this.right,
    this.top,
    this.bottom,
    this.onPressed})
    : assert(title != null),
      assert(
          color == null || decoration == null,
          'Cannot provide both a color and a decoration\n'
          'To provide both, use "decoration: BoxDecoration(color: color)".'),
      super(key: key);