Skip to content

Commit

Permalink
composable widgets of Shadow are private for now
Browse files Browse the repository at this point in the history
  • Loading branch information
suragch committed Jul 24, 2024
1 parent ae8e149 commit 9583f3b
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions lib/src/drawing_and_graphics/shadow.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ class Shadow extends StatelessWidget {
children: [
Transform.translate(
offset: Offset(x, y),
child: Blur(
child: _Blur(
sigmaX: radius,
sigmaY: radius,
Tint(
_Tint(
color: color,
Desaturate(
_Desaturate(
child,
// The Desaturate widget removes all transparency from the
// whatever color the child widget is so that the shadow
Expand All @@ -69,10 +69,9 @@ class Shadow extends StatelessWidget {
}

/// A widget that applies a blur filter to its child widget.
class Blur extends StatelessWidget {
const Blur(
class _Blur extends StatelessWidget {
const _Blur(
this.child, {
super.key,
this.sigmaX = 5.0,
this.sigmaY = 5.0,
});
Expand Down Expand Up @@ -106,10 +105,9 @@ class Blur extends StatelessWidget {
/// A widget that applies a color filter to its child widget.
///
/// You must specify a color.
class Tint extends StatelessWidget {
const Tint(
class _Tint extends StatelessWidget {
const _Tint(
this.child, {
super.key,
required this.color,
});

Expand All @@ -132,10 +130,9 @@ class Tint extends StatelessWidget {
}

/// A widget that removes the RGB saturation of its child widget.
class Desaturate extends StatelessWidget {
const Desaturate(
class _Desaturate extends StatelessWidget {
const _Desaturate(
this.child, {
super.key,
required this.retainAlpha,
});

Expand Down

0 comments on commit 9583f3b

Please sign in to comment.