Un divisore orizzontale. Per aggiungere un divisore alla scheda del componente aggiuntivo, utilizza newDivider()
all'interno di CardService
. Il seguente esempio crea una scheda semplice con 2
paragrafi separati da un divisore.
function buildCard() { let cardSection1TextParagraph1 = CardService.newTextParagraph() .setText('Hello world!'); let cardSection1Divider1 = CardService.newDivider(); let cardSection1TextParagraph2 = CardService.newTextParagraph() .setText('Hello world!'); let cardSection1 = CardService.newCardSection() .addWidget(cardSection1TextParagraph1) .addWidget(cardSection1Divider1) .addWidget(cardSection1TextParagraph2); let card = CardService.newCardBuilder() .addSection(cardSection1) .build(); return card; }