getIndentUnit function
Get the indent unit size (number of columns).
Implementation
int getIndentUnit(EditorState state) {
final unit = state.facet(indentUnit);
if (unit.isEmpty) return 2;
return unit.codeUnitAt(0) == 9 ? state.tabSize : unit.length;
}