32 lines
847 B
Dart
32 lines
847 B
Dart
import 'package:aves/widgets/common/fx/blurred.dart';
|
|
import 'package:aves/widgets/common/fx/borders.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
const kOverlayBackgroundColor = Colors.black26;
|
|
|
|
class OverlayButton extends StatelessWidget {
|
|
final Animation<double> scale;
|
|
final Widget child;
|
|
|
|
const OverlayButton({Key key, this.scale, this.child}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ScaleTransition(
|
|
scale: scale,
|
|
child: BlurredOval(
|
|
child: Material(
|
|
type: MaterialType.circle,
|
|
color: kOverlayBackgroundColor,
|
|
child: Ink(
|
|
decoration: BoxDecoration(
|
|
border: AvesCircleBorder.build(context),
|
|
shape: BoxShape.circle,
|
|
),
|
|
child: child,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|