FancyOutlinedButton.icon constructor
const
FancyOutlinedButton.icon({
- Key? key,
- bool? isEnabled,
- required VoidCallback? onPressed,
- required Widget icon,
- required Widget label,
- bool isLoading = false,
- Widget? loadingLabel,
- Widget? loadingIndicator,
- ButtonStyle? style,
Creates an OutlinedButton with a leading icon.
Use isEnabled
to avoid ternary statements for onPressed
— you can
disable the button with:
isEnabled: false
oronPressed: null
child
, icon
and isLoading
must not be null.
Implementation
const FancyOutlinedButton.icon({
super.key,
super.isEnabled,
required super.onPressed,
required Widget super.icon,
required Widget label,
super.isLoading,
Widget? loadingLabel,
super.loadingIndicator,
super.style,
}) : super(
child: label,
loadingChild: loadingLabel,
);