int getTokens(String text) { // A simple implementation that approximates token count // You may want to use a more sophisticated tokenizer in production return text.split(RegExp(r'\s+')).length; }