File tree Expand file tree Collapse file tree 2 files changed +3
-38
lines changed Expand file tree Collapse file tree 2 files changed +3
-38
lines changed Original file line number Diff line number Diff line change
1
+ analyzer :
2
+ exclude :
3
+ - " example/**"
Original file line number Diff line number Diff line change @@ -108,44 +108,6 @@ class _NotificationAPIExampleState extends State<NotificationAPIExample> {
108
108
}
109
109
}
110
110
111
- Future <void > _requestPermission () async {
112
- try {
113
- setState (() {
114
- _logs.insert (0 , 'Requesting notification permission...' );
115
- });
116
-
117
- final granted = await NotificationAPI .requestPermission ();
118
-
119
- setState (() {
120
- _logs.insert (0 , 'Permission ${granted ? 'granted' : 'denied' }' );
121
- });
122
-
123
- _showMessage ('Permission ${granted ? 'granted' : 'denied' }' );
124
- } catch (e) {
125
- setState (() {
126
- _logs.insert (0 , 'Error requesting permission: $e ' );
127
- });
128
- _showMessage ('Error: $e ' );
129
- }
130
- }
131
-
132
- void _toggleForegroundNotifications () {
133
- setState (() {
134
- _showForegroundNotifications = ! _showForegroundNotifications;
135
- _logs.insert (
136
- 0 ,
137
- 'Foreground notifications ${_showForegroundNotifications ? 'enabled' : 'disabled' }' ,
138
- );
139
- });
140
-
141
- NotificationAPI .setShowForegroundNotifications (
142
- _showForegroundNotifications,
143
- );
144
- _showMessage (
145
- 'Foreground notifications ${_showForegroundNotifications ? 'enabled' : 'disabled' }' ,
146
- );
147
- }
148
-
149
111
void _clearLogs () {
150
112
setState (() {
151
113
_logs.clear ();
You can’t perform that action at this time.
0 commit comments