How to get number's length in Dart? You can try this. int i = 1050000; int length = i.toString().length; // 7