Skip to content

Commit cae35a6

Browse files
Update for Flutter 3.35 (#2313)
## Pre-launch Checklist - [x] I read the [Effective Dart: Style] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. <!-- Links --> [Effective Dart: Style]: https://dart.dev/guides/language/effective-dart/style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
1 parent fca9077 commit cae35a6

File tree

2,233 files changed

+24760
-15511
lines changed

Some content is hidden

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

2,233 files changed

+24760
-15511
lines changed

adaptive_app/codelab_rebuild.yaml

Lines changed: 110 additions & 70 deletions
Large diffs are not rendered by default.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"mcpServers": {
3+
"dart": {
4+
"command": "dart",
5+
"args": [
6+
"mcp-server"
7+
]
8+
}
9+
}
10+
}

adaptive_app/step_03/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ migrate_working_dir/
2727
**/doc/api/
2828
**/ios/Flutter/.last_build_id
2929
.dart_tool/
30-
.flutter-plugins
3130
.flutter-plugins-dependencies
3231
.pub-cache/
3332
.pub/
3433
/build/
34+
/coverage/
3535

3636
# Symbolication related
3737
app.*.symbols

adaptive_app/step_03/android/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ allprojects {
55
}
66
}
77

8-
val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
8+
val newBuildDir: Directory =
9+
rootProject.layout.buildDirectory
10+
.dir("../../build")
11+
.get()
912
rootProject.layout.buildDirectory.value(newBuildDir)
1013

1114
subprojects {

adaptive_app/step_03/android/settings.gradle.kts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
pluginManagement {
2-
val flutterSdkPath = run {
3-
val properties = java.util.Properties()
4-
file("local.properties").inputStream().use { properties.load(it) }
5-
val flutterSdkPath = properties.getProperty("flutter.sdk")
6-
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
7-
flutterSdkPath
8-
}
2+
val flutterSdkPath =
3+
run {
4+
val properties = java.util.Properties()
5+
file("local.properties").inputStream().use { properties.load(it) }
6+
val flutterSdkPath = properties.getProperty("flutter.sdk")
7+
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
8+
flutterSdkPath
9+
}
910

1011
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
1112

@@ -18,7 +19,7 @@ pluginManagement {
1819

1920
plugins {
2021
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
21-
id("com.android.application") version "8.7.3" apply false
22+
id("com.android.application") version "8.9.1" apply false
2223
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
2324
}
2425

adaptive_app/step_03/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>12.0</string>
24+
<string>13.0</string>
2525
</dict>
2626
</plist>

adaptive_app/step_03/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@
346346
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
347347
GCC_WARN_UNUSED_FUNCTION = YES;
348348
GCC_WARN_UNUSED_VARIABLE = YES;
349-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
349+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
350350
MTL_ENABLE_DEBUG_INFO = NO;
351351
SDKROOT = iphoneos;
352352
SUPPORTED_PLATFORMS = iphoneos;
@@ -472,7 +472,7 @@
472472
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
473473
GCC_WARN_UNUSED_FUNCTION = YES;
474474
GCC_WARN_UNUSED_VARIABLE = YES;
475-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
475+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
476476
MTL_ENABLE_DEBUG_INFO = YES;
477477
ONLY_ACTIVE_ARCH = YES;
478478
SDKROOT = iphoneos;
@@ -523,7 +523,7 @@
523523
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
524524
GCC_WARN_UNUSED_FUNCTION = YES;
525525
GCC_WARN_UNUSED_VARIABLE = YES;
526-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
526+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
527527
MTL_ENABLE_DEBUG_INFO = NO;
528528
SDKROOT = iphoneos;
529529
SUPPORTED_PLATFORMS = iphoneos;

adaptive_app/step_03/linux/runner/my_application.cc

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ struct _MyApplication {
1414

1515
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
1616

17+
// Called when first Flutter frame received.
18+
static void first_frame_cb(MyApplication* self, FlView *view)
19+
{
20+
gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view)));
21+
}
22+
1723
// Implements GApplication::activate.
1824
static void my_application_activate(GApplication* application) {
1925
MyApplication* self = MY_APPLICATION(application);
@@ -48,15 +54,23 @@ static void my_application_activate(GApplication* application) {
4854
}
4955

5056
gtk_window_set_default_size(window, 1280, 720);
51-
gtk_widget_show(GTK_WIDGET(window));
5257

5358
g_autoptr(FlDartProject) project = fl_dart_project_new();
5459
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
5560

5661
FlView* view = fl_view_new(project);
62+
GdkRGBA background_color;
63+
// Background defaults to black, override it here if necessary, e.g. #00000000 for transparent.
64+
gdk_rgba_parse(&background_color, "#000000");
65+
fl_view_set_background_color(view, &background_color);
5766
gtk_widget_show(GTK_WIDGET(view));
5867
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
5968

69+
// Show the window when Flutter renders.
70+
// Requires the view to be realized so we can start rendering.
71+
g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb), self);
72+
gtk_widget_realize(GTK_WIDGET(view));
73+
6074
fl_register_plugins(FL_PLUGIN_REGISTRY(view));
6175

6276
gtk_widget_grab_focus(GTK_WIDGET(view));

adaptive_app/step_03/macos/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@
461461
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
462462
GCC_WARN_UNUSED_FUNCTION = YES;
463463
GCC_WARN_UNUSED_VARIABLE = YES;
464-
MACOSX_DEPLOYMENT_TARGET = 10.14;
464+
MACOSX_DEPLOYMENT_TARGET = 10.15;
465465
MTL_ENABLE_DEBUG_INFO = NO;
466466
SDKROOT = macosx;
467467
SWIFT_COMPILATION_MODE = wholemodule;
@@ -543,7 +543,7 @@
543543
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
544544
GCC_WARN_UNUSED_FUNCTION = YES;
545545
GCC_WARN_UNUSED_VARIABLE = YES;
546-
MACOSX_DEPLOYMENT_TARGET = 10.14;
546+
MACOSX_DEPLOYMENT_TARGET = 10.15;
547547
MTL_ENABLE_DEBUG_INFO = YES;
548548
ONLY_ACTIVE_ARCH = YES;
549549
SDKROOT = macosx;
@@ -593,7 +593,7 @@
593593
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
594594
GCC_WARN_UNUSED_FUNCTION = YES;
595595
GCC_WARN_UNUSED_VARIABLE = YES;
596-
MACOSX_DEPLOYMENT_TARGET = 10.14;
596+
MACOSX_DEPLOYMENT_TARGET = 10.15;
597597
MTL_ENABLE_DEBUG_INFO = NO;
598598
SDKROOT = macosx;
599599
SWIFT_COMPILATION_MODE = wholemodule;

adaptive_app/step_03/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1919
version: 1.0.0+1
2020

2121
environment:
22-
sdk: ^3.8.1
22+
sdk: ^3.9.0-0
2323

2424
# Dependencies specify other packages that your package needs in order to work.
2525
# To automatically upgrade your package dependencies to the latest versions

0 commit comments

Comments
 (0)