Albêr Albêr - 1 year ago 158
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.

Answer Source

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;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download