41 lines
1.1 KiB
Dart
41 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../design/pencil_theme.dart';
|
|
|
|
/// 通用黄→白页背景,与 `funymee_home.pen` **suXxr** 一致,并在顶部叠 **`checker_20px_500.png`**(透明度 **20%**,同 **zL8hY** 设计)。
|
|
class PencilYellowWhitePageBackground extends StatelessWidget {
|
|
const PencilYellowWhitePageBackground({super.key, required this.child});
|
|
|
|
final Widget child;
|
|
|
|
static const String _checkerAsset = 'assets/images/checker_20px_500.png';
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Stack(
|
|
fit: StackFit.expand,
|
|
children: [
|
|
const DecoratedBox(
|
|
decoration: BoxDecoration(
|
|
gradient: PencilTheme.yellowWhitePageGradient,
|
|
),
|
|
),
|
|
Positioned.fill(
|
|
child: IgnorePointer(
|
|
child: Opacity(
|
|
opacity: 0.2,
|
|
child: Image.asset(
|
|
_checkerAsset,
|
|
fit: BoxFit.cover,
|
|
alignment: Alignment.topCenter,
|
|
filterQuality: FilterQuality.medium,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
child,
|
|
],
|
|
);
|
|
}
|
|
}
|