更新页面

This commit is contained in:
wyf
2025-04-16 14:27:10 +08:00
parent 146462b467
commit 1765403f21
58 changed files with 7821 additions and 433 deletions

View File

@@ -0,0 +1,37 @@
import 'dart:ui';
import 'package:flutter/material.dart';
class FrostedDialog extends StatelessWidget {
final Widget child;
final double blurSigma;
final Color barrierColor;
const FrostedDialog({
super.key,
required this.child,
this.blurSigma = 5.0,
this.barrierColor = const Color.fromRGBO(0, 0, 0, 0.5),
});
@override
Widget build(BuildContext context) {
return Stack(
children: [
// 毛玻璃背景
BackdropFilter(
filter: ImageFilter.blur(sigmaX: blurSigma, sigmaY: blurSigma),
child: Container(
color: Colors.transparent,
),
),
Dialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
backgroundColor: Colors.transparent, // 背景透明,由 child 自己决定
child: child,
),
],
);
}
}