2021-08-29 11:29:14 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class BackgroundGradientBox extends StatelessWidget {
|
|
|
|
final Widget child;
|
|
|
|
const BackgroundGradientBox({
|
|
|
|
Key key,
|
|
|
|
this.child,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
gradient: LinearGradient(
|
|
|
|
begin: Alignment.topRight,
|
|
|
|
end: Alignment.bottomLeft,
|
|
|
|
colors: [
|
|
|
|
Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
Theme.of(context).secondaryHeaderColor,
|
2021-08-29 16:49:48 +02:00
|
|
|
Theme.of(context).secondaryHeaderColor,
|
2021-08-29 11:29:14 +02:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: child,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|