Skip to content

Commit e5ec08f

Browse files
Update Samples for 3.16 (#2085)
*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* *List which issues are fixed by this PR. For larger changes, raising an issue first helps reduce redundant work.* ## Pre-launch Checklist - [ ] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [ ] I signed the [CLA]. - [ ] I read the [Contributors Guide]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. <!-- Links --> [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/wiki/Chat [Contributors Guide]: https://github.com/flutter/samples/blob/main/CONTRIBUTING.md
1 parent 3324bfc commit e5ec08f

File tree

103 files changed

+1270
-1049
lines changed

Some content is hidden

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

103 files changed

+1270
-1049
lines changed

animations/.metadata

+16-16
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a"
8-
channel: "stable"
7+
revision: "adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1"
8+
channel: "beta"
99

1010
project_type: app
1111

1212
# Tracks metadata for the flutter migrate command
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
17-
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
16+
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
17+
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
1818
- platform: android
19-
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
20-
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
19+
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
20+
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
2121
- platform: ios
22-
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
23-
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
22+
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
23+
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
2424
- platform: linux
25-
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
26-
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
25+
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
26+
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
2727
- platform: macos
28-
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
29-
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
28+
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
29+
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
3030
- platform: web
31-
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
32-
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
31+
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
32+
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
3333
- platform: windows
34-
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
35-
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
34+
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
35+
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
3636

3737
# User provided section
3838

animations/android/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ buildscript {
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.3.0'
109
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1110
}
1211
}

animations/android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx1536M
1+
org.gradle.jvmargs=-Xmx4G
22
android.useAndroidX=true
33
android.enableJetifier=true

animations/android/settings.gradle

+11-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,20 @@ pluginManagement {
1010

1111
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
1212

13+
repositories {
14+
google()
15+
mavenCentral()
16+
gradlePluginPortal()
17+
}
18+
1319
plugins {
1420
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
1521
}
1622
}
1723

18-
include ":app"
24+
plugins {
25+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
26+
id "com.android.application" version "7.3.0" apply false
27+
}
1928

20-
apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
29+
include ":app"

animations/lib/src/basics/animation_controller.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class _AnimationControllerDemoState extends State<AnimationControllerDemo>
6666
child: Text(
6767
controller.value.toStringAsFixed(2),
6868
style: Theme.of(context).textTheme.displaySmall,
69-
textScaleFactor: 1 + controller.value,
69+
textScaler: TextScaler.linear(1 + controller.value),
7070
),
7171
),
7272
ElevatedButton(

animations/linux/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
123123
COMPONENT Runtime)
124124
endforeach(bundled_library)
125125

126+
# Copy the native assets provided by the build.dart from all packages.
127+
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/")
128+
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
129+
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
130+
COMPONENT Runtime)
131+
126132
# Fully re-copy the assets directory on each build to avoid having stale files
127133
# from a previous install.
128134
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")

animations/windows/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ if(PLUGIN_BUNDLED_LIBRARIES)
8787
COMPONENT Runtime)
8888
endif()
8989

90+
# Copy the native assets provided by the build.dart from all packages.
91+
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/")
92+
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
93+
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
94+
COMPONENT Runtime)
95+
9096
# Fully re-copy the assets directory on each build to avoid having stale files
9197
# from a previous install.
9298
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")

animations/windows/flutter/CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
1010
# https://github.com/flutter/flutter/issues/57146.
1111
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
1212

13+
# Set fallback configurations for older versions of the flutter tool.
14+
if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
15+
set(FLUTTER_TARGET_PLATFORM "windows-x64")
16+
endif()
17+
1318
# === Flutter Library ===
1419
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
1520

@@ -92,7 +97,7 @@ add_custom_command(
9297
COMMAND ${CMAKE_COMMAND} -E env
9398
${FLUTTER_TOOL_ENVIRONMENT}
9499
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
95-
windows-x64 $<CONFIG>
100+
${FLUTTER_TARGET_PLATFORM} $<CONFIG>
96101
VERBATIM
97102
)
98103
add_custom_target(flutter_assemble DEPENDS

desktop_photo_search/fluent_ui/.metadata

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a"
8-
channel: "stable"
7+
revision: "adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1"
8+
channel: "beta"
99

1010
project_type: app
1111

1212
# Tracks metadata for the flutter migrate command
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
17-
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
16+
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
17+
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
1818
- platform: linux
19-
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
20-
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
19+
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
20+
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
2121
- platform: macos
22-
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
23-
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
22+
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
23+
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
2424
- platform: windows
25-
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
26-
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
25+
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
26+
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
2727

2828
# User provided section
2929

desktop_photo_search/fluent_ui/linux/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
123123
COMPONENT Runtime)
124124
endforeach(bundled_library)
125125

126+
# Copy the native assets provided by the build.dart from all packages.
127+
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/")
128+
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
129+
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
130+
COMPONENT Runtime)
131+
126132
# Fully re-copy the assets directory on each build to avoid having stale files
127133
# from a previous install.
128134
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")

0 commit comments

Comments
 (0)