Albêr Albêr - 29 days ago 4x
Dart Question

Innerwidth in dartlang?

Is there a way to calculate the inner width of an element in dart? I haven't been able to find a solution so far. JQuery offers the function .innerWidth() but I want to restrict this project to dart only.


The Element class provides a number of properties of type CssRect. These are contentEdge, paddingEdge, borderEdge and marginEdge.

So in order to get the "inner width" (the width of the content and padding) of an element you can retrieve it with:

num innerWidth = element.paddingEdge.width;