edgeInsets static method
Returns an EdgeInsetsDirectional from the specified list.
The list is a list of doubles. An empty or missing list results in a null return value. The list should have one through four items. Extra items are ignored.
The values are interpreted as follows:
- start: first value.
- top: second value, defaulting to same as start.
- end: third value, defaulting to same as start.
- bottom: fourth value, defaulting to same as top.
Implementation
static List<double>? edgeInsets(EdgeInsetsGeometry? edgeInsets) {
if (edgeInsets == null) {
return null;
}
EdgeInsets insets = edgeInsets.resolve(null);
return [insets.left, insets.top, insets.right, insets.bottom];
}