gridaco / assistant

🤖 Bring your Figma design & development pipeline to the next level - with design to code, in-design-content-management, component management, tools for faster design
https://grida.co/assistant
Other
578 stars 47 forks source link

[interpreter/layout] flutter: layout with left & right stretch, should not have a size in container. (use padding instead) #37

Open softmarshmallow opened 3 years ago

softmarshmallow commented 3 years ago

Assuming the design is fully linted, the layer aligned left & right should not have a size, instead inherit size from the parent, and be responsive with the given margin.

as in flutter, it will be represented as below.


// some layer with responsive settings
var responsiveChild = Container(
     margin: EdgeInsets.from(left: 24, right: 24)
);

// parent of avove layer.
Conainer(
     width: 200,
     child: responsiveChild
);