This commit is contained in:
Patrick Alvin Alcala 2025-02-26 18:00:41 +08:00
parent 9d5a392db3
commit c41c19b469
10 changed files with 299 additions and 181 deletions

View file

@ -4,8 +4,9 @@ class PageBackgroundWidget extends StatelessWidget {
final Widget child;
final String? page;
final double? height;
final bool? dark;
const PageBackgroundWidget({super.key, required this.child, this.page, this.height});
const PageBackgroundWidget({super.key, required this.child, this.page, this.height, this.dark});
@override
Widget build(BuildContext context) {
@ -27,14 +28,19 @@ class PageBackgroundWidget extends StatelessWidget {
),
fit: BoxFit.cover, // Ensures the background covers the entire container
alignment: Alignment.center,
opacity: 0.3, // Adjusts the opacity as needed
opacity: dark == true ? 0.1 : 0.3, // Adjusts the opacity as needed
),
gradient: const RadialGradient(
gradient: RadialGradient(
tileMode: TileMode.clamp,
colors: [
Color.fromRGBO(26, 8, 25, 1),
Color.fromRGBO(60, 22, 57, 1),
],
colors: dark == true
? [
Color.fromRGBO(19, 8, 26, 1),
Color.fromRGBO(43, 22, 60, 1),
]
: [
Color.fromRGBO(26, 8, 25, 1),
Color.fromRGBO(60, 22, 57, 1),
],
),
),
child: Center(