import 'package:flutter/material.dart'; import '../utils/Colors.dart'; /// App-wide ambient backdrop: a solid base with soft, blurred brand-tinted /// glows sitting behind the (transparent) scaffolds. Deliberately restrained — /// the warm vermilion anchors the brand, a cool counter-tone adds depth. class Backdrop extends StatelessWidget { final Widget child; const Backdrop({super.key, required this.child}); @override Widget build(BuildContext context) { final jp = context.jp; final dark = Theme.of(context).brightness == Brightness.dark; return DecoratedBox( decoration: BoxDecoration(color: jp.bg), child: Stack( children: [ // Warm brand wash, upper-left. Positioned( top: -220, left: -180, child: _glow(PeachTheme.seed, dark ? 0.10 : 0.045, 560), ), // Cool counter-tone, lower-right, for depth. Positioned( bottom: -240, right: -190, child: _glow(PeachTheme.violet, dark ? 0.10 : 0.04, 560), ), // Faint high accent to lift the top of the canvas. Positioned( top: -320, right: 40, child: _glow(PeachTheme.accent, dark ? 0.05 : 0.02, 420), ), Positioned.fill(child: child), ], ), ); } Widget _glow(Color c, double opacity, double size) => IgnorePointer( child: Container( width: size, height: size, decoration: BoxDecoration( shape: BoxShape.circle, gradient: RadialGradient( colors: [ c.withValues(alpha: opacity), c.withValues(alpha: 0), ], ), ), ), ); }