mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-25 15:02:33 +01:00
28 lines
662 B
Dart
28 lines
662 B
Dart
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,
|
|
Theme.of(context).secondaryHeaderColor,
|
|
],
|
|
),
|
|
),
|
|
child: child,
|
|
);
|
|
}
|
|
}
|