@@ -38,6 +38,7 @@ class _SettingPageState extends State<SettingPage> {
3838 final navigationRailDestinations = < NavigationRailDestination > [];
3939 final sharedPreferencesManager = sl <SharedPreferencesManager >();
4040 final valueNotifierIsEnableScreenshotNotification = ValueNotifier (false );
41+ final valueNotifierIsEnableSoundScreenshotNotification = ValueNotifier (true );
4142 final valueNotifierAppearanceMode = ValueNotifier (AppearanceMode .light);
4243 final valueNotifierLaunchAtStartup = ValueNotifier (true );
4344 final valueNotifierAlwaysOnTop = ValueNotifier (true );
@@ -258,6 +259,7 @@ class _SettingPageState extends State<SettingPage> {
258259 ),
259260 children: [
260261 buildWidgetScreenshotNotification (),
262+ buildWidgetPlaySoundScreenshotNotification (),
261263 const SizedBox (height: 16 ),
262264 buildWidgetReminderNotTrackNotification (),
263265 const SizedBox (height: 8 ),
@@ -686,6 +688,8 @@ class _SettingPageState extends State<SettingPage> {
686688 void prepareData () {
687689 valueNotifierIsEnableScreenshotNotification.value =
688690 sharedPreferencesManager.getBool (SharedPreferencesManager .keyIsEnableScreenshotNotification) ?? false ;
691+ valueNotifierIsEnableSoundScreenshotNotification.value =
692+ sharedPreferencesManager.getBool (SharedPreferencesManager .keyIsEnableSoundScreenshotNotification) ?? false ;
689693 valueNotifierAlwaysOnTop.value =
690694 sharedPreferencesManager.getBool (SharedPreferencesManager .keyIsAlwaysOnTop, defaultValue: true ) ?? true ;
691695
@@ -1072,6 +1076,37 @@ class _SettingPageState extends State<SettingPage> {
10721076 );
10731077 }
10741078
1079+ Widget buildWidgetPlaySoundScreenshotNotification () {
1080+ return Row (
1081+ children: [
1082+ SizedBox (
1083+ width: 24 ,
1084+ child: ValueListenableBuilder (
1085+ valueListenable: valueNotifierIsEnableSoundScreenshotNotification,
1086+ builder: (BuildContext context, bool isEnable, _) {
1087+ return Checkbox (
1088+ value: isEnable,
1089+ onChanged: (newValue) {
1090+ if (newValue != null ) {
1091+ valueNotifierIsEnableSoundScreenshotNotification.value = newValue;
1092+ sharedPreferencesManager.putBool (
1093+ SharedPreferencesManager .keyIsEnableSoundScreenshotNotification,
1094+ newValue,
1095+ );
1096+ }
1097+ },
1098+ );
1099+ },
1100+ ),
1101+ ),
1102+ const SizedBox (width: 4 ),
1103+ Text (
1104+ 'play_sound' .tr (),
1105+ ),
1106+ ],
1107+ );
1108+ }
1109+
10751110 Widget buildWidgetMember () {
10761111 return Row (
10771112 crossAxisAlignment: CrossAxisAlignment .start,
0 commit comments