shadow method

Widget shadow(
  1. Color color,
  2. double radius,
  3. {required double blur,
  4. double x = 0.0,
  5. double y = 0.0}
)

Changes the TextStyle.shadows for this widget, using a singular shadow.

Implementation

Widget shadow(
  Color color,
  double radius, {
  required double blur,
  double x = 0.0,
  double y = 0.0,
}) {
  return DefaultTextStyle(
    style: TextStyle(
      shadows: <BoxShadow>[
        BoxShadow(
          blurRadius: blur,
          spreadRadius: radius,
          color: color,
          offset: Offset(x, y),
        ),
      ],
    ),
    child: this,
  );
}