Skip to content

Commit

Permalink
made shadow controlled by card colour
Browse files Browse the repository at this point in the history
  • Loading branch information
garv-shah authored Jul 24, 2022
1 parent 686a6bc commit 84b9c6d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/src/material_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ class _MaterialPickerState extends State<MaterialPicker> {
height: _isPortrait ? null : 60,
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
boxShadow: [BoxShadow(color: Theme.of(context).primaryColorLight.withAlpha(80), blurRadius: 10)],
boxShadow: [BoxShadow(color: Theme.of(context).cardColor, blurRadius: 10)],
border: _isPortrait
? Border(right: BorderSide(color: Theme.of(context).primaryColorLight.withAlpha(80), width: 1))
: Border(top: BorderSide(color: Theme.of(context).primaryColorLight.withAlpha(80), width: 1)),
? Border(right: BorderSide(color: Theme.of(context).cardColor, width: 1))
: Border(top: BorderSide(color: Theme.of(context).cardColor, width: 1)),
),
child: ScrollConfiguration(
behavior: ScrollConfiguration.of(context).copyWith(dragDevices: PointerDeviceKind.values.toSet()),
Expand Down Expand Up @@ -146,7 +146,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
? [
_colorType == Theme.of(context).cardColor
? BoxShadow(
color: Theme.of(context).primaryColorLight.withAlpha(80),
color: Theme.of(context).cardColor,
blurRadius: 10,
)
: BoxShadow(
Expand All @@ -156,7 +156,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
]
: null,
border: _colorType == Theme.of(context).cardColor
? Border.all(color: Theme.of(context).primaryColorLight.withAlpha(80), width: 1)
? Border.all(color: Theme.of(context).cardColor, width: 1)
: null,
),
),
Expand Down Expand Up @@ -207,7 +207,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
? [
(_color == Colors.white) || (_color == Colors.black)
? BoxShadow(
color: Theme.of(context).primaryColorLight.withAlpha(80),
color: Theme.of(context).cardColor,
blurRadius: 10,
)
: BoxShadow(
Expand All @@ -217,7 +217,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
]
: null,
border: (_color == Colors.white) || (_color == Colors.black)
? Border.all(color: Theme.of(context).primaryColorLight.withAlpha(80), width: 1)
? Border.all(color: Theme.of(context).cardColor, width: 1)
: null,
),
child: widget.enableLabel
Expand Down

0 comments on commit 84b9c6d

Please sign in to comment.