Using consistent spacing is a simple yet powerful way to improve the quality of your app as explained in this blogpost.
If you don’t want to add another dependency do your project, you can generate EdgeInset
and SizedBox
instances
online.
Usage
- Define your spaces.
- Copy the generated content to your project
- Use consistent spacing in your app.
Padding(
padding: Paddings.allMedium,
child: Column(
children: [
Text('Title'),
Boxes.verticalLarge,
Text('Body'),
Boxes.verticalSmall,
ElevatedButton(onPressed: () {}, child: Text('CTA'))
],
),
);