fix: Resolve Dart type inference errors and update Android build configuration for Gradle 8.14

Type Annotation Fixes:
- fireNotificationList.dart: Added DeleteFireNotificationFunction and TapFireNotificationFunction types to _buildRow and _buildSavedFireNotifications parameters
- homePage.dart: Added Object type to catchError handler parameters
- redux/appReducer.dart: Added dynamic type annotation to action parameter
- redux/fetchDataMiddleware.dart: Added explicit type annotations and improved type casting
- redux/reducers.dart: Added dynamic type annotation to action parameter
- redux/userReducer.dart: Added dynamic type annotation to action parameter

Android Build Configuration Updates:
- Updated compileSdkVersion and targetSdkVersion from 34 to 36 to match plugin requirements
- Moved plugins {} block to first position (Gradle 8.14 requirement)
- Added dev.flutter.flutter-gradle-plugin to plugins block for modern Flutter integration
- Removed deprecated useProguard setting, replaced with shrinkResources
- Disabled Jetifier (android.enableJetifier=false) to improve build performance
- Increased JVM heap allocation to 4096M for large project compilation
- Added Kotlin language version 1.8 override for plugin compatibility
- Added ProGuard rules to exclude optional Google Play Core classes

Build Results:
-  APK builds successfully (146MB debug APK)
-  Zero type inference errors detected by dart analyze
-  Kotlin compilation passes
-  R8 minification configured correctly
-  301 remaining issues are all INFO-level style suggestions (non-blocking)
This commit is contained in:
vjrj 2026-03-06 21:44:54 +01:00
parent 956165c524
commit 7812ed951e
19 changed files with 129 additions and 111 deletions

View file

@ -63,8 +63,12 @@ class FireNotificationList extends StatefulWidget {
class _FireNotificationListState extends State<FireNotificationList> {
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
Widget _buildRow(BuildContext context, List<YourLocation> yourLocations,
FireNotification notif, onDeleted, onTap) {
Widget _buildRow(
BuildContext context,
List<YourLocation> yourLocations,
FireNotification notif,
DeleteFireNotificationFunction onDeleted,
TapFireNotificationFunction onTap) {
String prefix = '';
// FIXME (this can fails if you don't have a location for this notif, for instance during tests)
@ -97,8 +101,8 @@ class _FireNotificationListState extends State<FireNotificationList> {
BuildContext context,
List<YourLocation> yourLocations,
List<FireNotification> notifList,
onDeleted,
onTap) {
DeleteFireNotificationFunction onDeleted,
TapFireNotificationFunction onTap) {
return RefreshIndicator(
onRefresh: _handleRefresh,
child: ListView.builder(