import 'package:flutter/material.dart'; import '../utils/Colors.dart'; /// The airy backdrop: sage mist at the top drifting to cream, with two soft /// glows so the glass controls have something to blur. class AmbientBackground extends StatelessWidget { final Widget child; const AmbientBackground({super.key, required this.child}); @override Widget build(BuildContext context) { return Stack( children: [ const Positioned.fill( child: DecoratedBox( decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ colorAmbientTop, colorAmbientMid, colorAmbientBottom, ], stops: [0.0, 0.45, 1.0], ), ), ), ), Positioned( top: -140, right: -110, child: _glow(380, colorAmbientGlowSage), ), Positioned( top: 300, left: -170, child: _glow(360, colorAmbientGlowWarm), ), Positioned.fill(child: child), ], ); } Widget _glow(double size, Color color) { return IgnorePointer( child: Container( width: size, height: size, decoration: BoxDecoration( shape: BoxShape.circle, gradient: RadialGradient( colors: [color, color.withValues(alpha: 0.0)], ), ), ), ); } }