countReplacements static method

int countReplacements(
  1. String text
)

Implementation

static int countReplacements(String text) {
  return text.codeUnits
      .where(
          (int u) => u == ChipsInputEditingController.kObjectReplacementChar)
      .length;
}