Skip to content

Commit c206709

Browse files
committed
chore: upgrade Flutter and packages
Flutter upgraded to 3.24.0
1 parent 4500a38 commit c206709

31 files changed

+330
-321
lines changed

android/app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,8 @@ dependencies {
102102
// See: https://github.com/flutter/flutter/issues/110658
103103
implementation 'androidx.window:window:1.0.0'
104104
implementation 'androidx.window:window-java:1.0.0'
105+
106+
// Workaround for bug with workmanager
107+
// See: https://github.com/fluttercommunity/flutter_workmanager/issues/551#issuecomment-2180480982
108+
implementation("androidx.work:work-runtime-ktx:2.8.1")
105109
}

android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<uses-permission android:name="android.permission.INTERNET"/>
3+
24
<application
35
android:label="Adventure List"
46
android:name="${applicationName}"
@@ -76,4 +78,4 @@
7678

7779
<!-- Required to schedule exact alarms. -->
7880
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
79-
</manifest>
81+
</manifest>

android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java

Lines changed: 0 additions & 25 deletions
This file was deleted.

android/build.gradle

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,40 @@ allprojects {
66
}
77

88
rootProject.buildDir = '../build'
9+
10+
// subprojects {
11+
// project.buildDir = "${rootProject.buildDir}/${project.name}"
12+
// }
13+
// subprojects {
14+
// project.evaluationDependsOn(':app')
15+
// }
16+
// Workaround for plugins with compileSdk < 31
17+
// https://github.com/flutter/flutter/issues/153281
18+
// Can be removed once all plugins are updated to compileSdk 31+
919
subprojects {
20+
afterEvaluate { project ->
21+
if (project.extensions.findByName("android") != null) {
22+
Integer pluginCompileSdk = project.android.compileSdk
23+
if (pluginCompileSdk != null && pluginCompileSdk < 31) {
24+
project.logger.error(
25+
"Warning: Overriding compileSdk version in Flutter plugin: "
26+
+ project.name
27+
+ " from "
28+
+ pluginCompileSdk
29+
+ " to 31 (to work around https://issuetracker.google.com/issues/199180389)."
30+
+ "\nIf there is not a new version of " + project.name + ", consider filing an issue against "
31+
+ project.name
32+
+ " to increase their compileSdk to the latest (otherwise try updating to the latest version)."
33+
)
34+
project.android {
35+
compileSdk 31
36+
}
37+
}
38+
}
39+
}
40+
1041
project.buildDir = "${rootProject.buildDir}/${project.name}"
11-
}
12-
subprojects {
13-
project.evaluationDependsOn(':app')
42+
project.evaluationDependsOn(":app")
1443
}
1544

1645
tasks.register("clean", Delete) {

android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pluginManagement {
1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
2121
id "com.android.application" version "7.3.1" apply false
22-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
22+
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
2323
}
2424

25-
include ":app"
25+
include ":app"

lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import 'package:easy_logger/easy_logger.dart';
55
import 'package:firebase_core/firebase_core.dart';
66
import 'package:flutter/foundation.dart';
77
import 'package:flutter/material.dart';
8+
import 'package:flutter/services.dart';
89
import 'package:flutter_bloc/flutter_bloc.dart';
910
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
1011
import 'package:google_fonts/google_fonts.dart';
@@ -78,7 +79,7 @@ Future<void> main(List<String> args) async {
7879
}
7980

8081
if (Platform.isAndroid) {
81-
HomeWidget.registerBackgroundCallback(backgroundCallback);
82+
HomeWidget.registerInteractivityCallback(backgroundCallback);
8283
}
8384

8485
final googleAuth = GoogleAuth(storageRepository);

lib/src/app.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import 'window/app_window.dart';
2121

2222
class App extends StatefulWidget {
2323
const App({
24-
Key? key,
25-
}) : super(key: key);
24+
super.key,
25+
});
2626

2727
@override
2828
State<App> createState() => _AppState();

lib/src/authentication/sign_in_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import 'cubit/authentication_cubit.dart';
1313
class SignInPage extends StatelessWidget {
1414
static const routeName = '/signin_page';
1515

16-
const SignInPage({Key? key}) : super(key: key);
16+
const SignInPage({super.key});
1717

1818
@override
1919
Widget build(BuildContext context) {

lib/src/core/widgets/input_dialog.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,15 @@ class InputDialog extends StatelessWidget {
7979
final List<TextInputFormatter>? formatter;
8080

8181
InputDialog({
82-
Key? key,
82+
super.key,
8383
this.context,
8484
this.type,
8585
this.title,
8686
this.hintText,
8787
this.keyboardType,
8888
this.formatter,
8989
required String initialValue,
90-
}) : maxLines = (type == InputDialogs.multiLine) ? 5 : 1,
91-
super(key: key) {
90+
}) : maxLines = (type == InputDialogs.multiLine) ? 5 : 1 {
9291
controller.text = initialValue;
9392
controller.selection = TextSelection(
9493
baseOffset: 0,

lib/src/core/widgets/measure_size.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ class MeasureSize extends SingleChildRenderObjectWidget {
3030
final OnWidgetSizeChange onChange;
3131

3232
const MeasureSize({
33-
Key? key,
33+
super.key,
3434
required this.onChange,
35-
required Widget child,
36-
}) : super(key: key, child: child);
35+
required Widget super.child,
36+
});
3737

3838
@override
3939
RenderObject createRenderObject(BuildContext context) {

0 commit comments

Comments
 (0)