SignInButton constructor
SignInButton(
- Buttons button, {
- required VoidCallback onPressed,
- bool mini = false,
- EdgeInsets? padding,
- ShapeBorder? shape,
- String? text,
- double? elevation,
- double? iconSize,
- double? fontSize,
- Color? backgroundColor,
- Color? textColor,
- Color? iconColor,
- Color? splashColor,
- Color? highlightColor,
- double? height,
- double? width,
- MainAxisAlignment? contentAlignment,
The constructor is fairly self-explanatory.
Implementation
SignInButton(
this.button, {
required this.onPressed,
this.mini = false,
EdgeInsets? padding,
this.shape,
String? text,
double? elevation,
double? iconSize,
double? fontSize,
Color? backgroundColor,
Color? textColor,
Color? iconColor,
Color? splashColor,
Color? highlightColor,
this.height,
this.width,
MainAxisAlignment? contentAlignment,
}) {
this.padding = padding ?? EdgeInsets.zero;
this.elevation = elevation ?? 1.0;
this.iconSize = iconSize ?? 14.0;
this.fontSize = fontSize ?? 14.0;
buttonDescriptor = buttonConfig.firstWhere((element) => element.type == button);
this.textColor = textColor ?? defaultColor;
this.iconColor = iconColor ?? defaultColor;
this.splashColor = splashColor ?? defaultColor.withOpacity(0.3);
this.backgroundColor =
backgroundColor ?? (useProviderColors == true ? buttonDescriptor.backgroundColor : defaultBackgroundColor);
this.highlightColor = highlightColor ?? this.backgroundColor!.withOpacity(0.3);
this.text = text ?? buttonDescriptor.text;
this.contentAlignment = contentAlignment ?? MainAxisAlignment.start;
}