1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

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
This commit is contained in:
Brett Morgan
2023-11-16 09:55:44 +11:00
committed by GitHub
parent 3324bfc20e
commit e5ec08fccd
103 changed files with 1331 additions and 1110 deletions

View File

@@ -4,8 +4,8 @@
# This file should be version controlled and should not be manually edited.
version:
revision: "ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a"
channel: "stable"
revision: "adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1"
channel: "beta"
project_type: app
@@ -13,26 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
- platform: android
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
- platform: ios
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
- platform: linux
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
- platform: macos
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
- platform: web
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
- platform: windows
create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
create_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
base_revision: adc7dfe87ebc5ff6cb6ceb786efaa83058fdc1a1
# User provided section

View File

@@ -6,7 +6,6 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

View File

@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true

View File

@@ -10,11 +10,20 @@ pluginManagement {
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
plugins {
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
}
}
include ":app"
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
}
apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
include ":app"

View File

@@ -66,7 +66,7 @@ class _AnimationControllerDemoState extends State<AnimationControllerDemo>
child: Text(
controller.value.toStringAsFixed(2),
style: Theme.of(context).textTheme.displaySmall,
textScaleFactor: 1 + controller.value,
textScaler: TextScaler.linear(1 + controller.value),
),
),
ElevatedButton(

View File

@@ -123,6 +123,12 @@ foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
COMPONENT Runtime)
endforeach(bundled_library)
# Copy the native assets provided by the build.dart from all packages.
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/")
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
# Fully re-copy the assets directory on each build to avoid having stale files
# from a previous install.
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")

View File

@@ -87,6 +87,12 @@ if(PLUGIN_BUNDLED_LIBRARIES)
COMPONENT Runtime)
endif()
# Copy the native assets provided by the build.dart from all packages.
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/")
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
# Fully re-copy the assets directory on each build to avoid having stale files
# from a previous install.
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")

View File

@@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
# https://github.com/flutter/flutter/issues/57146.
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
# Set fallback configurations for older versions of the flutter tool.
if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
set(FLUTTER_TARGET_PLATFORM "windows-x64")
endif()
# === Flutter Library ===
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
@@ -92,7 +97,7 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
windows-x64 $<CONFIG>
${FLUTTER_TARGET_PLATFORM} $<CONFIG>
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS