This commit is contained in:
Chen Li
2025-08-12 13:36:42 +08:00
parent 8191bef32e
commit 130755f9e1
47 changed files with 3728 additions and 761 deletions

View File

@@ -2,22 +2,25 @@ import 'package:flutter/material.dart';
class GradientBackground extends StatelessWidget {
final Widget child;
final List<Color> colors;
final BorderRadius? borderRadius;
const GradientBackground({super.key, required this.child});
const GradientBackground(
{super.key,
required this.child,
required this.colors,
this.borderRadius});
@override
Widget build(BuildContext context) {
return Container(
decoration: const BoxDecoration(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color(0xFF451663),
Color(0xFF17042B),
Color(0xFF0B021D),
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: colors,
),
borderRadius: borderRadius,
),
child: child,
);