Skip to content

Commit 812d30b

Browse files
committed
Fix analyze issues
1 parent ae1e4d6 commit 812d30b

File tree

2 files changed

+3
-38
lines changed

2 files changed

+3
-38
lines changed

analysis_options.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
analyzer:
2+
exclude:
3+
- "example/**"

example/lib/main.dart

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -108,44 +108,6 @@ class _NotificationAPIExampleState extends State<NotificationAPIExample> {
108108
}
109109
}
110110

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-
149111
void _clearLogs() {
150112
setState(() {
151113
_logs.clear();

0 commit comments

Comments
 (0)