icon static method

SingleChildModifier icon({
  1. Key? key,
  2. Key? modifierKey,
  3. required VoidCallback? onPressed,
  4. VoidCallback? onLongPress,
  5. ButtonStyle? style,
  6. FocusNode? focusNode,
  7. bool? autofocus,
  8. Clip? clipBehavior,
  9. required Widget icon,
  10. required Widget label,
})

Create a text button from a pair of widgets that serve as the button's icon and label.

The icon and label are arranged in a row and padded by 12 logical pixels at the start, and 16 at the end, with an 8 pixel gap in between.

The icon and label arguments must not be null.

Implementation

static SingleChildModifier icon({
  Key? key,
  Key? modifierKey,
  required VoidCallback? onPressed,
  VoidCallback? onLongPress,
  ButtonStyle? style,
  FocusNode? focusNode,
  bool? autofocus,
  Clip? clipBehavior,
  required Widget icon,
  required Widget label,
}) =>
    _OutlinedButtonWithIcon(
      autofocus: autofocus,
      key: key,
      modifierKey: modifierKey,
      clipBehavior: clipBehavior,
      focusNode: focusNode,
      onLongPress: onLongPress,
      style: style,
      onPressed: onPressed,
      icon: icon,
      label: label,
    );