Files
yogibook_aury_app/lib/widgets/yogibook_background.dart
T
2026-09-04 08:15:25 +02:00

81 lines
1.7 KiB
Dart

import 'package:flutter/material.dart';
class YogibookBackground extends StatelessWidget {
final Widget child;
const YogibookBackground({super.key, required this.child});
@override
Widget build(BuildContext context) {
return Stack(
children: [
// --- SFONDO (tinta piatta)
Container(color: const Color(0xFFE2FDFF)),
// --- BOLLE decorative
const _BgBlob(color: Color(0x9962BBC1), size: 280, top: -70, left: -90),
const _BgBlob(
color: Color(0x99F4ECE1),
size: 230,
bottom: 80,
right: -70,
),
const _BgBlob(
color: Color(0x99E1D0B8),
size: 190,
bottom: -55,
left: 35,
),
// contenuto pagina
child,
],
);
}
}
class _BgBlob extends StatelessWidget {
final Color color;
final double size;
final double? top;
final double? left;
final double? right;
final double? bottom;
const _BgBlob({
required this.color,
required this.size,
this.top,
this.left,
this.right,
this.bottom,
});
@override
Widget build(BuildContext context) {
return Positioned(
top: top,
left: left,
right: right,
bottom: bottom,
child: IgnorePointer(
child: Container(
width: size,
height: size,
decoration: BoxDecoration(
color: color,
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
blurRadius: 70,
color: color,
offset: const Offset(0, 18),
),
],
),
),
),
);
}
}