CustomAuthButton constructor
CustomAuthButton({
- required AuthIcon authIcon,
- Key? key,
- VoidCallback? onPressed,
- VoidCallback? onLongPress,
- ValueChanged<
bool> ? onHover, - ValueChanged<
bool> ? onFocusChange, - FocusNode? focusNode,
- bool? autofocus,
- String? text,
- @Deprecated('Use ThemeMode instead. ' 'This property has no more effect. ' 'This feature was deprecated after v3.0.0') bool darkMode = false,
- @Deprecated('Use TextDirection instead. ' 'This property has no more effect. ' 'This feature was deprecated after v3.0.0') bool rtl = false,
- bool isLoading = false,
- AuthButtonStyle style = const AuthButtonStyle(),
- ButtonStyle? materialStyle,
- ThemeMode themeMode = ThemeMode.system,
- TextDirection textDirection = TextDirection.ltr,
Implementation
CustomAuthButton({
required this.authIcon,
super.key,
super.onPressed,
super.onLongPress,
super.onHover,
super.onFocusChange,
super.focusNode,
super.autofocus,
super.text,
@Deprecated(
'Use ThemeMode instead. '
'This property has no more effect. '
'This feature was deprecated after v3.0.0',
)
bool darkMode = false,
@Deprecated(
'Use TextDirection instead. '
'This property has no more effect. '
'This feature was deprecated after v3.0.0',
)
bool rtl = false,
super.isLoading = false,
super.style,
super.materialStyle,
super.themeMode,
super.textDirection,
}) : assert(
(style.buttonType != AuthButtonType.icon)
? text != null && text.isNotBlank
: text == null,
(style.buttonType != AuthButtonType.icon)
? 'Text must be not blank.'
: 'Icon button type does not need a text.',
);