setAlignment method
Sets alignment on the current block or table cell.
Implementation
void setAlignment(SmartTextAlign alignment) {
final blockIndex = _editorWidgetState?.focusedBlockIndex ?? 0;
final info = focusedTableInfo;
if (info != null) {
_documentController.setCellAlignment(
info.blockIndex, info.row, info.col, alignment);
} else {
_documentController.setAlignment(blockIndex, alignment);
}
_editorWidgetState?.rebuild();
}