Skip to content

Commit

Permalink
fix: Follow pedantic code style where required
Browse files Browse the repository at this point in the history
  • Loading branch information
ema987 committed May 13, 2021
1 parent 08e1203 commit eeaaf28
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/paddinger/lib/src/padding_constant_name.dart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const String PADDING_CONST_PREFIX = "PADDING_";
const String PADDING_CONST_PREFIX = 'PADDING_';
2 changes: 1 addition & 1 deletion packages/paddinger/lib/src/padding_constant_validator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import 'package:paddinger/src/padding_constant_name.dart';
void validatePaddingConstantName(String constantName) {
if (!constantName.startsWith(PADDING_CONST_PREFIX)) {
throw Exception(
"Padding const names must start with $PADDING_CONST_PREFIX");
'Padding const names must start with $PADDING_CONST_PREFIX');
}
}
8 changes: 4 additions & 4 deletions packages/paddinger/lib/src/padding_widgets_generators.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ String _addOnlyPaddings(String paddingName, String constantName) {
final onlyPaddingKeys = PaddingDirection.values
.map((paddingDirection) => paddingDirection.asPascalCase);
final onlyPaddingWidgets = onlyPaddingKeys.map((paddingKey) => '''
class ${paddingName}${paddingKey}Padding extends Padding {
const ${paddingName}${paddingKey}Padding({Key? key, required Widget child})
class $paddingName${paddingKey}Padding extends Padding {
const $paddingName${paddingKey}Padding({Key? key, required Widget child})
: super(
key: key,
padding: const EdgeInsets.only(${paddingKey.toLowerCase()}: $constantName),
Expand Down Expand Up @@ -92,8 +92,8 @@ String _addMissingCombinationPaddings(String paddingName, String constantName) {
];
final missingCombinationPaddingWidgets =
missingCombinationPaddingKeys.map((paddingKey) => '''
class ${paddingName}${paddingKey.horizontalAsPascalCase}${paddingKey.verticalAsPascalCase}Padding extends Padding {
const ${paddingName}${paddingKey.horizontalAsPascalCase}${paddingKey.verticalAsPascalCase}Padding({Key? key, required Widget child})
class $paddingName${paddingKey.horizontalAsPascalCase}${paddingKey.verticalAsPascalCase}Padding extends Padding {
const $paddingName${paddingKey.horizontalAsPascalCase}${paddingKey.verticalAsPascalCase}Padding({Key? key, required Widget child})
: super(
key: key,
padding: const EdgeInsets.only(${paddingKey.horizontalAsCamelCase}: $constantName, ${paddingKey.verticalAsCamelCase}: $constantName),
Expand Down

0 comments on commit eeaaf28

Please sign in to comment.