You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
610 B
Dart
27 lines
610 B
Dart
4 years ago
|
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,
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
child: child,
|
||
|
);
|
||
|
}
|
||
|
}
|