统一弹窗风格:Material Design 3 规范,消除颜色不一致
- 所有 AlertDialog 替换为 ModernDialog - ConfirmDialog/AssetDialogs 去掉 GlassPanel,统一 surfaceContainer 背景 - 按钮统一 FilledButton + TextButton - 修复 import 路径
This commit is contained in:
@@ -169,8 +169,8 @@ class ModernDialog extends StatelessWidget {
|
||||
final theme = Theme.of(context);
|
||||
|
||||
if (action.isPrimary) {
|
||||
return ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
return FilledButton(
|
||||
style: FilledButton.styleFrom(
|
||||
backgroundColor: action.isDestructive ? theme.colorScheme.error : theme.colorScheme.primary,
|
||||
),
|
||||
onPressed: () {
|
||||
@@ -181,7 +181,7 @@ class ModernDialog extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
return OutlinedButton(
|
||||
return TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(action.returnValue);
|
||||
action.onPressed?.call();
|
||||
|
||||
Reference in New Issue
Block a user