Il widget Divider
mostra una linea orizzontale che copre la larghezza di una scheda tra widget in pila. La linea è un separatore visivo che aiuta gli utenti a distinguere tra un widget e l'altro, semplificando la scansione e la comprensione delle schede.
Esempio: divisori tra widget
La seguente immagine mostra una scheda composta da Divider
widget tra altri tipi di widget.

divider
.
Ecco il codice JSON della scheda:
JSON
{
"cardsV2": [
{
"cardId": "exampleCard",
"card": {
"sections": [
{
"widgets": [
{
"textParagraph": {
"text": "<b>A card with several types of widgets separated by divider widgets.</b>"
}
},
{
"textParagraph": {
"text": "Set a date and time:"
}
},
{
"divider": {}
},
{
"dateTimePicker": {
"name": "date_time_picker_date_and_time",
"label": "meeting",
"type": 'DATE_AND_TIME',
}
},
{
"textParagraph": {
"text": "A datetime picker widget with just date:"
}
},
{
"divider": {}
},
{
"selectionInput": {
"type": "RADIO_BUTTON",
"label": "Choose an option",
"name": "contactType",
"items": [
{
"text": "Option 1",
"value": "Op1",
"selected": false
},
{
"text": "Option 2",
"value": "Op2",
"selected": false
},
{
"text": "Option 3",
"value": "Op3",
"selected": true
}
]
}
},
{
"textParagraph": {
"text": "Click a button:"
}
},
{
"divider": {}
},
{
"buttonList": {
"buttons": [
{
"text": "Open a hyperlink",
"onClick": {
"openLink": {
"url": "https://developers.google.com/chat",
}
}
},
{
"text": "Run a custom function",
"onClick": {
"action": {
"function": "goToView",
"parameters": [
{
"key": "viewType",
"value": "BIRD EYE VIEW",
}
],
}
}
}
]
}
}
]
}
]
}
}
]
}
Rappresentazione JSON
Visualizza un divisore tra i widget, una linea orizzontale.
Ad esempio, il seguente JSON crea un divisore:
"divider": {
}