ente/lib/ui/common/bottom_shadow.dart

29 lines
694 B
Dart
Raw Normal View History

2023-04-10 04:17:45 +00:00
2022-11-01 06:13:06 +00:00
import 'package:flutter/material.dart';
class BottomShadowWidget extends StatelessWidget {
final double offsetDy;
2023-04-10 04:17:45 +00:00
final Color? shadowColor;
const BottomShadowWidget({this.offsetDy = 28, this.shadowColor, Key? key})
2022-11-01 06:13:06 +00:00
: super(key: key);
@override
Widget build(BuildContext context) {
return Container(
height: 8,
decoration: BoxDecoration(
color: Colors.transparent,
boxShadow: [
BoxShadow(
color: shadowColor ?? Theme.of(context).backgroundColor,
spreadRadius: 42,
blurRadius: 42,
offset: Offset(0, offsetDy), // changes position of shadow
),
],
),
);
}
}