Paddinger
Paddinger is a Flutter package to generate Padding widgets.
Given a set of constants like:
A set of Padding classes will be generated like:
NormalAllPadding
NormalLeftPadding
NormalTopPadding
NormalRightPadding
NormalBottomPadding
NormalHorizontalPadding
NormalVerticalPadding
NormalLeftTopPadding
NormalLeftBottomPadding
NormalRightTopPadding
NormalRightBottomPadding
So instead of writing:
you can just write:
How to use it
- Add the following as dependencies:
- Create a file where you will add all your
PADDING_
constants, the file could be namedpaddings.dart
. - Add your favourite
material
orcupertino
import like:
- Add the
part
directive:
- Run the code generation with
flutter pub run build_runner build --delete-conflicting-outputs
Have a look at the example app to see it in practice.
Publishing
Dry Run:
flutter packages pub publish --dry-run
To publish:
flutter packages pub publish