bottomShadow.dart 684 B

12345678910111213141516171819202122232425
  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}) : super(key: key);
  6. @override
  7. Widget build(BuildContext context) {
  8. return Container(
  9. height: 8,
  10. decoration: BoxDecoration(
  11. color: Colors.transparent,
  12. boxShadow: [
  13. BoxShadow(
  14. color: shadowColor ?? Theme.of(context).backgroundColor,
  15. spreadRadius: 42,
  16. blurRadius: 42,
  17. offset: Offset(0, offsetDy), // changes position of shadow
  18. ),
  19. ],
  20. ),
  21. );
  22. }
  23. }