Flutter EdgeInsets Generator
Turn a spacing specification into a Flutter EdgeInsets expression. Choose all for equal spacing, symmetric for matching horizontal and vertical pairs, only for named physical edges, or fromLTRB for positional left-top-right-bottom values. The output uses numeric literals that can be pasted into a Padding widget or a Container padding property. These are logical pixels, not device pixels. The generator does not measure your layout or decide what spacing is appropriate for a particular screen size.
Your workspace
Runs locally in your browserOnly values for the selected constructor are used.
Result
Your input is processed locally in your browser unless explicitly stated otherwise. Inputs are not saved by this tool.
How to use this tool
Choose a constructor, edit its applicable spacing values and generate Dart. Values for other constructors are ignored.
Example
Input
Symmetric: horizontal 16, vertical 8Output
EdgeInsets.symmetric(horizontal: 16, vertical: 8)What does this tool do?
Use EdgeInsets.all(16) when all four edges share a value. EdgeInsets.symmetric(horizontal: 16, vertical: 8) applies sixteen to left and right and eight to top and bottom. EdgeInsets.only(top: 8, left: 12) names individual edges; this generator prints all four named values, including zeros, to make the result explicit. fromLTRB uses a fixed positional order, so do not read its first argument as top.
Common mistakes and limitations
Physical left and right do not reverse in right-to-left layouts. For language-aware start/end spacing, use EdgeInsetsDirectional in your project; this tool intentionally generates EdgeInsets only. All constructors here accept non-negative finite values up to 10000. Zero removes spacing on an edge. Decimal values are allowed, although a consistent spacing scale often makes an interface easier to maintain.
Frequently asked questions
Does symmetric use one value for every edge?
No. Horizontal applies to left/right and vertical applies to top/bottom.
Related tools
Flutter BorderRadius Generator
Generate circular or per-corner Flutter BorderRadius expressions.
Open tool Flutter & Dart ToolsFlutter BoxShadow Generator
Generate Flutter BoxShadow code from color, opacity, blur, spread and offset.
Open tool Flutter & Dart ToolsFlutter Color Converter
Convert HEX and RGB to Flutter ARGB color literals.
Open tool Flutter & Dart ToolsDart / Flutter Package Name Generator
Turn project names into valid Dart package names.
Open tool