Skip to content

Commit

Permalink
refactor code and added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
luhluh-17 committed Jun 22, 2020
1 parent 56c15ca commit dc157c7
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions lib/ui/widgets/shadows.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ List<BoxShadow> _shadows({@required Color light, @required Color dark}) {
return shadows;
}

// Rounded rectangle
ConcaveDecoration innerShadow(BuildContext context,
{double radius = _radius}) {
final _theme = Theme.of(context);
Expand All @@ -45,18 +46,7 @@ BoxDecoration outerShadow(BuildContext context, {double radius = _radius}) {
);
}

BoxDecoration outerShadowCircle(BuildContext context) {
final _theme = Theme.of(context);
return BoxDecoration(
shape: BoxShape.circle,
color: _theme.primaryColor,
boxShadow: _shadows(
light: _theme.primaryColorLight,
dark: _theme.primaryColorDark,
),
);
}

// Circle
BoxDecoration innerShadowCircle(BuildContext context) {
final _theme = Theme.of(context);
return BoxDecoration(
Expand All @@ -71,3 +61,15 @@ BoxDecoration innerShadowCircle(BuildContext context) {
],
);
}

BoxDecoration outerShadowCircle(BuildContext context) {
final _theme = Theme.of(context);
return BoxDecoration(
shape: BoxShape.circle,
color: _theme.primaryColor,
boxShadow: _shadows(
light: _theme.primaryColorLight,
dark: _theme.primaryColorDark,
),
);
}

0 comments on commit dc157c7

Please sign in to comment.