Commit 4fb9cd247923f610a287ac5b8dde3f9ea31739ea
1 parent
457ac447
feat:星星奖励动效背景透明
Showing
1 changed file
with
3 additions
and
1 deletions
lib/common/utils/show_star_reward_dialog.dart
@@ -14,7 +14,8 @@ Future<void> showStarRewardDialog( | @@ -14,7 +14,8 @@ Future<void> showStarRewardDialog( | ||
14 | ///showDialog 方法的返回值将是 Navigator.of(context).pop 传递给对话框的参数 | 14 | ///showDialog 方法的返回值将是 Navigator.of(context).pop 传递给对话框的参数 |
15 | await showDialog( | 15 | await showDialog( |
16 | context: context, | 16 | context: context, |
17 | - barrierDismissible: false, | 17 | + barrierColor: Colors.transparent, // 设置透明背景 |
18 | + barrierDismissible: false, // 点击对话框外部不关闭对话框 | ||
18 | builder: (BuildContext context) { | 19 | builder: (BuildContext context) { |
19 | return PopScope( | 20 | return PopScope( |
20 | canPop: false, | 21 | canPop: false, |
@@ -49,6 +50,7 @@ Future<void> showCheerRewardDialog( | @@ -49,6 +50,7 @@ Future<void> showCheerRewardDialog( | ||
49 | }) async { | 50 | }) async { |
50 | await showDialog( | 51 | await showDialog( |
51 | context: context, | 52 | context: context, |
53 | + barrierColor: Colors.transparent, // 设置透明背景 | ||
52 | barrierDismissible: false, // 点击对话框外部不关闭对话框 | 54 | barrierDismissible: false, // 点击对话框外部不关闭对话框 |
53 | builder: (BuildContext context) { | 55 | builder: (BuildContext context) { |
54 | return PopScope( | 56 | return PopScope( |