GsiButtonConfiguration constructor
GsiButtonConfiguration({
- ButtonType? type,
- ButtonTheme? theme,
- ButtonSize? size,
- ButtonText? text,
- ButtonShape? shape,
- ButtonLogoAlignment? logo_alignment,
- double? width,
- String? locale,
- GsiButtonClickListenerFn? click_listener,
Constructs an options object for the renderButton
method.
Implementation
factory GsiButtonConfiguration({
/// The button type.
ButtonType? type,
/// The button theme.
ButtonTheme? theme,
/// The button size.
ButtonSize? size,
/// The button text.
ButtonText? text,
/// The button shape.
ButtonShape? shape,
/// The Google logo alignment in the button.
ButtonLogoAlignment? logo_alignment,
/// The minimum button width, in pixels.
///
/// The maximum width is 400 pixels.
double? width,
/// The pre-set locale of the button text.
///
/// If not set, the browser's default locale or the Google session user's
/// preference is used.
String? locale,
/// A function to be called when the button is clicked.
GsiButtonClickListenerFn? click_listener,
}) {
return GsiButtonConfiguration._toJS(
type: type.toString().toJS,
theme: theme.toString().toJS,
size: size.toString().toJS,
text: text?.toString().toJS,
shape: shape?.toString().toJS,
logo_alignment: logo_alignment?.toString().toJS,
width: width?.toJS,
locale: locale?.toJS,
click_listener: click_listener?.toJS,
);
}