Index: samples/swarm/swarm_ui_lib/layout/ViewLayout.dart |
diff --git a/samples/swarm/swarm_ui_lib/layout/ViewLayout.dart b/samples/swarm/swarm_ui_lib/layout/ViewLayout.dart |
index 4b60138752b86a4e8412c739118fe97b513440ac..973e23c603818e73c7754db291af2733a80f76c9 100644 |
--- a/samples/swarm/swarm_ui_lib/layout/ViewLayout.dart |
+++ b/samples/swarm/swarm_ui_lib/layout/ViewLayout.dart |
@@ -229,7 +229,7 @@ class ViewLayout { |
} |
if (style.endsWith('%')) { |
num percent = double.parse(style.substring(0, style.length - 1)); |
- return ((percent / 100) * parentSize).toInt(); |
+ return ((percent / 100) * parentSize).truncate(); |
} |
return _toPixels(style); |
} |