diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index ed276ca..bd46c34 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -29,4 +29,11 @@ # Prevent R8 from leaving Data object members always null -keepclassmembers,allowobfuscation class * { @com.google.gson.annotations.SerializedName ; -} \ No newline at end of file +} + +# Retain org.xmlpull classes +-keep class org.xmlpull.** { *; } + +# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher. +-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken +-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken \ No newline at end of file diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 432be05..91a94f1 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -18,16 +18,5 @@ - - - - - - - - - - - diff --git a/lib/models/notification.dart b/lib/models/notification.dart index e763487..43c8fe6 100644 --- a/lib/models/notification.dart +++ b/lib/models/notification.dart @@ -54,7 +54,7 @@ Future initializeNotification(BuildContext context) async { // Request notification permissions for Android 13 or higher final androidImplementation = flutterLocalNotificationsPlugin .resolvePlatformSpecificImplementation(); - await androidImplementation?.requestExactAlarmsPermission(); + await androidImplementation?.requestNotificationsPermission(); // Create the notification channel const AndroidNotificationChannel channel = AndroidNotificationChannel( diff --git a/lib/pages/detail/modal/edit.dart b/lib/pages/detail/modal/edit.dart index 51a1271..4681869 100644 --- a/lib/pages/detail/modal/edit.dart +++ b/lib/pages/detail/modal/edit.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:istiqomah/constants/app.dart'; -import 'package:istiqomah/constants/app_theme.dart'; import 'package:istiqomah/models/habit.dart'; class _ModalEditHabit extends StatefulWidget { diff --git a/lib/pages/home/modal/add.dart b/lib/pages/home/modal/add.dart index b511b83..010c355 100644 --- a/lib/pages/home/modal/add.dart +++ b/lib/pages/home/modal/add.dart @@ -152,7 +152,7 @@ class _ModalAddHabitState extends State<_ModalAddHabit> { onPressed: () { showTimePicker( context: context, - initialTime: selectedTime!, + initialTime: selectedTime, ).then( (value) { if (value == null) return; @@ -163,7 +163,7 @@ class _ModalAddHabitState extends State<_ModalAddHabit> { ); }, child: Text( - getTime(selectedTime!), + getTime(selectedTime), style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), ), ), diff --git a/pubspec.lock b/pubspec.lock index 0d92f51..058f442 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -110,6 +110,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" flutter_local_notifications: dependency: "direct main" description: @@ -200,6 +208,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" + url: "https://pub.dev" + source: hosted + version: "5.0.0" matcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index fc0abcb..d63b1bf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -40,6 +40,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + flutter_lints: ^5.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec