diff --git a/example/pubspec.lock b/example/pubspec.lock index b00b790f50..55b50d49a8 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -8,13 +8,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.36.4" - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.10" args: dependency: transitive description: @@ -70,7 +63,7 @@ packages: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.1.1+1" css_colors: dependency: "direct dev" description: @@ -132,7 +125,7 @@ packages: name: html url: "https://pub.dartlang.org" source: hosted - version: "0.14.0+2" + version: "0.14.0+3" http: dependency: transitive description: @@ -154,13 +147,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.1.3" - image: - dependency: transitive - description: - name: image - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.4" intl: dependency: transitive description: @@ -266,13 +252,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0+1" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.0" platform: dependency: transitive description: @@ -375,7 +354,7 @@ packages: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "1.1.6+5" + version: "1.1.7+1" stack_trace: dependency: transitive description: @@ -466,7 +445,7 @@ packages: name: video_player url: "https://pub.dartlang.org" source: hosted - version: "0.10.2+1" + version: "0.10.2+3" vm_service_client: dependency: transitive description: @@ -488,13 +467,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.15" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "3.5.0" yaml: dependency: transitive description: @@ -503,5 +475,5 @@ packages: source: hosted version: "2.2.0" sdks: - dart: ">=2.4.0 <3.0.0" - flutter: ">=1.5.0 <2.0.0" + dart: ">=2.5.0 <3.0.0" + flutter: ">=1.9.1 <2.0.0" diff --git a/examples/animation/animate2/lib/main.dart b/examples/animation/animate2/lib/main.dart index 7dcf0e41d5..4f3e47a3d3 100644 --- a/examples/animation/animate2/lib/main.dart +++ b/examples/animation/animate2/lib/main.dart @@ -9,7 +9,7 @@ class AnimatedLogo extends AnimatedWidget { : super(key: key, listenable: animation); Widget build(BuildContext context) { - final Animation animation = listenable as Animation; + final animation = listenable as Animation; return Center( child: Container( margin: EdgeInsets.symmetric(vertical: 10), diff --git a/examples/animation/animate3/lib/main.dart b/examples/animation/animate3/lib/main.dart index 8e51809f30..176bd9cf22 100644 --- a/examples/animation/animate3/lib/main.dart +++ b/examples/animation/animate3/lib/main.dart @@ -8,7 +8,7 @@ class AnimatedLogo extends AnimatedWidget { : super(key: key, listenable: animation); Widget build(BuildContext context) { - final Animation animation = listenable as Animation; + final animation = listenable as Animation; return Center( child: Container( margin: EdgeInsets.symmetric(vertical: 10), diff --git a/examples/animation/animate5/lib/main.dart b/examples/animation/animate5/lib/main.dart index a4e7a9584e..ccc431a762 100644 --- a/examples/animation/animate5/lib/main.dart +++ b/examples/animation/animate5/lib/main.dart @@ -17,7 +17,7 @@ class AnimatedLogo extends AnimatedWidget { : super(key: key, listenable: animation); Widget build(BuildContext context) { - final Animation animation = listenable as Animation; + final animation = listenable as Animation; return Center( child: Opacity( opacity: _opacityTween.evaluate(animation), diff --git a/pubspec.lock b/pubspec.lock index 2ae2e4c0fc..e8adb705c9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.37.0" + version: "0.38.5" args: dependency: transitive description: @@ -21,14 +21,14 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.4.0" build: dependency: transitive description: name: build url: "https://pub.dartlang.org" source: hosted - version: "1.1.5" + version: "1.2.0" build_config: dependency: transitive description: @@ -42,28 +42,28 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" build_resolvers: dependency: transitive description: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "1.0.6" + version: "1.2.0" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "1.6.5" + version: "1.7.1" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "3.0.9" + version: "4.1.0" built_collection: dependency: transitive description: @@ -77,7 +77,7 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "6.7.0" + version: "6.7.1" charcode: dependency: transitive description: @@ -113,17 +113,17 @@ packages: description: path: "." ref: HEAD - resolved-ref: d81e903a36bd36532fcbf85ba38c679ce264e6e3 + resolved-ref: "194181c88c8c8861257d2ee38d99909af7120211" url: "https://github.com/chalin/code_excerpter.git" source: git - version: "0.6.0" + version: "0.6.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.11" + version: "1.14.12" console: dependency: transitive description: @@ -144,7 +144,7 @@ packages: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.1.1+1" + version: "2.1.3" csslib: dependency: transitive description: @@ -158,7 +158,7 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "1.2.9" + version: "1.3.1" firebase: dependency: "direct dev" description: @@ -179,7 +179,7 @@ packages: name: front_end url: "https://pub.dartlang.org" source: hosted - version: "0.1.20" + version: "0.1.27" github: dependency: "direct dev" description: @@ -207,7 +207,7 @@ packages: name: html url: "https://pub.dartlang.org" source: hosted - version: "0.14.0+2" + version: "0.14.0+3" http: dependency: transitive description: @@ -256,14 +256,14 @@ packages: name: kernel url: "https://pub.dartlang.org" source: hosted - version: "0.3.20" + version: "0.3.27" linkcheck: dependency: "direct dev" description: name: linkcheck url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.11" logging: dependency: transitive description: @@ -298,7 +298,7 @@ packages: name: package_config url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.0" package_resolver: dependency: transitive description: @@ -438,13 +438,13 @@ packages: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "1.0.15" + version: "1.1.0" yaml: dependency: "direct dev" description: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.1.16" + version: "2.2.0" sdks: - dart: ">=2.3.0 <3.0.0" \ No newline at end of file + dart: ">=2.3.0 <3.0.0" diff --git a/src/docs/codelabs/layout-basics.md b/src/docs/codelabs/layout-basics.md index c4910d0d17..869b117b85 100644 --- a/src/docs/codelabs/layout-basics.md +++ b/src/docs/codelabs/layout-basics.md @@ -96,7 +96,7 @@ and `Column` lays out its widgets vertically. {% comment %} Gist: https://gist.github.com/4e11c4a7ec824685f963f25d7c30ba0b {% endcomment %} - + ## Axis size and alignment @@ -182,7 +182,7 @@ The `mainAxisSize` property has two possible values: {% comment %} Gist: https://gist.github.com/d852e4f07d6c87600fe8e0f186c7a31b {% endcomment %} - + ### mainAxisAlignment property @@ -272,7 +272,7 @@ can position their children in that extra space. {% comment %} Gist: https://gist.github.com/cb8abed13f90a6a0c7a0ada6f15a09c9 {% endcomment %} - + {{site.alert.tip}} Before moving to the next section, @@ -376,7 +376,7 @@ The `crossAxisAlignment` property has five possible values: {% comment %} Gist: https://gist.github.com/70a6eb88f13019eec349a57bc4fd5fe0 {% endcomment %} - + {{site.alert.tip}} Before moving to the next section, @@ -474,7 +474,7 @@ Flex 的 widget 根据其 `flex` 和 `fit` 属性调整大小: {% comment %} Gist: https://gist.github.com/ba0f40356d1023066d960f6de2be1a4b {% endcomment %} - + #### Example: Testing flex values {:.no_toc} @@ -520,7 +520,7 @@ Flex 的 widget 根据其 `flex` 和 `fit` 属性调整大小: {% comment %} Gist: https://gist.github.com/82e4dd24028034ae03ba0ddc71bf59e5 {% endcomment %} - + {{site.alert.tip}} Before moving to the next example, @@ -591,7 +591,7 @@ wrap a widget and force the widget to fill extra space. {% comment %} Gist: https://gist.github.com/77021d2ed15f9ece850de15e73c47526 {% endcomment %} - + ## SizedBox widget @@ -635,7 +635,7 @@ create empty space. {% comment %} Gist: https://gist.github.com/6582851e85b57180ff5321f814fabb81 {% endcomment %} - + #### Example: Creating space @@ -669,7 +669,7 @@ create empty space. {% comment %} Gist: https://gist.github.com/datafoya/19ead147ab5c7668d7d32e1cfed90097 {% endcomment %} - + ## Spacer widget @@ -719,7 +719,7 @@ can create space between widgets. {% comment %} Gist: https://gist.github.com/datafoya/bfc367aefde35e02ea5283efdbf58e60 {% endcomment %} - + ## Text widget @@ -756,7 +756,7 @@ for different fonts, sizes, and colors. {% comment %} Gist: https://gist.github.com/datafoya/0ff109090b99ef1873d9fad501b2bc86 {% endcomment %} - + ## Icon widget @@ -800,7 +800,7 @@ Flutter 将会为 [Material][] 和 [Cupertino][] {% comment %} Gist: https://gist.github.com/datafoya/01688fca8c13f85d93078054af2e858b {% endcomment %} - + ## Image widget @@ -853,7 +853,7 @@ the following example uses an image from the network. {% comment %} Gist: https://gist.github.com/datafoya/b6f3084800bd139cdb522b8858bb58b7 {% endcomment %} - + ## Putting it all together @@ -959,7 +959,7 @@ which are positioned below the contact information. {% comment %} Gist: https://gist.github.com/datafoya/30ccbe0fcf31cc10eafba3aea8ff0697 {% endcomment %} - + #### Exercise: Wrap the Column in a Row {:.no_toc} @@ -1010,7 +1010,7 @@ which are positioned below the contact information. {% comment %} Gist: https://gist.github.com/datafoya/95dcc1451aea8412669c41eb8a1a5f23 {% endcomment %} - + ### Part 2 {:.no_toc} @@ -1077,7 +1077,7 @@ which are positioned below the contact information. {% comment %} Gist: https://gist.github.com/datafoya/c3ac34ed8952724a0ecb0af1445c2af8 {% endcomment %} - + #### Exercise: Enter contact information {:.no_toc} @@ -1111,7 +1111,7 @@ which are positioned below the contact information. {% comment %} Gist: https://gist.github.com/datafoya/c5be61116652927c5d92262fce1b5360 {% endcomment %} - + ### Part 3 {:.no_toc} @@ -1146,7 +1146,7 @@ which are positioned below the contact information. {% comment %} Gist: https://gist.github.com/datafoya/dae36611fc9af04c4b9d0fbc3429275e {% endcomment %} - + ## What's next? diff --git a/src/docs/cookbook/persistence/sqlite.md b/src/docs/cookbook/persistence/sqlite.md index 2a7469220e..56ea6ea6c2 100644 --- a/src/docs/cookbook/persistence/sqlite.md +++ b/src/docs/cookbook/persistence/sqlite.md @@ -418,9 +418,9 @@ To run the example: 创建一个新的 Flutter 工程; -2. Add the `sqfite` and `path` packages to your `pubspec.yaml`. +2. Add the `sqflite` and `path` packages to your `pubspec.yaml`. - 将 `sqfite` 和 `path` 包添加到 `pubspec.yaml` 文件里; + 将 `sqflite` 和 `path` 包添加到 `pubspec.yaml` 文件里; 3. Paste the following code into a new file called `lib/db_test.dart`. diff --git a/src/docs/deployment/android.md b/src/docs/deployment/android.md index ee63ee41a1..76c1607f57 100644 --- a/src/docs/deployment/android.md +++ b/src/docs/deployment/android.md @@ -621,9 +621,37 @@ see the [Google Play launch][play] documentation. 要了解如何发布一个 app 到 Google Play Store, 可以参考 [Google Play publishing documentation][play]。 +Now that you’ve created your app, attract more users with Google Ads. App campaigns use machine learning to drive more installs and make the most of your budget. + +当你创建了应用之后,你可以通过 Google Ads 吸引更多用户,Google Ads 平台可以通过机器学习帮助你以非常高的性价比吸引到更多用户。 + +Get your campaign running in a few steps + +通过以下几步创建一个广告宣传: + +1. Create your ad - we’ll help create your ad from your app information + + 创建广告 —— 我们会根据您的应用信息帮您制作广告。另外,您还可以添加图片和视频。 + +2. Choose your budget - set your target cost-per-install (tCPI) and daily budget cap + + 决定推广预算 —— 对于以提高应用安装量为主要目标的广告系列,您需要为其设置应用安装出价,也就是“目标每次安装费用”,同时设置每日推广支出预算。 + +3. Select your location - let us know where you’d like your ads to run + + 选择目标地区 —— 让我们知道你希望触达哪些区域的用户。 + +4. Decide what action you want users to take - choose installs, in-app actions, or target return on ad spend (ROAS) + + 设定用户行动 —— 决定你希望用户要做什么,比如安装,应用内操作或者目标广告支出回报率 (ROAS)。 + + Get $75 app advertising credit when you spend $25 + + 获取 75 美元的赠金(当你消费 25 美金后) + ## Android release FAQ -## 安卓发布常见问题 +## Android发布常见问题 Here are some commonly asked questions about deployment for Android apps. diff --git a/src/docs/deployment/cd.md b/src/docs/deployment/cd.md index f967ec01d2..2e76e364ee 100644 --- a/src/docs/deployment/cd.md +++ b/src/docs/deployment/cd.md @@ -392,3 +392,9 @@ The following are some other options available to help automate the delivery of * [Flutter CI/CD with Bitrise](https://devcenter.bitrise.io/getting-started/getting-started-with-flutter-apps/) [使用 Bitrise 为 Flutter 应用加入持续交付](https://devcenter.bitrise.io/getting-started/getting-started-with-flutter-apps/) + +* [Github Actions- CI/CD on Github] (https://github.com/features/actions) Get + [Example Project](https://github.com/nabilnalakath/flutter-githubaction) + + [使用 GitHub Actions 进行持续交付](https://github.com/features/actions), + 查看这个 [样例项目](https://github.com/nabilnalakath/flutter-githubaction) diff --git a/src/docs/development/packages-and-plugins/developing-packages.md b/src/docs/development/packages-and-plugins/developing-packages.md index 066dbc8995..0d454ca1b4 100644 --- a/src/docs/development/packages-and-plugins/developing-packages.md +++ b/src/docs/development/packages-and-plugins/developing-packages.md @@ -162,7 +162,7 @@ specialized content: Dart 插件 API 实现。 -* android/src/main/java/com/example/​hello/HelloPlugin.java: +* android/src/main/java/com/example/​hello/HelloPlugin.kt: - The Android platform specific implementation of the plugin API. Android 平台原生插件 API 实现。 @@ -177,16 +177,17 @@ specialized content: 一个依赖于该插件并说明了如何使用它的 Flutter 应用。 -By default, the plugin project uses Objective-C for iOS code and -Java for Android code. If you prefer Swift or Kotlin, you can specify the +By default, the plugin project uses Swift for iOS code and +Kotlin for Android code. If you prefer Objective-C or Java, you can specify the iOS language using `-i` and/or the Android language using `-a`. For example: -默认情况下,插件项目中 iOS 代码使用 Objective-C 编写,Android 代码使用 -Java 编写。如果你更喜欢 Swift 或 Kotlin,你可以通过 `-i` 指定 iOS 所使用的语言和/或使用 -`-a` 指定 Android 所使用的语言。比如: +默认情况下,插件项目中 iOS 代码使用 Swift 编写,Android 代码使用 Kotlin 编写。 +如果你更喜欢 Objective-C 或 Java, +你可以通过 `-i` 指定 iOS 所使用的语言和/或 +使用`-a` 指定 Android 所使用的语言。比如: ```terminal -$ flutter create --template=plugin -i swift -a kotlin hello +$ flutter create --template=plugin -i objc -a java hello ``` ### Step 2: Implement the package {#edit-plugin-package} diff --git a/src/docs/development/ui/animations/tutorial.md b/src/docs/development/ui/animations/tutorial.md index 68ed0cdee9..2a1407ed86 100644 --- a/src/docs/development/ui/animations/tutorial.md +++ b/src/docs/development/ui/animations/tutorial.md @@ -567,7 +567,7 @@ class AnimatedLogo extends AnimatedWidget { : super(key: key, listenable: animation); Widget build(BuildContext context) { - final Animation animation = listenable; + final animation = listenable as Animation; return Center( child: Container( margin: EdgeInsets.symmetric(vertical: 10), @@ -973,7 +973,7 @@ class AnimatedLogo extends AnimatedWidget { : super(key: key, listenable: animation); Widget build(BuildContext context) { - final Animation animation = listenable; + final animation = listenable as Animation; return Center( [!child: Opacity(!] [!opacity: _opacityTween.evaluate(animation),!] diff --git a/src/docs/get-started/install/_ios-setup.md b/src/docs/get-started/install/_ios-setup.md index eb8723c593..ba1249bcb1 100644 --- a/src/docs/get-started/install/_ios-setup.md +++ b/src/docs/get-started/install/_ios-setup.md @@ -25,6 +25,7 @@ To develop Flutter apps for iOS, you need a Mac with Xcode 9.0 or newer: ```terminal $ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer + $ sudo xcodebuild -runFirstLaunch ``` This is the correct path for most cases,