Google Apps Chat V1 Client - Class MaterialIcon (0.1.3)

Reference documentation and code samples for the Google Apps Chat V1 Client class MaterialIcon.

A Google Material Icon, which includes over 2500+ options.

For example, to display a checkbox icon with customized weight and grade, write the following:

{
  "name": "check_box",
  "fill": true,
  "weight": 300,
  "grade": -25
}

Google Chat apps:

Generated from protobuf message google.apps.card.v1.MaterialIcon

Namespace

Google \ Apps \ Card \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

The icon name defined in the Google Material Icon, for example, check_box. Any invalid names are abandoned and replaced with empty string and results in the icon failing to render.

↳ fill bool

Whether the icon renders as filled. Default value is false. To preview different icon settings, go to Google Font Icons and adjust the settings under Customize.

↳ weight int

The stroke weight of the icon. Choose from {100, 200, 300, 400, 500, 600, 700}. If absent, default value is 400. If any other value is specified, the default value is used. To preview different icon settings, go to Google Font Icons and adjust the settings under Customize.

↳ grade int

Weight and grade affect a symbol’s thickness. Adjustments to grade are more granular than adjustments to weight and have a small impact on the size of the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If any other value is specified, the default value is used. To preview different icon settings, go to Google Font Icons and adjust the settings under Customize.

getName

The icon name defined in the Google Material Icon, for example, check_box. Any invalid names are abandoned and replaced with empty string and results in the icon failing to render.

Returns
Type Description
string

setName

The icon name defined in the Google Material Icon, for example, check_box. Any invalid names are abandoned and replaced with empty string and results in the icon failing to render.

Parameter
Name Description
var string
Returns
Type Description
$this

getFill

Whether the icon renders as filled. Default value is false.

To preview different icon settings, go to Google Font Icons and adjust the settings under Customize.

Returns
Type Description
bool

setFill

Whether the icon renders as filled. Default value is false.

To preview different icon settings, go to Google Font Icons and adjust the settings under Customize.

Parameter
Name Description
var bool
Returns
Type Description
$this

getWeight

The stroke weight of the icon. Choose from {100, 200, 300, 400, 500, 600, 700}. If absent, default value is 400. If any other value is specified, the default value is used.

To preview different icon settings, go to Google Font Icons and adjust the settings under Customize.

Returns
Type Description
int

setWeight

The stroke weight of the icon. Choose from {100, 200, 300, 400, 500, 600, 700}. If absent, default value is 400. If any other value is specified, the default value is used.

To preview different icon settings, go to Google Font Icons and adjust the settings under Customize.

Parameter
Name Description
var int
Returns
Type Description
$this

getGrade

Weight and grade affect a symbol’s thickness. Adjustments to grade are more granular than adjustments to weight and have a small impact on the size of the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If any other value is specified, the default value is used.

To preview different icon settings, go to Google Font Icons and adjust the settings under Customize.

Returns
Type Description
int

setGrade

Weight and grade affect a symbol’s thickness. Adjustments to grade are more granular than adjustments to weight and have a small impact on the size of the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If any other value is specified, the default value is used.

To preview different icon settings, go to Google Font Icons and adjust the settings under Customize.

Parameter
Name Description
var int
Returns
Type Description
$this