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

Update for Flutter 3.10 beta (#1746)

## Pre-launch Checklist

- [x] I read the [Flutter Style Guide] _recently_, and have followed its
advice.
- [x] I signed the [CLA].
- [x] I read the [Contributors Guide].
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] All existing and new tests are passing.

---------

Co-authored-by: David Iglesias <ditman@gmail.com>
Co-authored-by: Mark Thompson <2554588+MarkTechson@users.noreply.github.com>
Co-authored-by: John Ryan <ryjohn@google.com>
This commit is contained in:
Brett Morgan
2023-05-11 06:16:31 +10:00
committed by GitHub
parent 474756ce04
commit 36e7a6ab04
188 changed files with 1779 additions and 1968 deletions

View File

@@ -4,7 +4,7 @@
# This file should be version controlled.
version:
revision: f732038a8cf4562ce38a1d7debb30209ae3da896
revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
channel: beta
project_type: app
@@ -13,26 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: android
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: ios
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: linux
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: macos
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: web
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: windows
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
# User provided section

View File

@@ -26,6 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace "dev.flutter.animations"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

View File

@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.animations">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.

View File

@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.animations">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="animations"
android:name="${applicationName}"

View File

@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.animations">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.

View File

@@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

View File

@@ -54,10 +54,11 @@ class _AnimatedBuilderDemoState extends State<AnimatedBuilderDemo>
),
child: child,
onPressed: () {
if (controller.status == AnimationStatus.completed) {
controller.reverse();
} else {
controller.forward();
switch (controller.status) {
case AnimationStatus.completed:
controller.reverse();
default:
controller.forward();
}
},
);

View File

@@ -72,10 +72,11 @@ class _AnimationControllerDemoState extends State<AnimationControllerDemo>
ElevatedButton(
child: const Text('animate'),
onPressed: () {
if (controller.status == AnimationStatus.completed) {
controller.reverse();
} else {
controller.forward();
switch (controller.status) {
case AnimationStatus.completed:
controller.reverse();
default:
controller.forward();
}
},
)

View File

@@ -54,15 +54,19 @@ class _TweenDemoState extends State<TweenDemo>
),
ElevatedButton(
child: Text(
controller.status == AnimationStatus.completed
? 'Buy a Mansion'
: 'Win Lottery',
switch (controller.status) {
AnimationStatus.completed => 'Buy a Mansion',
AnimationStatus.forward => 'Accruing...',
AnimationStatus.reverse => 'Spending...',
_ => 'Win the lottery',
},
),
onPressed: () {
if (controller.status == AnimationStatus.completed) {
controller.reverse();
} else {
controller.forward();
switch (controller.status) {
case AnimationStatus.completed:
controller.reverse();
default:
controller.forward();
}
},
)

View File

@@ -3,7 +3,7 @@ import FlutterMacOS
class MainFlutterWindow: NSWindow {
override func awakeFromNib() {
let flutterViewController = FlutterViewController.init()
let flutterViewController = FlutterViewController()
let windowFrame = self.frame
self.contentViewController = flutterViewController
self.setFrame(windowFrame, display: true)

View File

@@ -4,7 +4,7 @@ version: 1.0.0+1
publish_to: none
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
flutter: