| Index: samples/swarm/swarm_ui_lib/view/MeasureText.dart
|
| diff --git a/samples/swarm/swarm_ui_lib/view/MeasureText.dart b/samples/swarm/swarm_ui_lib/view/MeasureText.dart
|
| index d3c40077e01133a8f018f9a18789b77054a4a0b1..3cc1970ab801eb58332b04a05c5d3eca937436f2 100644
|
| --- a/samples/swarm/swarm_ui_lib/view/MeasureText.dart
|
| +++ b/samples/swarm/swarm_ui_lib/view/MeasureText.dart
|
| @@ -45,7 +45,7 @@ class MeasureText {
|
| }
|
|
|
| String quickTruncate(String text, num lineWidth, int maxLines) {
|
| - int targetLength = (lineWidth * maxLines / _typicalCharLength).toInt();
|
| + int targetLength = lineWidth * maxLines ~/ _typicalCharLength;
|
| // Advance to next word break point.
|
| while(targetLength < text.length && !isWhitespace(text[targetLength])) {
|
| targetLength++;
|
|
|