Skip to content

Commit 52670c7

Browse files
authored
Merge pull request #484 from lucaantonelli/project-update
Update project flutter version + pubspec plugins version bump + formatting
2 parents 261dc58 + 865e9b6 commit 52670c7

File tree

131 files changed

+4671
-4049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+4671
-4049
lines changed

.fvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"flutter": "3.29.2"
2+
"flutter": "3.38.3"
33
}

analysis_options.yaml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,9 @@
1-
# This file configures the analyzer, which statically analyzes Dart code to
2-
# check for errors, warnings, and lints.
3-
#
4-
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5-
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6-
# invoked from the command line by running `flutter analyze`.
7-
8-
# The following line activates a set of recommended lints for Flutter apps,
9-
# packages, and plugins designed to encourage good coding practices.
101
include: package:flutter_lints/flutter.yaml
112

123
linter:
13-
# The lint rules applied to this project can be customized in the
14-
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15-
# included above or to enable additional rules. A list of all available lints
16-
# and their documentation is published at https://dart.dev/lints.
17-
#
18-
# Instead of disabling a lint rule for the entire project in the
19-
# section below, it can also be suppressed for a single line of code
20-
# or a specific dart file by using the `// ignore: name_of_lint` and
21-
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22-
# producing the lint.
234
rules:
24-
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25-
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
265
- prefer_relative_imports
27-
28-
# Additional information about this file can be found at
29-
# https://dart.dev/guides/language/analysis-options
6+
- prefer_const_constructors
7+
8+
formatter:
9+
page_width: 80

android/app/build.gradle.kts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,15 @@ android {
3131
ndkVersion = flutter.ndkVersion
3232

3333
compileOptions {
34-
3534
// Flag to enable support for the new language APIs
3635
isCoreLibraryDesugaringEnabled = true
3736

38-
sourceCompatibility = JavaVersion.VERSION_1_8
39-
targetCompatibility = JavaVersion.VERSION_1_8
37+
sourceCompatibility = JavaVersion.VERSION_17
38+
targetCompatibility = JavaVersion.VERSION_17
4039
}
4140

4241
kotlinOptions {
43-
jvmTarget = JavaVersion.VERSION_1_8.toString()
42+
jvmTarget = JavaVersion.VERSION_17.toString()
4443
}
4544

4645
defaultConfig {
@@ -81,7 +80,7 @@ flutter {
8180
}
8281

8382
dependencies {
84-
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.2.2")
83+
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
8584
implementation("androidx.window:window:1.0.0")
8685
implementation("androidx.window:window-java:1.0.0")
8786
}

android/app/src/main/AndroidManifest.xml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.ripster.sossoldi">
33

4-
<!-- Google Fonts permission -->
5-
<uses-permission android:name="android.permission.INTERNET" />
6-
74
<!-- Permissions for scheduled notifications-->
85
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
96
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
107
<uses-permission android:name="android.permission.WAKE_LOCK"/>
118
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
129
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
1310

14-
<!-- Storage permissions -->
11+
<!-- Storage permissions -->
1512
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
1613
<!-- Handle authentication -->
1714
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
@@ -59,4 +56,15 @@
5956
android:name="flutterEmbedding"
6057
android:value="2" />
6158
</application>
59+
<!-- Required to query activities that can process text, see:
60+
https://developer.android.com/training/package-visibility and
61+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
62+
63+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
64+
<queries>
65+
<intent>
66+
<action android:name="android.intent.action.PROCESS_TEXT"/>
67+
<data android:mimeType="text/plain"/>
68+
</intent>
69+
</queries>
6270
</manifest>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package com.ripster.sossoldi
22

3-
import io.flutter.embedding.android.FlutterFragmentActivity
3+
import io.flutter.embedding.android.FlutterActivity
44

5-
class MainActivity : FlutterFragmentActivity()
5+
class MainActivity : FlutterActivity()

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
org.gradle.jvmargs=-Xmx1536M
1+
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true
44
android.enableR8.fullMode=false
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
2-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
2+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
33
distributionPath=wrapper/dists
44
zipStorePath=wrapper/dists
55
zipStoreBase=GRADLE_USER_HOME

android/settings.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
21-
id("com.android.application") version "8.4.1" apply false
22-
id("org.jetbrains.kotlin.android") version "2.0.0" apply false
21+
id("com.android.application") version "8.11.1" apply false
22+
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
2323
}
2424

2525
include(":app")

lib/constants/constants.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,7 @@ const darkCategoryColorList = [
284284
darkCategory44,
285285
];
286286

287-
const accountColorList = [
288-
account1,
289-
account2,
290-
account3,
291-
account4,
292-
account5,
293-
];
287+
const accountColorList = [account1, account2, account3, account4, account5];
294288

295289
const darkAccountColorList = [
296290
darkAccount1,

lib/main.dart

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,24 @@ void main() async {
3131
// KV migration from the 'is_first_login' key to 'onboarding_completed'
3232
// to correctly handle the completion of the onboarding process
3333
// (To consider to remove in later future)
34-
final bool? isFirstLoginCachedValue =
35-
_sharedPreferences.getBool('is_first_login');
34+
final bool? isFirstLoginCachedValue = _sharedPreferences.getBool(
35+
'is_first_login',
36+
);
3637
final bool isOnBoardingCompletedKeyNotSaved =
3738
_sharedPreferences.getBool('onboarding_completed') == null;
3839
if (isFirstLoginCachedValue != null && isOnBoardingCompletedKeyNotSaved) {
3940
await _sharedPreferences.setBool(
40-
'onboarding_completed', !isFirstLoginCachedValue);
41+
'onboarding_completed',
42+
!isFirstLoginCachedValue,
43+
);
4144
}
4245

4346
// perform recurring transactions checks
44-
DateTime? lastCheckGetPref = _sharedPreferences
45-
.getString('last_recurring_transactions_check') !=
46-
null
47+
DateTime? lastCheckGetPref =
48+
_sharedPreferences.getString('last_recurring_transactions_check') != null
4749
? DateTime.parse(
48-
_sharedPreferences.getString('last_recurring_transactions_check')!)
50+
_sharedPreferences.getString('last_recurring_transactions_check')!,
51+
)
4952
: null;
5053
DateTime? lastRecurringTransactionsCheck = lastCheckGetPref;
5154

@@ -54,20 +57,24 @@ void main() async {
5457
RecurringTransactionMethods().checkRecurringTransactions();
5558
// update last recurring transactions runtime
5659
await _sharedPreferences.setString(
57-
'last_recurring_transactions_check', DateTime.now().toIso8601String());
60+
'last_recurring_transactions_check',
61+
DateTime.now().toIso8601String(),
62+
);
5863
}
5964

6065
final LocalAuthentication auth = LocalAuthentication();
6166
if (await auth.isDeviceSupported()) {
6267
// check for authentication if requested by user
63-
bool? requiresAuthentication =
64-
_sharedPreferences.getBool("user_requires_authentication");
68+
bool? requiresAuthentication = _sharedPreferences.getBool(
69+
"user_requires_authentication",
70+
);
6571

6672
if (requiresAuthentication != null && requiresAuthentication == true) {
6773
// use use sticky auth to resume auth request when app is going background
6874
bool didAuthenticate = await auth.authenticate(
69-
localizedReason: 'Please authenticate to use Sossoldi',
70-
options: AuthenticationOptions(stickyAuth: true));
75+
localizedReason: 'Please authenticate to use Sossoldi',
76+
persistAcrossBackgrounding: true,
77+
);
7178
if (!didAuthenticate) return; // stops app from loading
7279
}
7380
}
@@ -77,7 +84,7 @@ void main() async {
7784
Phoenix(
7885
child: ProviderScope(
7986
overrides: [versionProvider.overrideWithValue(packageInfo.version)],
80-
child: Launcher(),
87+
child: const Launcher(),
8188
),
8289
),
8390
),
@@ -98,8 +105,9 @@ class Launcher extends ConsumerWidget {
98105
title: 'Sossoldi',
99106
theme: AppTheme.lightTheme,
100107
darkTheme: AppTheme.darkTheme,
101-
themeMode:
102-
appThemeState.isDarkModeEnabled ? ThemeMode.dark : ThemeMode.light,
108+
themeMode: appThemeState.isDarkModeEnabled
109+
? ThemeMode.dark
110+
: ThemeMode.light,
103111
onGenerateRoute: makeRoute,
104112
initialRoute: !isOnboardingCompleted ? '/onboarding' : '/',
105113
);

0 commit comments

Comments
 (0)