Skip to content

Commit

Permalink
move defaults to the parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
miDeb committed Mar 6, 2021
1 parent 9bbdea8 commit 399333b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/src/badge_position.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ class BadgePosition {

/// Factory method that creates a new instance of this widget
/// according to [top] and [start]
factory BadgePosition.topStart({double? top, double? start}) {
return BadgePosition(top: top ?? -5, start: start ?? -10);
factory BadgePosition.topStart({double top = -5, double start = -10}) {
return BadgePosition(top: top, start: start);
}

/// Factory method that creates a new instance of this widget
/// according to [top] and [end]
factory BadgePosition.topEnd({double? top, double? end}) {
return BadgePosition(top: top ?? -8, end: end ?? -10);
factory BadgePosition.topEnd({double top = -8, double end = -10}) {
return BadgePosition(top: top, end: end);
}

/// Factory method that creates a new instance of this widget
/// according to [bottom] and [end]
factory BadgePosition.bottomEnd({double? bottom, double? end}) {
return BadgePosition(bottom: bottom ?? -8, end: end ?? -10);
factory BadgePosition.bottomEnd({double bottom = -8, double end = -10}) {
return BadgePosition(bottom: bottom, end: end);
}

/// Factory method that creates a new instance of this widget
/// according to [bottom] and [start]
factory BadgePosition.bottomStart({double? bottom, double? start}) {
return BadgePosition(bottom: bottom ?? -8, start: start ?? -10);
factory BadgePosition.bottomStart({double bottom = -8, double start = -10}) {
return BadgePosition(bottom: bottom, start: start);
}
}

0 comments on commit 399333b

Please sign in to comment.