Skip to content

Commit

Permalink
Fixed some issues before submission
Browse files Browse the repository at this point in the history
  • Loading branch information
xMadKing committed Jan 3, 2024
1 parent f0d670e commit 9a9083c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
4 changes: 2 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.VIBRATE"></uses-permission>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"></uses-permission>
<application
android:label="smartspend"
android:name="${applicationName}"
Expand Down Expand Up @@ -32,4 +30,6 @@
android:name="flutterEmbedding"
android:value="2" />
</application>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
</manifest>
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void main() async {
Future<void> initNotifications() async { //this code is based on the documentation from the package
AwesomeNotifications().initialize(
// set the icon to null if you want to use the default app icon
'assets/logo.png',
null,
[
NotificationChannel(
channelGroupKey: 'smartspend_notification_group',
Expand Down
6 changes: 3 additions & 3 deletions lib/widgets/categorywidget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ class _CategoryWidget extends State<CategoryWidget>{
Future<void> sendNotification() async {
if (widget.number > widget.limit && !widget.notificationSent){
widget.notificationSent = true;
await AwesomeNotifications().createNotification(
AwesomeNotifications().createNotification(
content: NotificationContent(
id: 1,
channelKey: 'smartspend_notification_channel',
actionType: ActionType.Default,
title: 'SmartSpend: Limit Exceeded!',
body: 'The ${widget.name} budget has been exceeded! Current spending: ${widget.number}',
body: 'Limit on ${widget.name} has been exceeded! Current Spending ${widget.number}.'
),
schedule: NotificationInterval(interval: 30,repeats: false)
schedule: NotificationInterval(interval: 5, repeats: false),
);
}
}
Expand Down
16 changes: 12 additions & 4 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: archive
sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b"
sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d"
url: "https://pub.dev"
source: hosted
version: "3.4.9"
version: "3.4.10"
args:
dependency: transitive
description:
Expand Down Expand Up @@ -53,10 +53,18 @@ packages:
dependency: "direct main"
description:
name: awesome_notifications
sha256: "3eeb9e0cdfc72c7b4b83e9924da38ea86edd65a2af02bd5429aa41dce634ee90"
sha256: "20374499ae8e3c595f396afd43d7301c2765ebce64fbbd6ddd5f9e1b09c3f39b"
url: "https://pub.dev"
source: hosted
version: "0.8.3"
version: "0.9.0"
awesome_notifications_core:
dependency: "direct main"
description:
name: awesome_notifications_core
sha256: "0d67f3539aac87f9052b9eb204bdfbd00893a9d83b5975151098265428332bea"
url: "https://pub.dev"
source: hosted
version: "0.8.1"
boolean_selector:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dependencies:
flutter_launcher_icons: ^0.13.1
flutter_svg: ^2.0.9
quiver: ^3.2.1
awesome_notifications_core: ^0.8.1
awesome_notifications: any


Expand Down

0 comments on commit 9a9083c

Please sign in to comment.