bottom_shadow.dart 692 B

1234567891011121314151617181920212223242526
  1. import 'package:flutter/material.dart';
  2. class BottomShadowWidget extends StatelessWidget {
  3. final double offsetDy;
  4. final Color? shadowColor;
  5. const BottomShadowWidget({this.offsetDy = 28, this.shadowColor, Key? key})
  6. : super(key: key);
  7. @override
  8. Widget build(BuildContext context) {
  9. return Container(
  10. height: 8,
  11. decoration: BoxDecoration(
  12. color: Colors.transparent,
  13. boxShadow: [
  14. BoxShadow(
  15. color: shadowColor ?? Theme.of(context).backgroundColor,
  16. spreadRadius: 42,
  17. blurRadius: 42,
  18. offset: Offset(0, offsetDy), // changes position of shadow
  19. ),
  20. ],
  21. ),
  22. );
  23. }
  24. }