回滚
@ -1,8 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
package com.ali.fluttergo
|
||||
=======
|
||||
package com.alibaba.fluttergo
|
||||
>>>>>>> develop
|
||||
|
||||
import android.os.Bundle
|
||||
|
||||
|
@ -1,215 +0,0 @@
|
||||
container:
|
||||
image: gcr.io/flutter-cirrus/build-flutter-image:latest
|
||||
|
||||
task:
|
||||
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
|
||||
env:
|
||||
# Name the SDK directory to include a space so that we constantly
|
||||
# test path names with spaces in them.
|
||||
CIRRUS_WORKING_DIR: "/tmp/flutter sdk"
|
||||
PATH: "$CIRRUS_WORKING_DIR/bin:$CIRRUS_WORKING_DIR/bin/cache/dart-sdk/bin:$PATH"
|
||||
ANDROID_HOME: "/opt/android_sdk"
|
||||
git_fetch_script:
|
||||
- git fetch origin
|
||||
- git fetch origin master # To set FETCH_HEAD for "git merge-base" to work
|
||||
pub_cache:
|
||||
folder: $HOME/.pub-cache
|
||||
fingerprint_script: echo $OS; grep -r --include=pubspec.yaml 'PUBSPEC CHECKSUM' "$CIRRUS_WORKING_DIR"
|
||||
flutter_pkg_cache:
|
||||
folder: bin/cache/pkg
|
||||
fingerprint_script: echo $OS; cat bin/internal/engine.version
|
||||
artifacts_cache:
|
||||
folder: bin/cache/artifacts
|
||||
fingerprint_script: echo $OS; cat bin/internal/engine.version
|
||||
setup_script: ./dev/bots/cirrus_setup.sh
|
||||
matrix:
|
||||
- name: docs
|
||||
env:
|
||||
SHARD: docs
|
||||
# For uploading master docs to Firebase master branch staging site
|
||||
FIREBASE_MASTER_TOKEN: ENCRYPTED[37e8b82f167864cae9a3f4d2cf3f37dea331d9375c295327c45de524f6c588fa6f6d63e5784f10f6d43ce29689f36c92]
|
||||
# For uploading beta docs to Firebase public live site
|
||||
FIREBASE_PUBLIC_TOKEN: ENCRYPTED[c422da192f06da7b4449ca8e7aa866dabeb8a0f8d7488497c2e7e447e6fd31d917e6c813db081dc4e2a7a63afdf41864]
|
||||
docs_script: ./dev/bots/docs.sh
|
||||
- name: deploy_gallery
|
||||
only_if: $CIRRUS_BRANCH == 'dev'
|
||||
depends_on:
|
||||
- docs
|
||||
- analyze
|
||||
- tests-linux
|
||||
- tool_tests-linux
|
||||
- build_tests-linux
|
||||
env:
|
||||
SHARD: deploy_gallery
|
||||
GOOGLE_DEVELOPER_SERVICE_ACCOUNT_ACTOR_FASTLANE: ENCRYPTED[d9ac1462c3c556fc2f8165c9d5566a16497d8ebc38a50357f7f3abf136b7f83e1d1d76dde36fee356cb0f9ebf7a89346]
|
||||
ANDROID_GALLERY_UPLOAD_KEY: ENCRYPTED[0b3e681b4507aec433ef29c79b715f15f8c75ecd25315ea286b0b2bcb8b28d578634eead5aa2c54086a25e8da1bb219a]
|
||||
test_script: ./dev/bots/deploy_gallery.sh
|
||||
- name: analyze
|
||||
test_script:
|
||||
- dart ./dev/bots/analyze.dart
|
||||
- name: tests-linux
|
||||
env:
|
||||
SHARD: tests
|
||||
test_script:
|
||||
- dart ./dev/bots/test.dart
|
||||
container:
|
||||
cpu: 4
|
||||
memory: 12G
|
||||
- name: tool_tests-linux
|
||||
env:
|
||||
SHARD: tool_tests
|
||||
test_script:
|
||||
- dart ./dev/bots/test.dart
|
||||
container:
|
||||
cpu: 4
|
||||
memory: 12G
|
||||
- name: build_tests-linux
|
||||
env:
|
||||
SHARD: build_tests
|
||||
test_script:
|
||||
- dart ./dev/bots/test.dart
|
||||
container:
|
||||
cpu: 4
|
||||
memory: 12G
|
||||
- name: codelabs-build-test
|
||||
env:
|
||||
SHARD: codelabs-build-test
|
||||
build_test_script: ./dev/bots/codelabs_build_test.sh
|
||||
|
||||
|
||||
task:
|
||||
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
|
||||
windows_container:
|
||||
image: cirrusci/windowsservercore:2016
|
||||
os_version: 2016
|
||||
cpu: 4
|
||||
env:
|
||||
CIRRUS_WORKING_DIR: "C:\\Windows\\Temp\\flutter sdk"
|
||||
git_fetch_script:
|
||||
- git fetch origin
|
||||
- git fetch origin master # To set FETCH_HEAD for "git merge-base" to work
|
||||
pub_cache:
|
||||
folder: $APPDATA\Pub\Cache
|
||||
fingerprint_script:
|
||||
- ps: $Env:OS; Get-ChildItem -Path "$Env:CIRRUS_WORKING_DIR" pubspec.yaml -Recurse | Select-String -Pattern "PUBSPEC CHECKSUM" -SimpleMatch
|
||||
flutter_pkg_cache:
|
||||
folder: bin\cache\pkg
|
||||
fingerprint_script: echo %OS% & type bin\internal\engine.version
|
||||
artifacts_cache:
|
||||
folder: bin\cache\artifacts
|
||||
fingerprint_script: echo %OS% & type bin\internal\engine.version
|
||||
setup_script:
|
||||
- bin\flutter.bat config --no-analytics
|
||||
- bin\flutter.bat update-packages
|
||||
- git fetch origin master
|
||||
test_all_script:
|
||||
- bin\cache\dart-sdk\bin\dart.exe -c dev\bots\test.dart
|
||||
matrix:
|
||||
- name: tests-windows
|
||||
env:
|
||||
SHARD: tests
|
||||
- name: tool_tests-windows
|
||||
env:
|
||||
SHARD: tool_tests
|
||||
- name: build_tests-windows
|
||||
env:
|
||||
SHARD: build_tests
|
||||
container:
|
||||
cpu: 4
|
||||
memory: 12G
|
||||
|
||||
task:
|
||||
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
|
||||
name: deploy_gallery-macos
|
||||
only_if: $CIRRUS_BRANCH == 'dev'
|
||||
pub_cache:
|
||||
folder: ~/.pub-cache
|
||||
depends_on:
|
||||
- analyze
|
||||
- tests-macos
|
||||
- tool_tests-macos
|
||||
- build_tests-macos
|
||||
env:
|
||||
# Name the SDK directory to include a space so that we constantly
|
||||
# test path names with spaces in them.
|
||||
CIRRUS_WORKING_DIR: "/tmp/flutter sdk"
|
||||
SHARD: deploy_gallery
|
||||
# Apple Certificates Match Passphrase
|
||||
MATCH_PASSWORD: ENCRYPTED[db07f252234397090e3ec59152d9ec1831f5ecd0ef97d247b1dca757bbb9ef9b7c832a39bce2caf1949ccdf097e59a73]
|
||||
# Apple Fastlane password, ASP, and Session information.
|
||||
FASTLANE_PASSWORD: ENCRYPTED[0bf9bb0cc2cb32a0ed18470cf2c9df0f587cce5f8b04adbd6cff15ca5bde7a74f721ee580227b132ab6b032f08e52ae0]
|
||||
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ENCRYPTED[b219cc13c757f36cb62bfca5102d6115f1cc283aeb974f20c657bc4991c0cc144e30cf5d8183e41cc1df1668b4d14210]
|
||||
FASTLANE_SESSION: ENCRYPTED[88246e355e55cd5e361a575f5d5b762f5826cb9d5285cb93a263b1cad04ec09bdedb1cbd74df5ec02d6043360fa04acd]
|
||||
# Private repo for publishing certificates.
|
||||
PUBLISHING_MATCH_CERTIFICATE_REPO: git@github.com:flutter/private_publishing_certificates.git
|
||||
osx_instance:
|
||||
image: high-sierra-xcode-9.4.1
|
||||
git_fetch_script:
|
||||
- git fetch origin
|
||||
- git fetch origin master # To set FETCH_HEAD
|
||||
setup_script:
|
||||
- bin/flutter config --no-analytics
|
||||
- bin/flutter update-packages
|
||||
test_all_script:
|
||||
- ./dev/bots/deploy_gallery.sh
|
||||
|
||||
task:
|
||||
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
|
||||
osx_instance:
|
||||
image: high-sierra-xcode-9.4.1
|
||||
depends_on:
|
||||
- analyze
|
||||
env:
|
||||
CIRRUS_WORKING_DIR: "/tmp/flutter sdk"
|
||||
install_cocoapods_script:
|
||||
- sudo gem install cocoapods
|
||||
git_fetch_script:
|
||||
- git fetch origin
|
||||
- git fetch origin master # To set FETCH_HEAD for "git merge-base" to work
|
||||
pub_cache:
|
||||
folder: $HOME/.pub-cache
|
||||
fingerprint_script: echo $OS; grep -r --include=pubspec.yaml 'PUBSPEC CHECKSUM' "$CIRRUS_WORKING_DIR"
|
||||
flutter_pkg_cache:
|
||||
folder: bin/cache/pkg
|
||||
fingerprint_script: echo $OS; cat bin/internal/engine.version
|
||||
artifacts_cache:
|
||||
folder: bin/cache/artifacts
|
||||
fingerprint_script: echo $OS; cat bin/internal/engine.version
|
||||
setup_script:
|
||||
- bin/flutter config --no-analytics
|
||||
- bin/flutter update-packages
|
||||
test_all_script: |
|
||||
ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
|
||||
bin/cache/dart-sdk/bin/dart -c dev/bots/test.dart
|
||||
matrix:
|
||||
- name: tests-macos
|
||||
env:
|
||||
SHARD: tests
|
||||
- name: tool_tests-macos
|
||||
env:
|
||||
SHARD: tool_tests
|
||||
- name: build_tests-macos
|
||||
env:
|
||||
SHARD: build_tests
|
||||
COCOAPODS_DISABLE_STATS: true
|
||||
FLUTTER_FRAMEWORK_DIR: "/tmp/flutter sdk/bin/cache/artifacts/engine/ios/"
|
||||
container:
|
||||
cpu: 4
|
||||
memory: 12G
|
||||
|
||||
|
||||
docker_builder:
|
||||
# Only build a new docker image when we tag a release (for dev, beta, or release.)
|
||||
only_if: $CIRRUS_TAG != ''
|
||||
env:
|
||||
GCLOUD_CREDENTIALS: ENCRYPTED[f7c098d4dd7f5ee1bfee0bb7e944cce72efbe10e97ad6440ae72de4de6a1c24d23f421a2619c668e94377fb64b0bb3e6]
|
||||
depends_on:
|
||||
- docs
|
||||
- analyze
|
||||
- tests-linux
|
||||
- tool_tests-linux
|
||||
- build_tests-linux
|
||||
build_script: "$CIRRUS_WORKING_DIR/dev/ci/docker_linux/docker_build.sh"
|
||||
login_script: "$CIRRUS_WORKING_DIR/dev/ci/docker_linux/docker_login.sh"
|
||||
push_script: "$CIRRUS_WORKING_DIR/dev/ci/docker_linux/docker_push.sh"
|
||||
|
25
flutter/.gitattributes
vendored
@ -1,25 +0,0 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Always perform LF normalization on these files
|
||||
*.dart text
|
||||
*.gradle text
|
||||
*.html text
|
||||
*.java text
|
||||
*.json text
|
||||
*.md text
|
||||
*.py text
|
||||
*.sh text
|
||||
*.txt text
|
||||
*.xml text
|
||||
*.yaml text
|
||||
|
||||
# Make sure that these Windows files always have CRLF line endings in checkout
|
||||
*.bat text eol=crlf
|
||||
*.ps1 text eol=crlf
|
||||
|
||||
# Never perform LF normalization on these files
|
||||
*.ico binary
|
||||
*.jar binary
|
||||
*.png binary
|
||||
*.zip binary
|
45
flutter/.github/ISSUE_TEMPLATE/ACTIVATION.md
vendored
@ -1,45 +0,0 @@
|
||||
---
|
||||
name: I am having difficulty installing Flutter or getting it to work
|
||||
about: You have run into problems while downloading or installing Flutter, or the
|
||||
"flutter" tool is crashing, or you are running into some other issue before even
|
||||
being able to use "flutter run".
|
||||
|
||||
---
|
||||
|
||||
<!-- Thank you for using Flutter!
|
||||
|
||||
If you are looking for support, please check out our documentation
|
||||
or consider asking a question on Stack Overflow:
|
||||
* https://flutter.io/
|
||||
* https://docs.flutter.io/
|
||||
* https://stackoverflow.com/questions/tagged/flutter?sort=frequent
|
||||
|
||||
If you have found a bug or if our documentation doesn't have an answer
|
||||
to what you're looking for, then fill our the template below. Please read
|
||||
our guide to filing a bug first: https://flutter.io/bug-reports/
|
||||
-->
|
||||
|
||||
## Steps to Reproduce
|
||||
|
||||
<!-- Please tell us exactly how to reproduce the problem you are running into. -->
|
||||
|
||||
1. ...
|
||||
2. ...
|
||||
3. ...
|
||||
|
||||
## Logs
|
||||
|
||||
<!--
|
||||
Include the full logs of the commands you are running between the lines
|
||||
with the backticks below. If you are running any "flutter" commands,
|
||||
please include the output of running them with "--verbose"; for example,
|
||||
the output of running "flutter --verbose create foo".
|
||||
-->
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
<!-- If possible, paste the output of running `flutter doctor -v` here. -->
|
||||
|
||||
```
|
||||
```
|
60
flutter/.github/ISSUE_TEMPLATE/BUG.md
vendored
@ -1,60 +0,0 @@
|
||||
---
|
||||
name: I have a problem with my Flutter application.
|
||||
about: You are writing an application with Flutter but the application is crashing
|
||||
or throws an exception, a widget is buggy, or something looks wrong.
|
||||
|
||||
---
|
||||
|
||||
<!-- Thank you for using Flutter!
|
||||
|
||||
If you are looking for support, please check out our documentation
|
||||
or consider asking a question on Stack Overflow:
|
||||
* https://flutter.io/
|
||||
* https://docs.flutter.io/
|
||||
* https://stackoverflow.com/questions/tagged/flutter?sort=frequent
|
||||
|
||||
If you have found a bug or if our documentation doesn't have an answer
|
||||
to what you're looking for, then fill our the template below. Please read
|
||||
our guide to filing a bug first: https://flutter.io/bug-reports/
|
||||
-->
|
||||
|
||||
## Steps to Reproduce
|
||||
|
||||
<!--
|
||||
Please tell us exactly how to reproduce the problem you are running into.
|
||||
|
||||
Please attach a small application (ideally just one main.dart file) that
|
||||
reproduces the problem. You could use https://gist.github.com/ for this.
|
||||
|
||||
If the problem is with your application's rendering, then please attach
|
||||
a screenshot and explain what the problem is.
|
||||
-->
|
||||
|
||||
1. ...
|
||||
2. ...
|
||||
3. ...
|
||||
|
||||
## Logs
|
||||
|
||||
<!--
|
||||
Run your application with `flutter run --verbose` and attach all the
|
||||
log output below between the lines with the backticks. If there is an
|
||||
exception, please see if the error message includes enough information
|
||||
to explain how to solve the issue.
|
||||
-->
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
<!--
|
||||
Run `flutter analyze` and attach any output of that command below.
|
||||
If there are any analysis errors, try resolving them before filing this issue.
|
||||
-->
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
<!-- Finally, paste the output of running `flutter doctor -v` here. -->
|
||||
|
||||
```
|
||||
```
|
22
flutter/.github/ISSUE_TEMPLATE/SUPPORT.md
vendored
@ -1,22 +0,0 @@
|
||||
---
|
||||
name: I want help writing my application
|
||||
about: You have a question for how to achieve a particular effect, or you need help
|
||||
with using a particular API.
|
||||
|
||||
---
|
||||
|
||||
<!-- Thank you for using Flutter!
|
||||
|
||||
Please check out our documentation first:
|
||||
* https://flutter.io/
|
||||
* https://docs.flutter.io/
|
||||
|
||||
If you can't find the answer there, please consider asking a question on
|
||||
the Stack Overflow Web site:
|
||||
* https://stackoverflow.com/questions/tagged/flutter?sort=frequent
|
||||
|
||||
Please don't file a GitHub issue for support requests. GitHub issues are
|
||||
for tracking defects in the product. If you file a bug asking for help, we
|
||||
will consider this a request for a documentation update.
|
||||
|
||||
-->
|
20
flutter/.github/move.yml
vendored
@ -1,20 +0,0 @@
|
||||
# Configuration for move-issues - https://github.com/dessant/move-issues
|
||||
|
||||
# Delete the command comment when it contains no other content.
|
||||
deleteCommand: true
|
||||
|
||||
# Close the source issue after moving.
|
||||
closeSourceIssue: true
|
||||
|
||||
# Lock the source issue after moving.
|
||||
lockSourceIssue: false
|
||||
|
||||
# Mention issue and comment authors.
|
||||
mentionAuthors: true
|
||||
|
||||
# Preserve mentions in the issue content.
|
||||
keepContentMentions: true
|
||||
|
||||
# Set custom aliases for targets
|
||||
aliases:
|
||||
ide: flutter-intellij
|
18
flutter/.github/no-response.yml
vendored
@ -1,18 +0,0 @@
|
||||
# Configuration for probot-no-response - https://github.com/probot/no-response
|
||||
|
||||
# Number of days of inactivity before an issue is closed for lack of response.
|
||||
daysUntilClose: 21
|
||||
|
||||
# Label requiring a response.
|
||||
responseRequiredLabel: "waiting for customer response"
|
||||
|
||||
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
|
||||
closeComment: >-
|
||||
Without additional information, we are unfortunately not sure how to
|
||||
resolve this issue. We are therefore reluctantly going to close this
|
||||
bug for now. Please don't hesitate to comment on the bug if you have
|
||||
any more information for us; we will reopen it right away!
|
||||
|
||||
Thanks for your contribution.
|
||||
|
||||
cc @Hixie
|
88
flutter/.gitignore
vendored
@ -1,88 +0,0 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.lock
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# Visual Studio Code related
|
||||
.vscode/
|
||||
|
||||
# Flutter repo-specific
|
||||
/bin/cache/
|
||||
/bin/mingit/
|
||||
/dev/benchmarks/mega_gallery/
|
||||
/dev/bots/.recipe_deps
|
||||
/dev/bots/android_tools/
|
||||
/dev/docs/doc/
|
||||
/dev/docs/flutter.docs.zip
|
||||
/dev/docs/lib/
|
||||
/dev/docs/pubspec.yaml
|
||||
/packages/flutter/coverage/
|
||||
version
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
build/
|
||||
flutter_*.png
|
||||
linked_*.ds
|
||||
unlinked.ds
|
||||
unlinked_spec.ds
|
||||
|
||||
# Android related
|
||||
**/android/**/gradle-wrapper.jar
|
||||
**/android/.gradle
|
||||
**/android/captures/
|
||||
**/android/gradlew
|
||||
**/android/gradlew.bat
|
||||
**/android/local.properties
|
||||
**/android/**/GeneratedPluginRegistrant.java
|
||||
|
||||
# iOS/XCode related
|
||||
**/ios/**/*.mode1v3
|
||||
**/ios/**/*.mode2v3
|
||||
**/ios/**/*.moved-aside
|
||||
**/ios/**/*.pbxuser
|
||||
**/ios/**/*.perspectivev3
|
||||
**/ios/**/*sync/
|
||||
**/ios/**/.sconsign.dblite
|
||||
**/ios/**/.tags*
|
||||
**/ios/**/.vagrant/
|
||||
**/ios/**/DerivedData/
|
||||
**/ios/**/Icon?
|
||||
**/ios/**/Pods/
|
||||
**/ios/**/.symlinks/
|
||||
**/ios/**/profile
|
||||
**/ios/**/xcuserdata
|
||||
**/ios/.generated/
|
||||
**/ios/Flutter/App.framework
|
||||
**/ios/Flutter/Flutter.framework
|
||||
**/ios/Flutter/Generated.xcconfig
|
||||
**/ios/Flutter/app.flx
|
||||
**/ios/Flutter/app.zip
|
||||
**/ios/Flutter/flutter_assets/
|
||||
**/ios/ServiceDefinitions.json
|
||||
**/ios/Runner/GeneratedPluginRegistrant.*
|
||||
|
||||
# Exceptions to above rules.
|
||||
!**/ios/**/default.mode1v3
|
||||
!**/ios/**/default.mode2v3
|
||||
!**/ios/**/default.pbxuser
|
||||
!**/ios/**/default.perspectivev3
|
||||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
|
@ -1,32 +0,0 @@
|
||||
# Below is a list of people and organizations that have contributed
|
||||
# to the Flutter project. Names should be added to the list like so:
|
||||
#
|
||||
# Name/Organization <email address>
|
||||
|
||||
Google Inc.
|
||||
Jim Simon <jim.j.simon@gmail.com>
|
||||
Lex Berezhny <lex@damoti.com>
|
||||
Wyatt Arent <hello@wyatt.ninja>
|
||||
Michael Perrotte <mikemimik@gmail.com>
|
||||
Günter Zöchbauer <guenter@gzoechbauer.com>
|
||||
Raju Bitter <rajubitter@gmail.com>
|
||||
Michael Beckler <mcbeckler@gmail.com>
|
||||
Alexandre Ardhuin <alexandre.ardhuin@gmail.com>
|
||||
Luke Freeman <luke@goposse.com>
|
||||
Vincent Le Quéméner <eu.lequem@gmail.com>
|
||||
Mike Hoolehan <mike@hoolehan.com>
|
||||
German Saprykin <saprykin.h@gmail.com>
|
||||
Stefano Rodriguez <hlsroddy@gmail.com>
|
||||
Yusuke Konishi <yahpeycoy0403@gmail.com>
|
||||
Fredrik Simón <fredrik@fsimon.net>
|
||||
Ali Bitek <alibitek@protonmail.ch>
|
||||
Tetsuhiro Ueda <najeira@gmail.com>
|
||||
Dan Field <dfield@gmail.com>
|
||||
Noah Groß <gross@ngsger.de>
|
||||
Victor Choueiri <victor@ctrlanddev.com>
|
||||
Christian Mürtz <teraarts@t-online.de>
|
||||
Lukasz Piliszczuk <lukasz@intheloup.io>
|
||||
Felix Schmidt <felix.free@gmx.de>
|
||||
Artur Rymarz <artur.rymarz@gmail.com>
|
||||
Stefan Mitev <mr.mitew@gmail.com>
|
||||
Mattijs Fuijkschot <mattijs.fuijkschot@gmail.com>
|
@ -1,46 +0,0 @@
|
||||
# Code of conduct
|
||||
|
||||
We expect Flutter's contributors to act professionally and respectfully, and
|
||||
we expect our social spaces to be safe and dignified environments.
|
||||
|
||||
Specifically:
|
||||
|
||||
* Respect people, their identities, their culture, and their work.
|
||||
* Be kind. Be courteous. Be welcoming.
|
||||
* Listen. Consider and acknowledge people's points before responding.
|
||||
|
||||
Should you experience anything that makes you feel unwelcome in Flutter's
|
||||
community, please contact someone on the team, for instance
|
||||
[Ian](mailto:ian@hixie.ch) or [Tim](mailto:timsneath@google.com). We will
|
||||
not tolerate harrasment from anyone in Flutter's community, even outside
|
||||
of Flutter's public communication channels.
|
||||
|
||||
## Conflict resolution
|
||||
|
||||
When multiple contributors disagree on the direction for a particular
|
||||
patch or the general direction of the project, the conflict should be
|
||||
resolved by communication. The people who disagree should get
|
||||
together, try to understand each other's points of view, and work to
|
||||
find a design that addresses everyone's concerns.
|
||||
|
||||
This is usually sufficient to resolve issues. If you cannot come to an
|
||||
agreement, ask for the advice of a more senior member of the team.
|
||||
|
||||
Be wary of agreement by attrition, where one person argues a point
|
||||
repeatedly until other participants give up in the interests of moving
|
||||
on. This is not conflict resolution, as it does not address everyone's
|
||||
concerns. Be wary of agreement by compromise, where two good competing
|
||||
solutions are merged into one mediocre solution. A conflict is
|
||||
addressed when the participants agree that the final solution is
|
||||
_better_ than all the conflicting proposals. Sometimes the solution is
|
||||
more work than either of the proposals. [Embrace the yak
|
||||
shave](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#lazy-programming).
|
||||
|
||||
## Questions
|
||||
|
||||
It's always ok to ask questions. Our systems are large, and nobody will be
|
||||
an expert in all the systems. Once you find the answer, document it in
|
||||
the first place you looked. That way, the next person will be brought
|
||||
up to speed even quicker.
|
||||
|
||||
[](https://xkcd.com/1053/)
|
@ -1,75 +0,0 @@
|
||||
Contributing to Flutter
|
||||
=======================
|
||||
|
||||
[](https://cirrus-ci.org/flutter/flutter)
|
||||
|
||||
_See also: [Flutter's code of conduct](CODE_OF_CONDUCT.md)_
|
||||
|
||||
Welcome
|
||||
-------
|
||||
|
||||
We invite you to join our team! Everyone is welcome to contribute code
|
||||
via pull requests, to file issues on GitHub, to help people asking for
|
||||
help on our mailing lists or on Stack Overflow, to help triage,
|
||||
reproduce, or fix bugs that people have filed, to add to our
|
||||
documentation, or to help out in any other way.
|
||||
|
||||
We grant commit access (which includes full rights to the issue
|
||||
database, such as being able to edit labels) to people who have gained
|
||||
our trust and demonstrated a commitment to Flutter.
|
||||
|
||||
This document focuses on what is needed to contribute by writing code
|
||||
and submitting pull requests for the Flutter framework. For
|
||||
information on contributing in other ways, see [the community page
|
||||
on flutter.io](https://flutter.io/community).
|
||||
|
||||
Developing for Flutter
|
||||
----------------------
|
||||
|
||||
To develop for Flutter, you will eventually need to become familiar
|
||||
with our processes and conventions. This section lists the documents
|
||||
that describe these methodologies. The following list is ordered: you
|
||||
are strongly recommended to go through these documents in the order
|
||||
presented.
|
||||
|
||||
1. [Our code of conduct](CODE_OF_CONDUCT.md), which stipulates explicitly
|
||||
that everyone must be gracious, respectful, and professional. This
|
||||
also documents our conflict resolution policy and encourages people
|
||||
to ask questions.
|
||||
|
||||
2. [Values](https://github.com/flutter/flutter/wiki/Values),
|
||||
which talks about what we care most about.
|
||||
|
||||
3. [Setting up your engine development environment](https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment),
|
||||
which describes the steps you need to configure your computer to
|
||||
work on Flutter's engine. If you only want to write code for the
|
||||
Flutter framework, you can skip this step. Flutter's engine uses
|
||||
mainly C++, Java, and ObjectiveC.
|
||||
|
||||
4. [Setting up your framework development environment](https://github.com/flutter/flutter/wiki/Setting-up-the-Framework-development-environment),
|
||||
which describes the steps you need to configure your computer to
|
||||
work on Flutter's framework. Flutter's framework uses mainly Dart.
|
||||
|
||||
4. [Tree hygiene](https://github.com/flutter/flutter/wiki/Tree-hygiene),
|
||||
which covers how to land a PR, how to do code review, how to
|
||||
handle breaking changes, how to handle regressions, and how to
|
||||
handle post-commit test failures.
|
||||
|
||||
3. [Issue hygiene](https://github.com/flutter/flutter/wiki/Issue-hygiene),
|
||||
which covers our processes around triaging bugs, escalating high
|
||||
priority bugs, assigning bugs, and our GitHub labels and
|
||||
milestones.
|
||||
|
||||
5. [Our style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo),
|
||||
which includes advice for designing APIs for Flutter, and how to
|
||||
format code in the framework.
|
||||
|
||||
In addition to the above, there are many pages on [our
|
||||
Wiki](https://github.com/flutter/flutter/wiki/) that may be of
|
||||
interest. For a curated list of pages see the sidebar on the wiki's
|
||||
home page. They are more or less listed in order of importance.
|
||||
|
||||
If you would like to chat to other people who work on Flutter, consider joining the
|
||||
https://gitter.im/flutter/contributors chat channel. We also have a [general chat
|
||||
channel](https://gitter.im/flutter/flutter) for people who aren't working on Flutter
|
||||
but who use Flutter.
|
@ -1,27 +0,0 @@
|
||||
Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1,17 +0,0 @@
|
||||
Google hereby grants to you a perpetual, worldwide, non-exclusive,
|
||||
no-charge, royalty-free, irrevocable (except as stated in this
|
||||
section) patent license to make, have made, use, offer to sell, sell,
|
||||
import, transfer, and otherwise run, modify and propagate the contents
|
||||
of this implementation, where such license applies only to those
|
||||
patent claims, both currently owned by Google and acquired in the
|
||||
future, licensable by Google that are necessarily infringed by this
|
||||
implementation. This grant does not include claims that would be
|
||||
infringed only as a consequence of further modification of this
|
||||
implementation. If you or your agent or exclusive licensee institute
|
||||
or order or agree to the institution of patent litigation or any other
|
||||
patent enforcement activity against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that this
|
||||
implementation constitutes direct or contributory patent infringement,
|
||||
or inducement of patent infringement, then any patent rights granted
|
||||
to you under this License for this implementation shall terminate as
|
||||
of the date such litigation is filed.
|
@ -1,147 +0,0 @@
|
||||
# <img src="https://flutter.io/images/flutter-mark-square-100.png" alt="Flutter" width="40" height="40" /> Flutter [](https://gitter.im/flutter/flutter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://cirrus-ci.com/github/flutter/flutter/master)
|
||||
[](https://coveralls.io/github/flutter/flutter?branch=master)
|
||||
|
||||
|
||||
# Build beautiful native apps in record time
|
||||
|
||||
Flutter is Google’s mobile app SDK for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.
|
||||
|
||||
### Documentation
|
||||
|
||||
**Main site: [flutter.io][]**
|
||||
* [Install](https://flutter.io/get-started/install/)
|
||||
* [Get started](https://flutter.io/get-started/)
|
||||
* [API documentation](https://docs.flutter.io/)
|
||||
* [Changelog](https://github.com/flutter/flutter/wiki/Changelog)
|
||||
* [How to contribute](https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md)
|
||||
|
||||
For announcements about new releases and breaking changes, follow the
|
||||
[flutter-announce@googlegroups.com](https://groups.google.com/forum/#!forum/flutter-announce)
|
||||
mailing list.
|
||||
|
||||
## Fast development
|
||||
|
||||
Flutter's <em>hot reload</em> helps you quickly
|
||||
and easily experiment, build UIs, add features, and fix
|
||||
bugs. Experience sub-second reload times,
|
||||
without losing state, on
|
||||
emulators, simulators, and hardware for iOS
|
||||
and Android.
|
||||
|
||||
<img src="https://raw.githubusercontent.com/flutter/website/master/src/_assets/image/tools/android-studio/hot-reload.gif" alt="Make a change in your code, and your app changes instantly.">
|
||||
|
||||
## Expressive and flexible UI
|
||||
Quickly ship features with a focus on native end-user experiences.
|
||||
Layered architecture allows full customization, which results in incredibly
|
||||
fast rendering and expressive and flexible designs.
|
||||
|
||||
Delight your users with Flutter's built-in
|
||||
beautiful Material Design and
|
||||
Cupertino (iOS-flavor) widgets, rich motion APIs,
|
||||
smooth natural scrolling, and platform awareness.
|
||||
|
||||
[<img src="https://github.com/flutter/website/blob/master/src/images/homepage/screenshot-1.png" width="270" height="480" alt="Brand-first shopping design" align="left">](https://github.com/flutter/flutter/tree/master/examples/flutter_gallery/lib/demo/animation)
|
||||
[<img src="https://github.com/flutter/website/blob/master/src/images/homepage/screenshot-2.png" width="270" height="480" alt="Fitness app design">](https://github.com/flutter/posse_gallery)
|
||||
|
||||
[<img src="https://github.com/flutter/website/blob/master/src/images/homepage/screenshot-3.png" width="270" height="480" alt="Contact app design" align="left">](https://github.com/flutter/flutter/blob/master/examples/flutter_gallery/lib/demo/contacts_demo.dart)
|
||||
[<img src="https://github.com/flutter/website/blob/master/src/images/homepage/ios-friendlychat.png" width="270" height="480" alt="iOS chat app design">](https://codelabs.developers.google.com/codelabs/flutter/)
|
||||
|
||||
Browse the <a href="https://flutter.io/widgets/">widget catalog</a>.
|
||||
|
||||
## Modern, reactive framework
|
||||
|
||||
Easily compose your UI with Flutter's
|
||||
modern functional-reactive framework and
|
||||
rich set of platform, layout, and foundation widgets.
|
||||
Solve your tough UI challenges with
|
||||
powerful and flexible APIs for 2D, animation, gestures,
|
||||
effects, and more.
|
||||
|
||||
```dart
|
||||
class CounterState extends State<Counter> {
|
||||
int counter = 0;
|
||||
|
||||
void increment() {
|
||||
// Tells the Flutter framework that state has changed,
|
||||
// so the framework can run build() and update the display.
|
||||
setState(() {
|
||||
counter++;
|
||||
});
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
// This method is rerun every time setState is called.
|
||||
// The Flutter framework has been optimized to make rerunning
|
||||
// build methods fast, so that you can just rebuild anything that
|
||||
// needs updating rather than having to individually change
|
||||
// instances of widgets.
|
||||
return Row(
|
||||
children: <Widget>[
|
||||
RaisedButton(
|
||||
onPressed: increment,
|
||||
child: Text('Increment'),
|
||||
),
|
||||
Text('Count: $counter'),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Browse the <a href="https://flutter.io/widgets/">widget catalog</a>
|
||||
and learn more about the
|
||||
<a href="https://flutter.io/widgets-intro/">functional-reactive framework</a>.
|
||||
|
||||
## Access native features and SDKs
|
||||
|
||||
Make your app come to life
|
||||
with platform APIs, 3rd party SDKs,
|
||||
and native code.
|
||||
Flutter lets you reuse your existing Java/Kotlin and ObjC/Swift code,
|
||||
and access native features and SDKs on Android and iOS.
|
||||
|
||||
Accessing platform features is easy. Here is a snippet from our <a href="https://github.com/flutter/flutter/tree/master/examples/platform_channel">interop example</a>:
|
||||
|
||||
```dart
|
||||
Future<void> getBatteryLevel() async {
|
||||
var batteryLevel = 'unknown';
|
||||
try {
|
||||
int result = await methodChannel.invokeMethod('getBatteryLevel');
|
||||
batteryLevel = 'Battery level: $result%';
|
||||
} on PlatformException {
|
||||
batteryLevel = 'Failed to get battery level.';
|
||||
}
|
||||
setState(() {
|
||||
_batteryLevel = batteryLevel;
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
Learn how to use <a href="https://flutter.io/using-packages/">packages</a> or
|
||||
write <a href="https://flutter.io/platform-channels/">platform channels</a>
|
||||
to access native code, APIs, and SDKs.
|
||||
|
||||
## Unified app development
|
||||
|
||||
Flutter has the tools and libraries to help you easily
|
||||
bring your ideas to life on iOS and Android.
|
||||
If you don't have any mobile development experience, Flutter
|
||||
is an easy and fast way to build beautiful mobile apps.
|
||||
If you are an experienced iOS or Android developer,
|
||||
you can use Flutter for your views and leverage much of your
|
||||
existing Java/Kotlin/ObjC/Swift investment.
|
||||
|
||||
Learn more about what makes Flutter special in the
|
||||
<a href="https://flutter.io/technical-overview/">technical overview</a>.
|
||||
|
||||
# More resources
|
||||
|
||||
Join us in our [Gitter chat room](https://gitter.im/flutter/flutter) or join our public mailing list,
|
||||
[flutter-dev@googlegroups.com](https://groups.google.com/forum/#!forum/flutter-dev).
|
||||
|
||||
# How to contribute
|
||||
|
||||
To join the team working on Flutter, see our [contributor guide](CONTRIBUTING.md).
|
||||
|
||||
[flutter.io]: https://flutter.io/
|
@ -1,172 +0,0 @@
|
||||
# Specify analysis options.
|
||||
#
|
||||
# Until there are meta linter rules, each desired lint must be explicitly enabled.
|
||||
# See: https://github.com/dart-lang/linter/issues/288
|
||||
#
|
||||
# For a list of lints, see: http://dart-lang.github.io/linter/lints/
|
||||
# See the configuration guide for more
|
||||
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer
|
||||
#
|
||||
# There are other similar analysis options files in the flutter repos,
|
||||
# which should be kept in sync with this file:
|
||||
#
|
||||
# - analysis_options.yaml (this file)
|
||||
# - packages/flutter/lib/analysis_options_user.yaml
|
||||
# - https://github.com/flutter/plugins/blob/master/analysis_options.yaml
|
||||
# - https://github.com/flutter/engine/blob/master/analysis_options.yaml
|
||||
#
|
||||
# This file contains the analysis options used by Flutter tools, such as IntelliJ,
|
||||
# Android Studio, and the `flutter analyze` command.
|
||||
|
||||
analyzer:
|
||||
strong-mode:
|
||||
implicit-dynamic: false
|
||||
errors:
|
||||
# treat missing required parameters as a warning (not a hint)
|
||||
missing_required_param: warning
|
||||
# treat missing returns as a warning (not a hint)
|
||||
missing_return: warning
|
||||
# allow having TODOs in the code
|
||||
todo: ignore
|
||||
exclude:
|
||||
- 'bin/cache/**'
|
||||
# the following two are relative to the stocks example and the flutter package respectively
|
||||
# see https://github.com/dart-lang/sdk/issues/28463
|
||||
- 'lib/i18n/stock_messages_*.dart'
|
||||
- 'lib/src/http/**'
|
||||
|
||||
linter:
|
||||
rules:
|
||||
# these rules are documented on and in the same order as
|
||||
# the Dart Lint rules page to make maintenance easier
|
||||
# https://github.com/dart-lang/linter/blob/master/example/all.yaml
|
||||
- always_declare_return_types
|
||||
- always_put_control_body_on_new_line
|
||||
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
|
||||
- always_require_non_null_named_parameters
|
||||
- always_specify_types
|
||||
- annotate_overrides
|
||||
# - avoid_annotating_with_dynamic # conflicts with always_specify_types
|
||||
- avoid_as
|
||||
# - avoid_bool_literals_in_conditional_expressions # not yet tested
|
||||
# - avoid_catches_without_on_clauses # we do this commonly
|
||||
# - avoid_catching_errors # we do this commonly
|
||||
- avoid_classes_with_only_static_members
|
||||
# - avoid_double_and_int_checks # only useful when targeting JS runtime
|
||||
- avoid_empty_else
|
||||
- avoid_field_initializers_in_const_classes
|
||||
- avoid_function_literals_in_foreach_calls
|
||||
# - avoid_implementing_value_types # not yet tested
|
||||
- avoid_init_to_null
|
||||
# - avoid_js_rounded_ints # only useful when targeting JS runtime
|
||||
- avoid_null_checks_in_equality_operators
|
||||
# - avoid_positional_boolean_parameters # not yet tested
|
||||
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
|
||||
- avoid_relative_lib_imports
|
||||
- avoid_renaming_method_parameters
|
||||
- avoid_return_types_on_setters
|
||||
# - avoid_returning_null # there are plenty of valid reasons to return null
|
||||
- avoid_returning_null_for_void
|
||||
# - avoid_returning_this # there are plenty of valid reasons to return this
|
||||
# - avoid_setters_without_getters # not yet tested
|
||||
# - avoid_single_cascade_in_expression_statements # not yet tested
|
||||
- avoid_slow_async_io
|
||||
- avoid_types_as_parameter_names
|
||||
# - avoid_types_on_closure_parameters # conflicts with always_specify_types
|
||||
- avoid_unused_constructor_parameters
|
||||
- avoid_void_async
|
||||
- await_only_futures
|
||||
- camel_case_types
|
||||
- cancel_subscriptions
|
||||
# - cascade_invocations # not yet tested
|
||||
# - close_sinks # not reliable enough
|
||||
# - comment_references # blocked on https://github.com/flutter/flutter/issues/20765
|
||||
# - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204
|
||||
- control_flow_in_finally
|
||||
# - curly_braces_in_flow_control_structures # not yet tested
|
||||
- directives_ordering
|
||||
- empty_catches
|
||||
- empty_constructor_bodies
|
||||
- empty_statements
|
||||
# - file_names # not yet tested
|
||||
- flutter_style_todos
|
||||
- hash_and_equals
|
||||
- implementation_imports
|
||||
# - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811
|
||||
- iterable_contains_unrelated_type
|
||||
# - join_return_with_assignment # not yet tested
|
||||
- library_names
|
||||
- library_prefixes
|
||||
# - lines_longer_than_80_chars # not yet tested
|
||||
- list_remove_unrelated_type
|
||||
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
|
||||
- no_adjacent_strings_in_list
|
||||
- no_duplicate_case_values
|
||||
- non_constant_identifier_names
|
||||
# - null_closures # not yet tested
|
||||
# - omit_local_variable_types # opposite of always_specify_types
|
||||
# - one_member_abstracts # too many false positives
|
||||
# - only_throw_errors # https://github.com/flutter/flutter/issues/5792
|
||||
- overridden_fields
|
||||
- package_api_docs
|
||||
- package_names
|
||||
- package_prefixed_library_names
|
||||
# - parameter_assignments # we do this commonly
|
||||
- prefer_adjacent_string_concatenation
|
||||
- prefer_asserts_in_initializer_lists
|
||||
- prefer_bool_in_asserts
|
||||
- prefer_collection_literals
|
||||
- prefer_conditional_assignment
|
||||
- prefer_const_constructors
|
||||
- prefer_const_constructors_in_immutables
|
||||
- prefer_const_declarations
|
||||
- prefer_const_literals_to_create_immutables
|
||||
# - prefer_constructors_over_static_methods # not yet tested
|
||||
- prefer_contains
|
||||
- prefer_equal_for_default_values
|
||||
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
|
||||
- prefer_final_fields
|
||||
- prefer_final_locals
|
||||
- prefer_foreach
|
||||
# - prefer_function_declarations_over_variables # not yet tested
|
||||
- prefer_generic_function_type_aliases
|
||||
- prefer_initializing_formals
|
||||
# - prefer_int_literals # not yet tested
|
||||
# - prefer_interpolation_to_compose_strings # not yet tested
|
||||
- prefer_is_empty
|
||||
- prefer_is_not_empty
|
||||
- prefer_iterable_whereType
|
||||
# - prefer_mixin # https://github.com/dart-lang/language/issues/32
|
||||
- prefer_single_quotes
|
||||
- prefer_typing_uninitialized_variables
|
||||
- prefer_void_to_null
|
||||
# - public_member_api_docs # enabled on a case-by-case basis; see e.g. packages/analysis_options.yaml
|
||||
- recursive_getters
|
||||
- slash_for_doc_comments
|
||||
- sort_constructors_first
|
||||
- sort_pub_dependencies
|
||||
- sort_unnamed_constructors_first
|
||||
- super_goes_last
|
||||
- test_types_in_equals
|
||||
- throw_in_finally
|
||||
# - type_annotate_public_apis # subset of always_specify_types
|
||||
- type_init_formals
|
||||
# - unawaited_futures # too many false positives
|
||||
- unnecessary_brace_in_string_interps
|
||||
- unnecessary_const
|
||||
- unnecessary_getters_setters
|
||||
# - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
|
||||
- unnecessary_new
|
||||
- unnecessary_null_aware_assignments
|
||||
- unnecessary_null_in_if_null_operators
|
||||
- unnecessary_overrides
|
||||
- unnecessary_parenthesis
|
||||
- unnecessary_statements
|
||||
- unnecessary_this
|
||||
- unrelated_type_equality_checks
|
||||
- use_rethrow_when_possible
|
||||
# - use_setters_to_change_properties # not yet tested
|
||||
# - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182
|
||||
# - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review
|
||||
- valid_regexps
|
||||
# - void_checks # not yet tested
|
@ -1,177 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
|
||||
# ---------------------------------- NOTE ---------------------------------- #
|
||||
#
|
||||
# Please keep the logic in this file consistent with the logic in the
|
||||
# `flutter.bat` script in the same directory to ensure that Flutter continues
|
||||
# to work across all platforms!
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
|
||||
set -e
|
||||
|
||||
unset CDPATH
|
||||
|
||||
function follow_links() {
|
||||
cd -P "${1%/*}"
|
||||
local file="$PWD/${1##*/}"
|
||||
while [[ -h "$file" ]]; do
|
||||
# On Mac OS, readlink -f doesn't work.
|
||||
cd -P "${file%/*}"
|
||||
file="$(readlink "$file")"
|
||||
cd -P "${file%/*}"
|
||||
file="$PWD/${file##*/}"
|
||||
done
|
||||
echo "$PWD/${file##*/}"
|
||||
}
|
||||
|
||||
# Convert a filesystem path to a format usable by Dart's URI parser.
|
||||
function path_uri() {
|
||||
# Reduce multiple leading slashes to a single slash.
|
||||
echo "$1" | sed -E -e "s,^/+,/,"
|
||||
}
|
||||
|
||||
function _rmlock () {
|
||||
[ -n "$FLUTTER_UPGRADE_LOCK" ] && rm -f "$FLUTTER_UPGRADE_LOCK"
|
||||
}
|
||||
|
||||
function retry_upgrade {
|
||||
local total_tries="10"
|
||||
local remaining_tries=$(($total_tries - 1))
|
||||
while [[ "$remaining_tries" > 0 ]]; do
|
||||
(cd "$FLUTTER_TOOLS_DIR" && "$PUB" upgrade "$VERBOSITY" --no-packages-dir) && break
|
||||
echo "Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... ($remaining_tries tries left)"
|
||||
remaining_tries=$(($remaining_tries - 1))
|
||||
sleep 5
|
||||
done
|
||||
|
||||
if [[ "$remaining_tries" == 0 ]]; then
|
||||
echo "Command 'pub upgrade' still failed after $total_tries tries, giving up."
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
function upgrade_flutter () {
|
||||
mkdir -p "$FLUTTER_ROOT/bin/cache"
|
||||
|
||||
# This function is executed with a redirect that pipes the source of
|
||||
# this script into file descriptor 3.
|
||||
#
|
||||
# To ensure that we don't simultaneously update Dart in multiple
|
||||
# parallel instances, we try to obtain an exclusive lock on this
|
||||
# file descriptor (and thus this script's source file) while we are
|
||||
# updating Dart and compiling the script. To do this, we try to use
|
||||
# the command line program "flock", which is available on many
|
||||
# Unix-like platforms, in particular on most Linux distributions.
|
||||
# You give it a file descriptor, and it locks the corresponding
|
||||
# file, having inherited the file descriptor from the shell.
|
||||
#
|
||||
# Complicating matters, there are two major scenarios where this
|
||||
# will not work.
|
||||
#
|
||||
# The first is if the platform doesn't have "flock", for example on Mac.
|
||||
# There is not a direct equivalent, so on platforms that don't have flock,
|
||||
# we fall back to using a lockfile and spinlock with "shlock". This
|
||||
# doesn't work as well over NFS as it relies on PIDs. Any platform
|
||||
# without either of these tools has no locking at all. To determine if we
|
||||
# have "flock" or "shlock" available, we abuse the "hash" shell built-in.
|
||||
#
|
||||
# The second complication is NFS. On NFS, to obtain an exclusive
|
||||
# lock you need a file descriptor that is open for writing, because
|
||||
# NFS implements exclusive locks by writing, or some such. Thus, we
|
||||
# ignore errors from flock. We do so by using the '|| true' trick,
|
||||
# since we are running in a 'set -e' environment wherein all errors
|
||||
# are fatal, and by redirecting all output to /dev/null, since
|
||||
# users will typically not care about errors from flock and are
|
||||
# more likely to be confused by them than helped.
|
||||
#
|
||||
# For "flock", the lock is released when the file descriptor goes out of
|
||||
# scope, i.e. when this function returns. The lock is released via
|
||||
# a trap when using "shlock".
|
||||
if hash flock 2>/dev/null; then
|
||||
flock 3 2>/dev/null || true
|
||||
elif hash shlock 2>/dev/null; then
|
||||
FLUTTER_UPGRADE_LOCK="$FLUTTER_ROOT/bin/cache/.upgrade_lock"
|
||||
while ! shlock -f "$FLUTTER_UPGRADE_LOCK" -p $$ ; do sleep .1 ; done
|
||||
trap _rmlock EXIT
|
||||
fi
|
||||
|
||||
local revision="$(cd "$FLUTTER_ROOT"; git rev-parse HEAD)"
|
||||
if [[ ! -f "$SNAPSHOT_PATH" || ! -s "$STAMP_PATH" || "$(cat "$STAMP_PATH")" != "$revision" || "$FLUTTER_TOOLS_DIR/pubspec.yaml" -nt "$FLUTTER_TOOLS_DIR/pubspec.lock" ]]; then
|
||||
rm -f "$FLUTTER_ROOT/version"
|
||||
touch "$FLUTTER_ROOT/bin/cache/.dartignore"
|
||||
"$FLUTTER_ROOT/bin/internal/update_dart_sdk.sh"
|
||||
VERBOSITY="--verbosity=error"
|
||||
|
||||
echo Building flutter tool...
|
||||
if [[ "$CI" == "true" || "$BOT" == "true" || "$CONTINUOUS_INTEGRATION" == "true" || "$CHROME_HEADLESS" == "1" ]]; then
|
||||
PUB_ENVIRONMENT="$PUB_ENVIRONMENT:flutter_bot"
|
||||
VERBOSITY="--verbosity=normal"
|
||||
fi
|
||||
export PUB_ENVIRONMENT="$PUB_ENVIRONMENT:flutter_install"
|
||||
|
||||
if [[ -d "$FLUTTER_ROOT/.pub-cache" ]]; then
|
||||
export PUB_CACHE="${PUB_CACHE:-"$FLUTTER_ROOT/.pub-cache"}"
|
||||
fi
|
||||
|
||||
retry_upgrade
|
||||
|
||||
"$DART" --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH"
|
||||
echo "$revision" > "$STAMP_PATH"
|
||||
fi
|
||||
# The exit here is duplicitous since the function is run in a subshell,
|
||||
# but this serves as documentation that running the function in a
|
||||
# subshell is required to make sure any lockfile created by shlock
|
||||
# is cleaned up.
|
||||
exit $?
|
||||
}
|
||||
|
||||
PROG_NAME="$(path_uri "$(follow_links "$BASH_SOURCE")")"
|
||||
BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
|
||||
export FLUTTER_ROOT="$(cd "${BIN_DIR}/.." ; pwd -P)"
|
||||
|
||||
FLUTTER_TOOLS_DIR="$FLUTTER_ROOT/packages/flutter_tools"
|
||||
SNAPSHOT_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.snapshot"
|
||||
STAMP_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.stamp"
|
||||
SCRIPT_PATH="$FLUTTER_TOOLS_DIR/bin/flutter_tools.dart"
|
||||
DART_SDK_PATH="$FLUTTER_ROOT/bin/cache/dart-sdk"
|
||||
|
||||
DART="$DART_SDK_PATH/bin/dart"
|
||||
PUB="$DART_SDK_PATH/bin/pub"
|
||||
|
||||
# Test if running as superuser – but don't warn if running within Docker
|
||||
if [[ "$EUID" == "0" && ! -f /.dockerenv ]]; then
|
||||
echo " Woah! You appear to be trying to run flutter as root."
|
||||
echo " We strongly recommend running the flutter tool without superuser privileges."
|
||||
echo " /"
|
||||
echo "📎"
|
||||
fi
|
||||
|
||||
# Test if Git is available on the Host
|
||||
if ! hash git 2>/dev/null; then
|
||||
echo "Error: Unable to find git in your PATH."
|
||||
exit 1
|
||||
fi
|
||||
# Test if the flutter directory is a git clone (otherwise git rev-parse HEAD would fail)
|
||||
if [[ ! -e "$FLUTTER_ROOT/.git" ]]; then
|
||||
echo "Error: The Flutter directory is not a clone of the GitHub project."
|
||||
echo " The flutter tool requires Git in order to operate properly;"
|
||||
echo " to set up Flutter, run the following command:"
|
||||
echo " git clone -b beta https://github.com/flutter/flutter.git"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# To debug the tool, you can uncomment the following lines to enable checked mode and set an observatory port:
|
||||
# FLUTTER_TOOL_ARGS="--checked $FLUTTER_TOOL_ARGS"
|
||||
# FLUTTER_TOOL_ARGS="$FLUTTER_TOOL_ARGS --observe=65432"
|
||||
|
||||
(upgrade_flutter) 3< "$PROG_NAME"
|
||||
|
||||
# FLUTTER_TOOL_ARGS isn't quoted below, because it is meant to be considered as
|
||||
# separate space-separated args.
|
||||
"$DART" $FLUTTER_TOOL_ARGS "$SNAPSHOT_PATH" "$@"
|
@ -1,179 +0,0 @@
|
||||
@ECHO off
|
||||
REM Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
REM Use of this source code is governed by a BSD-style license that can be
|
||||
REM found in the LICENSE file.
|
||||
|
||||
|
||||
REM ---------------------------------- NOTE ----------------------------------
|
||||
REM
|
||||
REM Please keep the logic in this file consistent with the logic in the
|
||||
REM `flutter` script in the same directory to ensure that Flutter continues to
|
||||
REM work across all platforms!
|
||||
REM
|
||||
REM --------------------------------------------------------------------------
|
||||
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
FOR %%i IN ("%~dp0..") DO SET FLUTTER_ROOT=%%~fi
|
||||
|
||||
SET flutter_tools_dir=%FLUTTER_ROOT%\packages\flutter_tools
|
||||
SET cache_dir=%FLUTTER_ROOT%\bin\cache
|
||||
SET snapshot_path=%cache_dir%\flutter_tools.snapshot
|
||||
SET stamp_path=%cache_dir%\flutter_tools.stamp
|
||||
SET script_path=%flutter_tools_dir%\bin\flutter_tools.dart
|
||||
SET dart_sdk_path=%cache_dir%\dart-sdk
|
||||
SET engine_stamp=%cache_dir%\engine-dart-sdk.stamp
|
||||
SET engine_version_path=%FLUTTER_ROOT%\bin\internal\engine.version
|
||||
SET pub_cache_path=%FLUTTER_ROOT%\.pub-cache
|
||||
|
||||
SET dart=%dart_sdk_path%\bin\dart.exe
|
||||
SET pub=%dart_sdk_path%\bin\pub.bat
|
||||
|
||||
REM If available, add location of bundled mingit to PATH
|
||||
SET mingit_path=%FLUTTER_ROOT%\bin\mingit\cmd
|
||||
IF EXIST "%mingit_path%" SET PATH=%PATH%;%mingit_path%
|
||||
|
||||
REM Test if Git is available on the Host
|
||||
where /q git || ECHO Error: Unable to find git in your PATH. && EXIT /B 1
|
||||
REM Test if the flutter directory is a git clone, otherwise git rev-parse HEAD would fail
|
||||
IF NOT EXIST "%flutter_root%\.git" (
|
||||
ECHO Error: The Flutter directory is not a clone of the GitHub project.
|
||||
ECHO The flutter tool requires Git in order to operate properly;
|
||||
ECHO to set up Flutter, run the following command:
|
||||
ECHO git clone -b beta https://github.com/flutter/flutter.git
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
REM Ensure that bin/cache exists.
|
||||
IF NOT EXIST "%cache_dir%" MKDIR "%cache_dir%"
|
||||
|
||||
REM If the cache still doesn't exist, fail with an error that we probably don't have permissions.
|
||||
IF NOT EXIST "%cache_dir%" (
|
||||
ECHO Error: Unable to create cache directory at
|
||||
ECHO %cache_dir%
|
||||
ECHO.
|
||||
ECHO This may be because flutter doesn't have write permissions for
|
||||
ECHO this path. Try moving the flutter directory to a writable location,
|
||||
ECHO such as within your home directory.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
|
||||
REM To debug the tool, you can uncomment the following lines to enable checked mode and set an observatory port:
|
||||
REM SET FLUTTER_TOOL_ARGS="--checked %FLUTTER_TOOL_ARGS%"
|
||||
REM SET FLUTTER_TOOL_ARGS="%FLUTTER_TOOL_ARGS% --observe=65432"
|
||||
|
||||
:acquire_lock
|
||||
2>NUL (
|
||||
REM "3" is now stderr because of "2>NUL".
|
||||
CALL :subroutine %* 2>&3 9> "%cache_dir%\flutter.bat.lock" || GOTO acquire_lock
|
||||
)
|
||||
GOTO :after_subroutine
|
||||
|
||||
:subroutine
|
||||
PUSHD "%flutter_root%"
|
||||
FOR /f %%r IN ('git rev-parse HEAD') DO SET revision=%%r
|
||||
POPD
|
||||
|
||||
REM The following IF conditions are all linked with a logical OR. However,
|
||||
REM there is no OR operator in batch and a GOTO construct is used as replacement.
|
||||
|
||||
IF NOT EXIST "%engine_stamp%" GOTO do_sdk_update_and_snapshot
|
||||
SET /P dart_required_version=<"%engine_version_path%"
|
||||
SET /P dart_installed_version=<"%engine_stamp%"
|
||||
IF !dart_required_version! NEQ !dart_installed_version! GOTO do_sdk_update_and_snapshot
|
||||
IF NOT EXIST "%snapshot_path%" GOTO do_snapshot
|
||||
IF NOT EXIST "%stamp_path%" GOTO do_snapshot
|
||||
SET /P stamp_value=<"%stamp_path%"
|
||||
IF !stamp_value! NEQ !revision! GOTO do_snapshot
|
||||
SET pubspec_yaml_path=%flutter_tools_dir%\pubspec.yaml
|
||||
SET pubspec_lock_path=%flutter_tools_dir%\pubspec.lock
|
||||
FOR /F %%i IN ('DIR /B /O:D "%pubspec_yaml_path%" "%pubspec_lock_path%"') DO SET newer_file=%%i
|
||||
FOR %%i IN (%pubspec_yaml_path%) DO SET pubspec_yaml_timestamp=%%~ti
|
||||
FOR %%i IN (%pubspec_lock_path%) DO SET pubspec_lock_timestamp=%%~ti
|
||||
IF "%pubspec_yaml_timestamp%" == "%pubspec_lock_timestamp%" SET newer_file=""
|
||||
IF "%newer_file%" EQU "pubspec.yaml" GOTO do_snapshot
|
||||
|
||||
REM Everything is uptodate - exit subroutine
|
||||
EXIT /B
|
||||
|
||||
:do_sdk_update_and_snapshot
|
||||
ECHO Checking Dart SDK version...
|
||||
SET update_dart_bin=%FLUTTER_ROOT%/bin/internal/update_dart_sdk.ps1
|
||||
REM Escape apostrophes from the executable path
|
||||
SET "update_dart_bin=!update_dart_bin:'=''!"
|
||||
PowerShell.exe -ExecutionPolicy Bypass -Command "Unblock-File -Path '%update_dart_bin%'; & '%update_dart_bin%'"
|
||||
IF "%ERRORLEVEL%" NEQ "0" (
|
||||
ECHO Error: Unable to update Dart SDK. Retrying...
|
||||
timeout /t 5 /nobreak
|
||||
GOTO :do_sdk_update_and_snapshot
|
||||
)
|
||||
|
||||
:do_snapshot
|
||||
IF EXIST "%FLUTTER_ROOT%\version" DEL "%FLUTTER_ROOT%\version"
|
||||
ECHO: > "%cache_dir%\.dartignore"
|
||||
ECHO Building flutter tool...
|
||||
PUSHD "%flutter_tools_dir%"
|
||||
|
||||
REM Makes changes to PUB_ENVIRONMENT only visible to commands within SETLOCAL/ENDLOCAL
|
||||
SETLOCAL
|
||||
SET VERBOSITY=--verbosity=error
|
||||
IF "%CI%" == "true" GOTO on_bot
|
||||
IF "%BOT%" == "true" GOTO on_bot
|
||||
IF "%CONTINUOUS_INTEGRATION%" == "true" GOTO on_bot
|
||||
IF "%CHROME_HEADLESS%" == "1" GOTO on_bot
|
||||
GOTO not_on_bot
|
||||
:on_bot
|
||||
SET PUB_ENVIRONMENT=%PUB_ENVIRONMENT%:flutter_bot
|
||||
SET VERBOSITY=--verbosity=normal
|
||||
:not_on_bot
|
||||
SET PUB_ENVIRONMENT=%PUB_ENVIRONMENT%:flutter_install
|
||||
IF "%PUB_CACHE%" == "" (
|
||||
IF EXIST "%pub_cache_path%" SET PUB_CACHE=%pub_cache_path%
|
||||
)
|
||||
|
||||
SET /A total_tries=10
|
||||
SET /A remaining_tries=%total_tries%-1
|
||||
:retry_pub_upgrade
|
||||
ECHO Running pub upgrade...
|
||||
CALL "%pub%" upgrade "%VERBOSITY%" --no-packages-dir
|
||||
IF "%ERRORLEVEL%" EQU "0" goto :upgrade_succeeded
|
||||
ECHO Error Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (%remaining_tries% tries left)
|
||||
timeout /t 5 /nobreak 2>NUL
|
||||
SET /A remaining_tries-=1
|
||||
IF "%remaining_tries%" EQU "0" GOTO upgrade_retries_exhausted
|
||||
GOTO :retry_pub_upgrade
|
||||
:upgrade_retries_exhausted
|
||||
SET exit_code=%ERRORLEVEL%
|
||||
ECHO Error: 'pub upgrade' still failing after %total_tries% tries, giving up.
|
||||
GOTO final_exit
|
||||
:upgrade_succeeded
|
||||
ENDLOCAL
|
||||
|
||||
POPD
|
||||
|
||||
"%dart%" --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" "%script_path%"
|
||||
IF "%ERRORLEVEL%" NEQ "0" (
|
||||
ECHO Error: Unable to create dart snapshot for flutter tool.
|
||||
SET exit_code=%ERRORLEVEL%
|
||||
GOTO :final_exit
|
||||
)
|
||||
>"%stamp_path%" ECHO %revision%
|
||||
|
||||
REM Exit Subroutine
|
||||
EXIT /B
|
||||
|
||||
:after_subroutine
|
||||
|
||||
REM Chaining the call to 'dart' and 'exit' with an ampersand ensures that
|
||||
REM Windows reads both commands into memory once before executing them. This
|
||||
REM avoids nasty errors that may otherwise occure when the dart command (e.g. as
|
||||
REM part of 'flutter upgrade') modifies this batch script while it is executing.
|
||||
REM
|
||||
REM Do not use the CALL command in the next line to execute Dart. CALL causes
|
||||
REM Windows to re-read the line from disk after the CALL command has finished
|
||||
REM regardless of the ampersand chain.
|
||||
"%dart%" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %* & exit /B !ERRORLEVEL!
|
||||
|
||||
:final_exit
|
||||
EXIT /B %exit_code%
|
@ -1,13 +0,0 @@
|
||||
Dart SDK dependency
|
||||
===================
|
||||
|
||||
The `bin/internal/engine.version` file controls which version of the Flutter engine to use.
|
||||
The file contains the commit hash of a commit in the <https://github.com/flutter/engine> repository.
|
||||
That hash must have successfully been compiled on <https://build.chromium.org/p/client.flutter/> and had its artifacts (the binaries that run on Android and iOS, the compiler, etc) successfully uploaded to Google Cloud Storage.
|
||||
|
||||
The `/bin/internal/engine.merge_method` file controls how we merge a pull
|
||||
request created by the engine auto-roller. If it's `squash`, there's only one
|
||||
commit for a pull request no matter how many engine commits there are inside
|
||||
that pull request. If it's `rebase`, the number of commits in the framework is
|
||||
equal to the number of engine commits in the pull request. The latter method
|
||||
makes it easier to detect regressions but costs more test resources.
|
@ -1 +0,0 @@
|
||||
squash
|
@ -1 +0,0 @@
|
||||
7375a0f414bde4bc941e623482221db2fc8c4ab5
|
@ -1 +0,0 @@
|
||||
e07cc0cb4fdf912062e71a6fd97cc91478d6e3b9
|
@ -1 +0,0 @@
|
||||
flutter_infra/gradle-wrapper/fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa/gradle-wrapper.tgz
|
@ -1 +0,0 @@
|
||||
flutter_infra/flutter/fonts/13ac995daa9dda0a6ba0a45f1fccc541e616a74c/fonts.zip
|
@ -1,79 +0,0 @@
|
||||
# Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
|
||||
# ---------------------------------- NOTE ---------------------------------- #
|
||||
#
|
||||
# Please keep the logic in this file consistent with the logic in the
|
||||
# `update_dart_sdk.sh` script in the same directory to ensure that Flutter
|
||||
# continues to work across all platforms!
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$progName = Split-Path -parent $MyInvocation.MyCommand.Definition
|
||||
$flutterRoot = (Get-Item $progName).parent.parent.FullName
|
||||
|
||||
$cachePath = "$flutterRoot\bin\cache"
|
||||
$dartSdkPath = "$cachePath\dart-sdk"
|
||||
$engineStamp = "$cachePath\engine-dart-sdk.stamp"
|
||||
$engineVersion = (Get-Content "$flutterRoot\bin\internal\engine.version")
|
||||
|
||||
$oldDartSdkPrefix = "dart-sdk.old"
|
||||
|
||||
if ((Test-Path $engineStamp) -and ($engineVersion -eq (Get-Content $engineStamp))) {
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "Downloading Dart SDK from Flutter engine $engineVersion..."
|
||||
$dartSdkBaseUrl = $Env:FLUTTER_STORAGE_BASE_URL
|
||||
if (-not $dartSdkBaseUrl) {
|
||||
$dartSdkBaseUrl = "https://storage.googleapis.com"
|
||||
}
|
||||
$dartZipName = "dart-sdk-windows-x64.zip"
|
||||
$dartSdkUrl = "$dartSdkBaseUrl/flutter_infra/flutter/$engineVersion/$dartZipName"
|
||||
|
||||
if (Test-Path $dartSdkPath) {
|
||||
# Move old SDK to a new location instead of deleting it in case it is still in use (e.g. by IntelliJ).
|
||||
$oldDartSdkSuffix = 1
|
||||
while (Test-Path "$cachePath\$oldDartSdkPrefix$oldDartSdkSuffix") { $oldDartSdkSuffix++ }
|
||||
Rename-Item $dartSdkPath "$oldDartSdkPrefix$oldDartSdkSuffix"
|
||||
}
|
||||
New-Item $dartSdkPath -force -type directory | Out-Null
|
||||
$dartSdkZip = "$cachePath\$dartZipName"
|
||||
|
||||
Try {
|
||||
Import-Module BitsTransfer
|
||||
Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
|
||||
}
|
||||
Catch {
|
||||
Write-Host "Downloading the Dart SDK using the BITS service failed, retrying with WebRequest..."
|
||||
Invoke-WebRequest -Uri $dartSdkUrl -OutFile $dartSdkZip
|
||||
}
|
||||
|
||||
Write-Host "Unzipping Dart SDK..."
|
||||
If (Get-Command 7z -errorAction SilentlyContinue) {
|
||||
# The built-in unzippers are painfully slow. Use 7-Zip, if available.
|
||||
& 7z x $dartSdkZip "-o$cachePath" -bd | Out-Null
|
||||
} ElseIf (Get-Command 7za -errorAction SilentlyContinue) {
|
||||
# Use 7-Zip's standalone version 7za.exe, if available.
|
||||
& 7za x $dartSdkZip "-o$cachePath" -bd | Out-Null
|
||||
} ElseIf (Get-Command Expand-Archive -errorAction SilentlyContinue) {
|
||||
# Use PowerShell's built-in unzipper, if available (requires PowerShell 5+).
|
||||
Expand-Archive $dartSdkZip -DestinationPath $cachePath
|
||||
} Else {
|
||||
# As last resort: fall back to the Windows GUI.
|
||||
$shell = New-Object -com shell.application
|
||||
$zip = $shell.NameSpace($dartSdkZip)
|
||||
foreach($item in $zip.items()) {
|
||||
$shell.Namespace($cachePath).copyhere($item)
|
||||
}
|
||||
}
|
||||
|
||||
Remove-Item $dartSdkZip
|
||||
$engineVersion | Out-File $engineStamp -Encoding ASCII
|
||||
|
||||
# Try to delete all old SDKs.
|
||||
Get-ChildItem -Path $cachePath | Where {$_.BaseName.StartsWith($oldDartSdkPrefix)} | Remove-Item -Recurse -ErrorAction SilentlyContinue
|
@ -1,79 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
|
||||
# ---------------------------------- NOTE ---------------------------------- #
|
||||
#
|
||||
# Please keep the logic in this file consistent with the logic in the
|
||||
# `update_dart_sdk.ps1` script in the same directory to ensure that Flutter
|
||||
# continues to work across all platforms!
|
||||
#
|
||||
# -------------------------------------------------------------------------- #
|
||||
|
||||
set -e
|
||||
|
||||
FLUTTER_ROOT="$(dirname "$(dirname "$(dirname "${BASH_SOURCE[0]}")")")"
|
||||
|
||||
DART_SDK_PATH="$FLUTTER_ROOT/bin/cache/dart-sdk"
|
||||
DART_SDK_PATH_OLD="$DART_SDK_PATH.old"
|
||||
ENGINE_STAMP="$FLUTTER_ROOT/bin/cache/engine-dart-sdk.stamp"
|
||||
ENGINE_VERSION=`cat "$FLUTTER_ROOT/bin/internal/engine.version"`
|
||||
|
||||
if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; then
|
||||
echo "Downloading Dart SDK from Flutter engine $ENGINE_VERSION..."
|
||||
|
||||
case "$(uname -s)" in
|
||||
Darwin)
|
||||
DART_ZIP_NAME="dart-sdk-darwin-x64.zip"
|
||||
;;
|
||||
Linux)
|
||||
DART_ZIP_NAME="dart-sdk-linux-x64.zip"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown operating system. Cannot install Dart SDK."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
DART_SDK_BASE_URL="${FLUTTER_STORAGE_BASE_URL:-https://storage.googleapis.com}"
|
||||
DART_SDK_URL="$DART_SDK_BASE_URL/flutter_infra/flutter/$ENGINE_VERSION/$DART_ZIP_NAME"
|
||||
|
||||
# if the sdk path exists, copy it to a temporary location
|
||||
if [ -d "$DART_SDK_PATH" ]; then
|
||||
rm -rf "$DART_SDK_PATH_OLD"
|
||||
mv "$DART_SDK_PATH" "$DART_SDK_PATH_OLD"
|
||||
fi
|
||||
|
||||
# install the new sdk
|
||||
rm -rf -- "$DART_SDK_PATH"
|
||||
mkdir -p -- "$DART_SDK_PATH"
|
||||
DART_SDK_ZIP="$FLUTTER_ROOT/bin/cache/$DART_ZIP_NAME"
|
||||
|
||||
curl --continue-at - --location --output "$DART_SDK_ZIP" "$DART_SDK_URL" 2>&1 || {
|
||||
echo
|
||||
echo "Failed to retrieve the Dart SDK at $DART_SDK_URL"
|
||||
echo "If you're located in China, please follow"
|
||||
echo "https://github.com/flutter/flutter/wiki/Using-Flutter-in-China"
|
||||
echo
|
||||
rm -f -- "$DART_SDK_ZIP"
|
||||
exit 1
|
||||
}
|
||||
unzip -o -q "$DART_SDK_ZIP" -d "$FLUTTER_ROOT/bin/cache" || {
|
||||
echo
|
||||
echo "It appears that the downloaded file is corrupt; please try the operation again later."
|
||||
echo "If this problem persists, please report the problem at"
|
||||
echo "https://github.com/flutter/flutter/issues/new?template=ACTIVATION.md"
|
||||
echo
|
||||
rm -f -- "$DART_SDK_ZIP"
|
||||
exit 1
|
||||
}
|
||||
rm -f -- "$DART_SDK_ZIP"
|
||||
echo "$ENGINE_VERSION" > "$ENGINE_STAMP"
|
||||
|
||||
# delete any temporary sdk path
|
||||
if [ -d "$DART_SDK_PATH_OLD" ]; then
|
||||
rm -rf "$DART_SDK_PATH_OLD"
|
||||
fi
|
||||
fi
|
@ -1,11 +0,0 @@
|
||||
# This file is used by dartdoc when generating API documentation for Flutter.
|
||||
dartdoc:
|
||||
# Before you can run dartdoc, the snippets tool needs to have a snapshot built.
|
||||
# The dev/tools/dartdoc.dart script does this automatically.
|
||||
tools:
|
||||
snippet:
|
||||
command: ["dev/snippets/lib/main.dart", "--type=application"]
|
||||
description: "Creates application sample code documentation output from embedded documentation samples."
|
||||
sample:
|
||||
command: ["dev/snippets/lib/main.dart", "--type=sample"]
|
||||
description: "Creates sample code documentation output from embedded documentation samples."
|
@ -1,4 +0,0 @@
|
||||
This directory contains tools and resources that the Flutter team uses
|
||||
during development of the framework. The tools in this directory
|
||||
should not be necessary for developing Flutter applications, though of
|
||||
course they may be interesting if you are curious.
|
@ -1,2 +0,0 @@
|
||||
This is a fake package for use by automated testing.
|
||||
For example, the `flutter_tools` package uses this to test `flutter test`.
|
@ -1,5 +0,0 @@
|
||||
The files in this directory are used as part of tests in the
|
||||
`flutter_tools` package. Some are here because here these tests need a
|
||||
`pubspec.yaml` that references the flutter framework (which is
|
||||
intentionally not true of the `flutter_tools` package). Others are
|
||||
here mostly out of peer pressure.
|
@ -1,61 +0,0 @@
|
||||
<<skip until matching line>>
|
||||
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
|
||||
The following message was thrown running a test:
|
||||
Who lives, who dies, who tells your story\?
|
||||
|
||||
When the exception was thrown, this was the stack:
|
||||
#0 main.<anonymous closure> \(.+[/\\]dev[/\\]automated_tests[/\\]flutter_test[/\\]exception_handling_test\.dart:10:5\)
|
||||
<asynchronous suspension>
|
||||
#1 .+ \(package:flutter_test[/\\]src[/\\]widget_tester\.dart:[0-9]+:[0-9]+\)
|
||||
<<skip until matching line>>
|
||||
^\(elided [0-9]+ .+\)$
|
||||
|
||||
The test description was:
|
||||
Exception handling in test harness - string
|
||||
════════════════════════════════════════════════════════════════════════════════════════════════════
|
||||
.*(this line has more of the test framework's output)?
|
||||
Test failed\. See exception logs above\.
|
||||
The test description was: Exception handling in test harness - string
|
||||
*
|
||||
[^═]*(this line contains the test framework's output with the clock and so forth)?
|
||||
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
|
||||
The following assertion was thrown running a test:
|
||||
Who lives, who dies, who tells your story\?
|
||||
|
||||
When the exception was thrown, this was the stack:
|
||||
#0 main.<anonymous closure> \(.+[/\\]dev[/\\]automated_tests[/\\]flutter_test[/\\]exception_handling_test\.dart:13:5\)
|
||||
<asynchronous suspension>
|
||||
#1 .+ \(package:flutter_test[/\\]src[/\\]widget_tester\.dart:[0-9]+:[0-9]+\)
|
||||
<<skip until matching line>>
|
||||
^\(elided [0-9]+ .+\)$
|
||||
|
||||
The test description was:
|
||||
Exception handling in test harness - FlutterError
|
||||
════════════════════════════════════════════════════════════════════════════════════════════════════
|
||||
.*(this line has more of the test framework's output)?
|
||||
Test failed\. See exception logs above\.
|
||||
The test description was: Exception handling in test harness - FlutterError
|
||||
*
|
||||
[^═]*(this line contains the test framework's output with the clock and so forth)?
|
||||
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
|
||||
The following message was thrown running a test:
|
||||
Who lives, who dies, who tells your story\?
|
||||
|
||||
When the exception was thrown, this was the stack:
|
||||
#[0-9]+ +main.<anonymous closure> \(.+[/\\]dev[/\\]automated_tests[/\\]flutter_test[/\\]exception_handling_test\.dart:15:105\)
|
||||
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\)
|
||||
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\)
|
||||
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\)
|
||||
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\)
|
||||
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]widget_tester\.dart:[0-9]+:[0-9]+\)
|
||||
<<skip until matching line>>
|
||||
^\(elided [0-9]+ .+\)$
|
||||
|
||||
The test description was:
|
||||
Exception handling in test harness - uncaught Future error
|
||||
════════════════════════════════════════════════════════════════════════════════════════════════════
|
||||
.*(this line has more of the test framework's output)?
|
||||
Test failed\. See exception logs above\.
|
||||
The test description was: Exception handling in test harness - uncaught Future error
|
||||
*
|
||||
.*..:.. \+0 -3: Some tests failed\. *
|
@ -1,18 +0,0 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Exception handling in test harness - string', (WidgetTester tester) async {
|
||||
throw 'Who lives, who dies, who tells your story?';
|
||||
});
|
||||
testWidgets('Exception handling in test harness - FlutterError', (WidgetTester tester) async {
|
||||
throw FlutterError('Who lives, who dies, who tells your story?');
|
||||
});
|
||||
testWidgets('Exception handling in test harness - uncaught Future error', (WidgetTester tester) async {
|
||||
Future<void>.error('Who lives, who dies, who tells your story?');
|
||||
});
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
|
||||
|
||||
void main() {
|
||||
test('included', () {
|
||||
expect(2 + 2, 4);
|
||||
});
|
||||
test('excluded', () {
|
||||
throw 'this test should have been filtered out';
|
||||
});
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
<<skip until matching line>>
|
||||
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
|
||||
The following assertion was thrown running a test:
|
||||
Guarded function conflict\. You must use "await" with all Future-returning test APIs\.
|
||||
The guarded "guardedHelper" function was called from .*dev/automated_tests/flutter_test/test_async_utils_guarded_test\.dart on line [0-9]+\.
|
||||
Then, the "expect" function was called from .*dev/automated_tests/flutter_test/test_async_utils_guarded_test\.dart on line [0-9]+\.
|
||||
The first function \(guardedHelper\) had not yet finished executing at the time that the second function \(expect\) was called\. Since both are guarded, and the second was not a nested call inside the first, the first must complete its execution before the second can be called\. Typically, this is achieved by putting an "await" statement in front of the call to the first\.
|
||||
If you are confident that all test APIs are being called using "await", and this expect\(\) call is not being called at the top level but is itself being called from some sort of callback registered before the guardedHelper method was called, then consider using expectSync\(\) instead\.
|
||||
|
||||
When the first function \(guardedHelper\) was called, this was the stack:
|
||||
<<skip until matching line>>
|
||||
\(elided .+\)
|
||||
|
||||
When the exception was thrown, this was the stack:
|
||||
<<skip until matching line>>
|
||||
\(elided .+\)
|
||||
|
||||
The test description was:
|
||||
TestAsyncUtils - custom guarded sections
|
||||
════════════════════════════════════════════════════════════════════════════════════════════════════
|
||||
.*(this line has more of the test framework's output)?
|
||||
Test failed\. See exception logs above\.
|
||||
The test description was: TestAsyncUtils - custom guarded sections
|
||||
*
|
||||
.*..:.. \+0 -1: Some tests failed\. *
|
@ -1,30 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
class TestTestBinding extends AutomatedTestWidgetsFlutterBinding {
|
||||
@override
|
||||
DebugPrintCallback get debugPrintOverride => testPrint;
|
||||
static void testPrint(String message, { int wrapWidth }) { print(message); }
|
||||
}
|
||||
|
||||
Future<void> guardedHelper(WidgetTester tester) {
|
||||
return TestAsyncUtils.guard(() async {
|
||||
await tester.pumpWidget(const Text('Hello', textDirection: TextDirection.ltr));
|
||||
});
|
||||
}
|
||||
|
||||
void main() {
|
||||
TestTestBinding();
|
||||
testWidgets('TestAsyncUtils - custom guarded sections', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(Container());
|
||||
expect(find.byElementType(Container), isNotNull);
|
||||
guardedHelper(tester);
|
||||
expect(find.byElementType(Container), isNull);
|
||||
// this should fail
|
||||
});
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
[^═]*(this line contains the test framework's output with the clock and so forth)?
|
||||
<<skip until matching line>>
|
||||
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
|
||||
The following assertion was thrown running a test:
|
||||
Guarded function conflict\. You must use "await" with all Future-returning test APIs\.
|
||||
The guarded method "pump" from class WidgetTester was called from .*dev/automated_tests/flutter_test/test_async_utils_unguarded_test.dart on line [0-9]+\.
|
||||
Then, it was called again from .*dev/automated_tests/flutter_test/test_async_utils_unguarded_test.dart on line [0-9]+\.
|
||||
The first method had not yet finished executing at the time that the second method was called\. Since both are guarded, and the second was not a nested call inside the first, the first must complete its execution before the second can be called\. Typically, this is achieved by putting an "await" statement in front of the call to the first\.
|
||||
|
||||
When the first method was called, this was the stack:
|
||||
<<skip until matching line>>
|
||||
(elided [0-9]+ frames from .+)
|
||||
|
||||
When the exception was thrown, this was the stack:
|
||||
<<skip until matching line>>
|
||||
(elided [0-9]+ frames from .+)
|
||||
|
||||
The test description was:
|
||||
TestAsyncUtils - handling unguarded async helper functions
|
||||
════════════════════════════════════════════════════════════════════════════════════════════════════
|
||||
.*..:.. \+0 -1: TestAsyncUtils - handling unguarded async helper functions *
|
||||
Test failed\. See exception logs above\.
|
||||
The test description was: TestAsyncUtils - handling unguarded async helper functions
|
||||
*
|
||||
.*..:.. \+0 -1: Some tests failed\. *
|
@ -1,25 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
class TestTestBinding extends AutomatedTestWidgetsFlutterBinding {
|
||||
@override
|
||||
DebugPrintCallback get debugPrintOverride => testPrint;
|
||||
static void testPrint(String message, { int wrapWidth }) { print(message); }
|
||||
}
|
||||
|
||||
Future<void> helperFunction(WidgetTester tester) async {
|
||||
await tester.pump();
|
||||
}
|
||||
|
||||
void main() {
|
||||
TestTestBinding();
|
||||
testWidgets('TestAsyncUtils - handling unguarded async helper functions', (WidgetTester tester) async {
|
||||
helperFunction(tester);
|
||||
helperFunction(tester);
|
||||
// this should fail
|
||||
});
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
<<skip until matching line>>
|
||||
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
|
||||
The following message was thrown:
|
||||
An animation is still running even after the widget tree was disposed.
|
||||
|
||||
There was one transient callback left. The stack trace for when it was registered is as follows:
|
||||
── callback 2 ──
|
||||
<<skip until matching line>>
|
||||
#[0-9]+ main.+ \(.+/dev/automated_tests/flutter_test/ticker_test\.dart:[0-9]+:[0-9]+\)
|
||||
<<skip until matching line>>
|
||||
════════════════════════════════════════════════════════════════════════════════════════════════════
|
||||
.*..:.. \+0 -1: Does flutter_test catch leaking tickers\? \[E\]
|
||||
Test failed\. See exception logs above\.
|
||||
The test description was: Does flutter_test catch leaking tickers\?
|
||||
*
|
||||
.*..:.. \+0 -1: Some tests failed\. *
|
@ -1,16 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Does flutter_test catch leaking tickers?', (WidgetTester tester) async {
|
||||
Ticker((Duration duration) { })..start();
|
||||
|
||||
final ByteData message = const StringCodec().encodeMessage('AppLifecycleState.paused');
|
||||
await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {});
|
||||
});
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
|
||||
|
||||
void main() {
|
||||
test('trivial', () { });
|
||||
}
|
@ -1 +0,0 @@
|
||||
[0-9]+:[0-9]+ [+]1: All tests passed!
|
@ -1,9 +0,0 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('A trivial widget test', (WidgetTester tester) async {});
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
name: flutter_automated_tests
|
||||
|
||||
environment:
|
||||
# The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
|
||||
sdk: ">=2.0.0-dev.68.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
test: 1.5.1
|
||||
|
||||
analyzer: 0.33.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
args: 1.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
async: 2.0.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
boolean_selector: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
charcode: 1.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
collection: 1.14.11 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
convert: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
crypto: 2.0.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
csslib: 0.14.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
front_end: 0.1.6+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
glob: 1.1.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
html: 0.13.3+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http: 0.12.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http_multi_server: 2.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http_parser: 3.1.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
io: 0.3.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
js: 0.6.1+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
json_rpc_2: 2.0.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
kernel: 0.3.6+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
logging: 0.11.3+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
matcher: 0.12.3+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.1.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
mime: 0.9.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
multi_server_socket: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
node_preamble: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
package_config: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
package_resolver: 1.0.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
path: 1.6.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
plugin: 0.2.0+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
pool: 1.3.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
pub_semver: 1.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
quiver: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf: 0.7.3+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf_packages_handler: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf_web_socket: 0.2.2+4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
source_map_stack_trace: 1.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
source_maps: 0.10.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
source_span: 1.4.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
stack_trace: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
stream_channel: 1.6.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
string_scanner: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
term_glyph: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_api: 0.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.1.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
utf: 0.9.0+5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.0.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service_client: 0.2.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 0.9.7+10 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 1.0.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
yaml: 2.1.15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: 4a91
|
@ -1,2 +0,0 @@
|
||||
This directory is used by //flutter/dev/bots/test.dart to verify that
|
||||
`flutter test` actually correctly fails when a test fails.
|
@ -1,23 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:io' as system;
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
// this is a test to make sure our tests consider engine crashes to be failures
|
||||
// see //flutter/dev/bots/test.dart
|
||||
|
||||
void main() {
|
||||
test('test smoke test -- this test should fail', () async {
|
||||
if (system.Process.killPid(system.pid, system.ProcessSignal.sigsegv)) {
|
||||
print('system.Process.killPid returned before the process ended!');
|
||||
print('Sleeping for a few seconds just in case signal delivery is delayed or our signal handler is being slow...');
|
||||
system.sleep(const Duration(seconds: 10)); // don't sleep too much, we must not time out
|
||||
} else {
|
||||
print('system.Process.killPid reports that the SIGSEGV signal was not delivered!');
|
||||
}
|
||||
print('crash1_test.dart will now probably not crash, which will ruin the test.');
|
||||
});
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:io' as system;
|
||||
|
||||
// this is a test to make sure our tests consider engine crashes to be failures
|
||||
// see //flutter/dev/bots/test.dart
|
||||
|
||||
void main() {
|
||||
system.Process.killPid(system.pid, system.ProcessSignal.sigsegv);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('tests must restore the value of reportTestException', (WidgetTester tester) async {
|
||||
// This test is expected to fail.
|
||||
reportTestException = (FlutterErrorDetails details, String testDescription) {};
|
||||
});
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
// this is a test to make sure our tests actually catch failures
|
||||
// see //flutter/dev/bots/test.dart
|
||||
|
||||
void main() {
|
||||
test('test smoke test -- this test SHOULD FAIL', () async {
|
||||
expect(false, isTrue);
|
||||
});
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// this is a test to make sure our tests consider syntax errors to be failures
|
||||
// see //flutter/dev/bots/test.dart
|
||||
|
||||
void main() {
|
||||
fail(); // inspired by https://github.com/flutter/flutter/issues/2698
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
// this is a test to make sure our tests actually catch failures
|
||||
// see //flutter/dev/bots/test.dart
|
||||
|
||||
void main() {
|
||||
test('test smoke test -- this test should pass', () async {
|
||||
expect(true, isTrue);
|
||||
});
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// this is a test to make sure our tests consider syntax errors to be failures
|
||||
// see //flutter/dev/bots/test.dart
|
||||
|
||||
The challenge: demand satisfaction
|
||||
If they apologize, no need for further action.
|
@ -1,13 +0,0 @@
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('flutter_test timeout logic - addTime - negative', (WidgetTester tester) async {
|
||||
await tester.runAsync(() async {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 3500));
|
||||
}, additionalTime: const Duration(milliseconds: 200));
|
||||
});
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('flutter_test timeout logic - addTime - positive', (WidgetTester tester) async {
|
||||
await tester.runAsync(() async {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 2500)); // must be longer than default timeout.
|
||||
}, additionalTime: const Duration(milliseconds: 2000)); // default timeout is 2s, so this makes it 4s.
|
||||
});
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
# complex_layout
|
||||
|
||||
## Scrolling benchmark
|
||||
|
||||
To run the scrolling benchmark on a device:
|
||||
|
||||
```
|
||||
flutter drive --profile test_driver/scroll_perf.dart
|
||||
```
|
||||
|
||||
Results should be in the file `build/complex_layout_scroll_perf.timeline_summary.json`.
|
||||
|
||||
More detailed logs should be in `build/complex_layout_scroll_perf.timeline.json`.
|
||||
|
||||
|
||||
## Startup benchmark
|
||||
|
||||
To measure startup time on a device:
|
||||
|
||||
```
|
||||
flutter run --profile --trace-startup
|
||||
```
|
||||
|
||||
Results should be in the logs.
|
||||
|
||||
Additional results should be in the file `build/start_up_info.json`.
|
@ -1,57 +0,0 @@
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withInputStream { stream ->
|
||||
localProperties.load(stream)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 27
|
||||
|
||||
lintOptions {
|
||||
disable 'InvalidPackage'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 27
|
||||
versionCode 1
|
||||
versionName "0.0.1"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
|
||||
aaptOptions {
|
||||
// TODO(goderbauer): remove when https://github.com/flutter/flutter/issues/8986 is resolved.
|
||||
if(System.getenv("FLUTTER_CI_WIN")) {
|
||||
println "AAPT cruncher disabled when running on CI, see https://github.com/flutter/flutter/issues/8986"
|
||||
cruncherEnabled false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.yourcompany.complexLayout">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application android:name="io.flutter.app.FlutterApplication" android:label="complex_layout" android:icon="@mipmap/ic_launcher">
|
||||
<activity android:name="io.flutter.app.FlutterActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@android:style/Theme.Black.NoTitleBar"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
Before Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 721 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.4 KiB |
@ -1,29 +0,0 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
@ -1 +0,0 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
@ -1,6 +0,0 @@
|
||||
#Fri Jun 23 08:50:38 CEST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
|
@ -1 +0,0 @@
|
||||
include ':app'
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>8.0</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1 +0,0 @@
|
||||
#include "Generated.xcconfig"
|
@ -1,445 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
|
||||
746232531E83B71900CC1A5E /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 746232521E83B71900CC1A5E /* App.framework */; };
|
||||
746232541E83B71900CC1A5E /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 746232521E83B71900CC1A5E /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
746232561E83B9DF00CC1A5E /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 746232551E83B9DF00CC1A5E /* AppFrameworkInfo.plist */; };
|
||||
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
|
||||
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
9740EEB41CF90195004384FC /* Flutter.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Flutter.xcconfig */; };
|
||||
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
746232541E83B71900CC1A5E /* App.framework in Embed Frameworks */,
|
||||
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
|
||||
746232521E83B71900CC1A5E /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
|
||||
746232551E83B9DF00CC1A5E /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Flutter.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Flutter.xcconfig; path = Flutter/Flutter.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
746232531E83B71900CC1A5E /* App.framework in Frameworks */,
|
||||
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
746232551E83B9DF00CC1A5E /* AppFrameworkInfo.plist */,
|
||||
746232521E83B71900CC1A5E /* App.framework */,
|
||||
2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
|
||||
9740EEBA1CF902C7004384FC /* Flutter.framework */,
|
||||
9740EEB21CF90195004384FC /* Flutter.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
97C146F11CF9000F007C117D /* Supporting Files */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F11CF9000F007C117D /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146F21CF9000F007C117D /* main.m */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
9740EEB61CF901F6004384FC /* ShellScript */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0730;
|
||||
ORGANIZATIONNAME = "The Chromium Authors";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
746232561E83B9DF00CC1A5E /* AppFrameworkInfo.plist in Resources */,
|
||||
9740EEB41CF90195004384FC /* Flutter.xcconfig in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
9740EEB61CF901F6004384FC /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh $FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C146F31CF9000F007C117D /* main.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C146FB1CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
24D15A8E21828735001BB33E /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
24D15A8F21828735001BB33E /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
97C147061CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147071CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147031CF9000F007C117D /* Debug */,
|
||||
97C147041CF9000F007C117D /* Release */,
|
||||
24D15A8E21828735001BB33E /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147061CF9000F007C117D /* Debug */,
|
||||
97C147071CF9000F007C117D /* Release */,
|
||||
24D15A8F21828735001BB33E /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,110 +0,0 @@
|
||||
{
|
||||
"images":[
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"29x29",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-29x29@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"29x29",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-29x29@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"29x29",
|
||||
"scale":"3x",
|
||||
"filename":"Icon-App-29x29@3x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"40x40",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-40x40@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"40x40",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-40x40@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"40x40",
|
||||
"scale":"3x",
|
||||
"filename":"Icon-App-40x40@3x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"60x60",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-60x60@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"60x60",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-60x60@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"60x60",
|
||||
"scale":"3x",
|
||||
"filename":"Icon-App-60x60@3x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"29x29",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-29x29@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"29x29",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-29x29@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"40x40",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-40x40@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"40x40",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-40x40@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"76x76",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-76x76@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"76x76",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-76x76@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"76x76",
|
||||
"scale":"3x",
|
||||
"filename":"Icon-App-76x76@3x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"83.5x83.5",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-83.5x83.5@2x.png"
|
||||
}
|
||||
],
|
||||
"info":{
|
||||
"version":1,
|
||||
"author":"makeappicon"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 3.5 KiB |
@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.complexLayout</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>complex_layout</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,13 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Flutter/Flutter.h>
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil,
|
||||
NSStringFromClass([FlutterAppDelegate class]));
|
||||
}
|
||||
}
|
@ -1,677 +0,0 @@
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart' show timeDilation;
|
||||
|
||||
void main() {
|
||||
runApp(
|
||||
ComplexLayoutApp()
|
||||
);
|
||||
}
|
||||
|
||||
enum ScrollMode { complex, tile }
|
||||
|
||||
class ComplexLayoutApp extends StatefulWidget {
|
||||
@override
|
||||
ComplexLayoutAppState createState() => ComplexLayoutAppState();
|
||||
|
||||
static ComplexLayoutAppState of(BuildContext context) => context.ancestorStateOfType(const TypeMatcher<ComplexLayoutAppState>());
|
||||
}
|
||||
|
||||
class ComplexLayoutAppState extends State<ComplexLayoutApp> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: lightTheme ? ThemeData.light() : ThemeData.dark(),
|
||||
title: 'Advanced Layout',
|
||||
home: scrollMode == ScrollMode.complex ? const ComplexLayout() : const TileScrollLayout());
|
||||
}
|
||||
|
||||
bool _lightTheme = true;
|
||||
bool get lightTheme => _lightTheme;
|
||||
set lightTheme(bool value) {
|
||||
setState(() {
|
||||
_lightTheme = value;
|
||||
});
|
||||
}
|
||||
|
||||
ScrollMode _scrollMode = ScrollMode.complex;
|
||||
ScrollMode get scrollMode => _scrollMode;
|
||||
set scrollMode(ScrollMode mode) {
|
||||
setState(() {
|
||||
_scrollMode = mode;
|
||||
});
|
||||
}
|
||||
|
||||
void toggleAnimationSpeed() {
|
||||
setState(() {
|
||||
timeDilation = (timeDilation != 1.0) ? 1.0 : 5.0;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class TileScrollLayout extends StatelessWidget {
|
||||
const TileScrollLayout({ Key key }) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('Tile Scrolling Layout')),
|
||||
body: ListView.builder(
|
||||
key: const Key('tiles-scroll'),
|
||||
itemCount: 200,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(5.0),
|
||||
child: Material(
|
||||
elevation: (index % 5 + 1).toDouble(),
|
||||
color: Colors.white,
|
||||
child: IconBar(),
|
||||
),
|
||||
);
|
||||
}
|
||||
),
|
||||
drawer: const GalleryDrawer(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ComplexLayout extends StatefulWidget {
|
||||
const ComplexLayout({ Key key }) : super(key: key);
|
||||
|
||||
@override
|
||||
ComplexLayoutState createState() => ComplexLayoutState();
|
||||
|
||||
static ComplexLayoutState of(BuildContext context) => context.ancestorStateOfType(const TypeMatcher<ComplexLayoutState>());
|
||||
}
|
||||
|
||||
class ComplexLayoutState extends State<ComplexLayout> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Advanced Layout'),
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: const Icon(Icons.create),
|
||||
tooltip: 'Search',
|
||||
onPressed: () {
|
||||
print('Pressed search');
|
||||
},
|
||||
),
|
||||
TopBarMenu()
|
||||
]
|
||||
),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
key: const Key('complex-scroll'), // this key is used by the driver test
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
if (index % 2 == 0)
|
||||
return FancyImageItem(index, key: PageStorageKey<int>(index));
|
||||
else
|
||||
return FancyGalleryItem(index, key: PageStorageKey<int>(index));
|
||||
},
|
||||
)
|
||||
),
|
||||
BottomBar(),
|
||||
],
|
||||
),
|
||||
drawer: const GalleryDrawer(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class TopBarMenu extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PopupMenuButton<String>(
|
||||
onSelected: (String value) { print('Selected: $value'); },
|
||||
itemBuilder: (BuildContext context) => <PopupMenuItem<String>>[
|
||||
const PopupMenuItem<String>(
|
||||
value: 'Friends',
|
||||
child: MenuItemWithIcon(Icons.people, 'Friends', '5 new')
|
||||
),
|
||||
const PopupMenuItem<String>(
|
||||
value: 'Events',
|
||||
child: MenuItemWithIcon(Icons.event, 'Events', '12 upcoming')
|
||||
),
|
||||
const PopupMenuItem<String>(
|
||||
value: 'Events',
|
||||
child: MenuItemWithIcon(Icons.group, 'Groups', '14')
|
||||
),
|
||||
const PopupMenuItem<String>(
|
||||
value: 'Events',
|
||||
child: MenuItemWithIcon(Icons.image, 'Pictures', '12')
|
||||
),
|
||||
const PopupMenuItem<String>(
|
||||
value: 'Events',
|
||||
child: MenuItemWithIcon(Icons.near_me, 'Nearby', '33')
|
||||
),
|
||||
const PopupMenuItem<String>(
|
||||
value: 'Friends',
|
||||
child: MenuItemWithIcon(Icons.people, 'Friends', '5')
|
||||
),
|
||||
const PopupMenuItem<String>(
|
||||
value: 'Events',
|
||||
child: MenuItemWithIcon(Icons.event, 'Events', '12')
|
||||
),
|
||||
const PopupMenuItem<String>(
|
||||
value: 'Events',
|
||||
child: MenuItemWithIcon(Icons.group, 'Groups', '14')
|
||||
),
|
||||
const PopupMenuItem<String>(
|
||||
value: 'Events',
|
||||
child: MenuItemWithIcon(Icons.image, 'Pictures', '12')
|
||||
),
|
||||
const PopupMenuItem<String>(
|
||||
value: 'Events',
|
||||
child: MenuItemWithIcon(Icons.near_me, 'Nearby', '33')
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MenuItemWithIcon extends StatelessWidget {
|
||||
const MenuItemWithIcon(this.icon, this.title, this.subtitle);
|
||||
|
||||
final IconData icon;
|
||||
final String title;
|
||||
final String subtitle;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: <Widget>[
|
||||
Icon(icon),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
||||
child: Text(title)
|
||||
),
|
||||
Text(subtitle, style: Theme.of(context).textTheme.caption)
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class FancyImageItem extends StatelessWidget {
|
||||
const FancyImageItem(this.index, {Key key}) : super(key: key);
|
||||
|
||||
final int index;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListBody(
|
||||
children: <Widget>[
|
||||
UserHeader('Ali Connors $index'),
|
||||
ItemDescription(),
|
||||
ItemImageBox(),
|
||||
InfoBar(),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8.0),
|
||||
child: Divider()
|
||||
),
|
||||
IconBar(),
|
||||
FatDivider()
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class FancyGalleryItem extends StatelessWidget {
|
||||
const FancyGalleryItem(this.index, {Key key}) : super(key: key);
|
||||
|
||||
final int index;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListBody(
|
||||
children: <Widget>[
|
||||
const UserHeader('Ali Connors'),
|
||||
ItemGalleryBox(index),
|
||||
InfoBar(),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8.0),
|
||||
child: Divider()
|
||||
),
|
||||
IconBar(),
|
||||
FatDivider()
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class InfoBar extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
const MiniIconWithText(Icons.thumb_up, '42'),
|
||||
Text('3 Comments', style: Theme.of(context).textTheme.caption)
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class IconBar extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: const <Widget>[
|
||||
IconWithText(Icons.thumb_up, 'Like'),
|
||||
IconWithText(Icons.comment, 'Comment'),
|
||||
IconWithText(Icons.share, 'Share'),
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class IconWithText extends StatelessWidget {
|
||||
const IconWithText(this.icon, this.title);
|
||||
|
||||
final IconData icon;
|
||||
final String title;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(icon),
|
||||
onPressed: () { print('Pressed $title button'); }
|
||||
),
|
||||
Text(title)
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MiniIconWithText extends StatelessWidget {
|
||||
const MiniIconWithText(this.icon, this.title);
|
||||
|
||||
final IconData icon;
|
||||
final String title;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Container(
|
||||
width: 16.0,
|
||||
height: 16.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).primaryColor,
|
||||
shape: BoxShape.circle
|
||||
),
|
||||
child: Icon(icon, color: Colors.white, size: 12.0)
|
||||
)
|
||||
),
|
||||
Text(title, style: Theme.of(context).textTheme.caption)
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class FatDivider extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 8.0,
|
||||
color: Theme.of(context).dividerColor,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class UserHeader extends StatelessWidget {
|
||||
const UserHeader(this.userName);
|
||||
|
||||
final String userName;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(right: 8.0),
|
||||
child: Image(
|
||||
image: AssetImage('packages/flutter_gallery_assets/people/square/ali.png'),
|
||||
width: 32.0,
|
||||
height: 32.0
|
||||
)
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>[
|
||||
RichText(text: TextSpan(
|
||||
style: Theme.of(context).textTheme.body1,
|
||||
children: <TextSpan>[
|
||||
TextSpan(text: userName, style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
const TextSpan(text: ' shared a new '),
|
||||
const TextSpan(text: 'photo', style: TextStyle(fontWeight: FontWeight.bold))
|
||||
]
|
||||
)),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Text('Yesterday at 11:55 • ', style: Theme.of(context).textTheme.caption),
|
||||
Icon(Icons.people, size: 16.0, color: Theme.of(context).textTheme.caption.color)
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
),
|
||||
TopBarMenu()
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ItemDescription extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Text('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ItemImageBox extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Card(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>[
|
||||
Stack(
|
||||
children: <Widget>[
|
||||
const SizedBox(
|
||||
height: 230.0,
|
||||
child: Image(
|
||||
image: AssetImage('packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png')
|
||||
)
|
||||
),
|
||||
Theme(
|
||||
data: ThemeData.dark(),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
IconButton(
|
||||
icon: const Icon(Icons.edit),
|
||||
onPressed: () { print('Pressed edit button'); }
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.zoom_in),
|
||||
onPressed: () { print('Pressed zoom button'); }
|
||||
),
|
||||
]
|
||||
)
|
||||
),
|
||||
Positioned(
|
||||
bottom: 4.0,
|
||||
left: 4.0,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black54,
|
||||
borderRadius: BorderRadius.circular(2.0)
|
||||
),
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: const RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(color: Colors.white),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: 'Photo by '
|
||||
),
|
||||
TextSpan(
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
text: 'Chris Godley'
|
||||
)
|
||||
]
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
,
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>[
|
||||
Text('Artisans of Southern India', style: Theme.of(context).textTheme.body2),
|
||||
Text('Silk Spinners', style: Theme.of(context).textTheme.body1),
|
||||
Text('Sivaganga, Tamil Nadu', style: Theme.of(context).textTheme.caption)
|
||||
]
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ItemGalleryBox extends StatelessWidget {
|
||||
const ItemGalleryBox(this.index);
|
||||
|
||||
final int index;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final List<String> tabNames = <String>[
|
||||
'A', 'B', 'C', 'D'
|
||||
];
|
||||
|
||||
return SizedBox(
|
||||
height: 200.0,
|
||||
child: DefaultTabController(
|
||||
length: tabNames.length,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
children: tabNames.map<Widget>((String tabName) {
|
||||
return Container(
|
||||
key: PageStorageKey<String>(tabName),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Card(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Container(
|
||||
color: Theme.of(context).primaryColor,
|
||||
child: Center(
|
||||
child: Text(tabName, style: Theme.of(context).textTheme.headline.copyWith(color: Colors.white)),
|
||||
)
|
||||
)
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
IconButton(
|
||||
icon: const Icon(Icons.share),
|
||||
onPressed: () { print('Pressed share'); },
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.event),
|
||||
onPressed: () { print('Pressed event'); },
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Text('This is item $tabName'),
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}).toList()
|
||||
)
|
||||
),
|
||||
Container(
|
||||
child: const TabPageSelector()
|
||||
)
|
||||
]
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class BottomBar extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 1.0
|
||||
)
|
||||
)
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: const <Widget>[
|
||||
BottomBarButton(Icons.new_releases, 'News'),
|
||||
BottomBarButton(Icons.people, 'Requests'),
|
||||
BottomBarButton(Icons.chat, 'Messenger'),
|
||||
BottomBarButton(Icons.bookmark, 'Bookmark'),
|
||||
BottomBarButton(Icons.alarm, 'Alarm'),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class BottomBarButton extends StatelessWidget {
|
||||
const BottomBarButton(this.icon, this.title);
|
||||
|
||||
final IconData icon;
|
||||
final String title;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(icon),
|
||||
onPressed: () { print('Pressed: $title'); }
|
||||
),
|
||||
Text(title, style: Theme.of(context).textTheme.caption)
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class GalleryDrawer extends StatelessWidget {
|
||||
const GalleryDrawer({ Key key }) : super(key: key);
|
||||
|
||||
void _changeTheme(BuildContext context, bool value) {
|
||||
ComplexLayoutApp.of(context).lightTheme = value;
|
||||
}
|
||||
|
||||
void _changeScrollMode(BuildContext context, ScrollMode mode) {
|
||||
ComplexLayoutApp.of(context).scrollMode = mode;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ScrollMode currentMode = ComplexLayoutApp.of(context).scrollMode;
|
||||
return Drawer(
|
||||
// Note: for real apps, see the Gallery material Drawer demo. More
|
||||
// typically, a drawer would have a fixed header with a scrolling body
|
||||
// below it.
|
||||
child: ListView(
|
||||
key: const PageStorageKey<String>('gallery-drawer'),
|
||||
padding: EdgeInsets.zero,
|
||||
children: <Widget>[
|
||||
FancyDrawerHeader(),
|
||||
ListTile(
|
||||
key: const Key('scroll-switcher'),
|
||||
onTap: () { _changeScrollMode(context, currentMode == ScrollMode.complex ? ScrollMode.tile : ScrollMode.complex); },
|
||||
trailing: Text(currentMode == ScrollMode.complex ? 'Tile' : 'Complex')
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.brightness_5),
|
||||
title: const Text('Light'),
|
||||
onTap: () { _changeTheme(context, true); },
|
||||
selected: ComplexLayoutApp.of(context).lightTheme,
|
||||
trailing: Radio<bool>(
|
||||
value: true,
|
||||
groupValue: ComplexLayoutApp.of(context).lightTheme,
|
||||
onChanged: (bool value) { _changeTheme(context, value); }
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.brightness_7),
|
||||
title: const Text('Dark'),
|
||||
onTap: () { _changeTheme(context, false); },
|
||||
selected: !ComplexLayoutApp.of(context).lightTheme,
|
||||
trailing: Radio<bool>(
|
||||
value: false,
|
||||
groupValue: ComplexLayoutApp.of(context).lightTheme,
|
||||
onChanged: (bool value) { _changeTheme(context, value); },
|
||||
),
|
||||
),
|
||||
const Divider(),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.hourglass_empty),
|
||||
title: const Text('Animate Slowly'),
|
||||
selected: timeDilation != 1.0,
|
||||
onTap: () { ComplexLayoutApp.of(context).toggleAnimationSpeed(); },
|
||||
trailing: Checkbox(
|
||||
value: timeDilation != 1.0,
|
||||
onChanged: (bool value) { ComplexLayoutApp.of(context).toggleAnimationSpeed(); }
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class FancyDrawerHeader extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.purple,
|
||||
height: 200.0,
|
||||
child: const SafeArea(
|
||||
bottom: false,
|
||||
child: Placeholder(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -1,87 +0,0 @@
|
||||
name: complex_layout
|
||||
description: A benchmark of a relatively complex layout.
|
||||
|
||||
environment:
|
||||
# The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
|
||||
sdk: ">=2.0.0-dev.68.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_driver:
|
||||
sdk: flutter
|
||||
|
||||
# To change the version of the gallery assets, edit
|
||||
# //packages/flutter_tools/lib/src/commands/update_packages.dart
|
||||
# and run
|
||||
# flutter update-packages --force-upgrade
|
||||
flutter_gallery_assets: 0.1.6
|
||||
|
||||
async: 2.0.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
charcode: 1.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
collection: 1.14.11 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
convert: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
crypto: 2.0.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
file: 5.0.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
intl: 0.15.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
json_rpc_2: 2.0.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.1.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
path: 1.6.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
pub_semver: 1.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
source_span: 1.4.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
stack_trace: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
stream_channel: 1.6.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.1.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.0.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service_client: 0.2.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 1.0.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
test: 1.5.1
|
||||
|
||||
analyzer: 0.33.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
args: 1.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
boolean_selector: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
csslib: 0.14.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
front_end: 0.1.6+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
glob: 1.1.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
html: 0.13.3+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http: 0.12.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http_multi_server: 2.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http_parser: 3.1.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
io: 0.3.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
js: 0.6.1+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
kernel: 0.3.6+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
logging: 0.11.3+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
matcher: 0.12.3+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
mime: 0.9.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
multi_server_socket: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
node_preamble: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
package_config: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
package_resolver: 1.0.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
plugin: 0.2.0+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
pool: 1.3.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
quiver: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf: 0.7.3+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf_packages_handler: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf_web_socket: 0.2.2+4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
source_map_stack_trace: 1.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
source_maps: 0.10.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
string_scanner: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
term_glyph: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_api: 0.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
utf: 0.9.0+5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 0.9.7+10 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
yaml: 2.1.15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
assets:
|
||||
- packages/flutter_gallery_assets/people/square/ali.png
|
||||
- packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
|
||||
|
||||
# PUBSPEC CHECKSUM: 5461
|
@ -1,11 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_driver/driver_extension.dart';
|
||||
import 'package:complex_layout/main.dart' as app;
|
||||
|
||||
void main() {
|
||||
enableFlutterDriverExtension();
|
||||
app.main();
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_driver/flutter_driver.dart';
|
||||
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
|
||||
|
||||
void main() {
|
||||
group('scrolling performance test', () {
|
||||
FlutterDriver driver;
|
||||
|
||||
setUpAll(() async {
|
||||
driver = await FlutterDriver.connect();
|
||||
});
|
||||
|
||||
tearDownAll(() async {
|
||||
if (driver != null)
|
||||
driver.close();
|
||||
});
|
||||
|
||||
Future<void> testScrollPerf(String listKey, String summaryName) async {
|
||||
// The slight initial delay avoids starting the timing during a
|
||||
// period of increased load on the device. Without this delay, the
|
||||
// benchmark has greater noise.
|
||||
// See: https://github.com/flutter/flutter/issues/19434
|
||||
await Future<void>.delayed(const Duration(milliseconds: 250));
|
||||
|
||||
await driver.forceGC();
|
||||
|
||||
final Timeline timeline = await driver.traceAction(() async {
|
||||
// Find the scrollable stock list
|
||||
final SerializableFinder list = find.byValueKey(listKey);
|
||||
expect(list, isNotNull);
|
||||
|
||||
// Scroll down
|
||||
for (int i = 0; i < 5; i += 1) {
|
||||
await driver.scroll(list, 0.0, -300.0, const Duration(milliseconds: 300));
|
||||
await Future<void>.delayed(const Duration(milliseconds: 500));
|
||||
}
|
||||
|
||||
// Scroll up
|
||||
for (int i = 0; i < 5; i += 1) {
|
||||
await driver.scroll(list, 0.0, 300.0, const Duration(milliseconds: 300));
|
||||
await Future<void>.delayed(const Duration(milliseconds: 500));
|
||||
}
|
||||
});
|
||||
|
||||
final TimelineSummary summary = TimelineSummary.summarize(timeline);
|
||||
summary.writeSummaryToFile(summaryName, pretty: true);
|
||||
summary.writeTimelineToFile(summaryName, pretty: true);
|
||||
}
|
||||
|
||||
test('complex_layout_scroll_perf', () async {
|
||||
await testScrollPerf('complex-scroll', 'complex_layout_scroll_perf');
|
||||
});
|
||||
|
||||
test('tiles_scroll_perf', () async {
|
||||
await driver.tap(find.byTooltip('Open navigation menu'));
|
||||
await driver.tap(find.byValueKey('scroll-switcher'));
|
||||
await testScrollPerf('tiles-scroll', 'tiles_scroll_perf');
|
||||
});
|
||||
});
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_driver/driver_extension.dart';
|
||||
import 'package:complex_layout/main.dart' as app;
|
||||
|
||||
void main() {
|
||||
enableFlutterDriverExtension();
|
||||
app.main();
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter_driver/flutter_driver.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
|
||||
|
||||
void main() {
|
||||
group('semantics performance test', () {
|
||||
FlutterDriver driver;
|
||||
|
||||
setUpAll(() async {
|
||||
driver = await FlutterDriver.connect(printCommunication: true);
|
||||
});
|
||||
|
||||
tearDownAll(() async {
|
||||
if (driver != null)
|
||||
driver.close();
|
||||
});
|
||||
|
||||
test('inital tree creation', () async {
|
||||
// Let app become fully idle.
|
||||
await Future<void>.delayed(const Duration(seconds: 2));
|
||||
|
||||
await driver.forceGC();
|
||||
|
||||
final Timeline timeline = await driver.traceAction(() async {
|
||||
expect(await driver.setSemantics(true), isTrue);
|
||||
});
|
||||
|
||||
final Iterable<TimelineEvent> semanticsEvents = timeline.events.where((TimelineEvent event) => event.name == 'Semantics');
|
||||
if (semanticsEvents.length != 1)
|
||||
fail('Expected exactly one semantics event, got ${semanticsEvents.length}');
|
||||
final Duration semanticsTreeCreation = semanticsEvents.first.duration;
|
||||
|
||||
final String jsonEncoded = json.encode(<String, dynamic>{'initialSemanticsTreeCreation': semanticsTreeCreation.inMilliseconds});
|
||||
File(p.join(testOutputsDirectory, 'complex_layout_semantics_perf.json')).writeAsStringSync(jsonEncoded);
|
||||
});
|
||||
});
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:complex_layout/main.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
/// The speed, in pixels per second, that the drag gestures should end with.
|
||||
const double speed = 1500.0;
|
||||
|
||||
/// The number of down drags and the number of up drags. The total number of
|
||||
/// gestures is twice this number.
|
||||
const int maxIterations = 4;
|
||||
|
||||
/// The time that is allowed between gestures for the fling effect to settle.
|
||||
const Duration pauses = Duration(milliseconds: 500);
|
||||
|
||||
Future<void> main() async {
|
||||
final Completer<void> ready = Completer<void>();
|
||||
runApp(GestureDetector(
|
||||
onTap: () {
|
||||
debugPrint('Received tap.');
|
||||
ready.complete();
|
||||
},
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: IgnorePointer(
|
||||
ignoring: true,
|
||||
child: ComplexLayoutApp(),
|
||||
),
|
||||
));
|
||||
await SchedulerBinding.instance.endOfFrame;
|
||||
|
||||
/// Wait 50ms to allow the GPU thread to actually put up the frame. (The
|
||||
/// endOfFrame future ends when we send the data to the engine, before the GPU
|
||||
/// thread has had a chance to rasterize, etc.)
|
||||
await Future<void>.delayed(const Duration(milliseconds: 50));
|
||||
debugPrint('==== MEMORY BENCHMARK ==== READY ====');
|
||||
|
||||
await ready.future; // waits for tap sent by devicelab task
|
||||
debugPrint('Continuing...');
|
||||
|
||||
// remove onTap handler, enable pointer events for app
|
||||
runApp(GestureDetector(
|
||||
child: IgnorePointer(
|
||||
ignoring: false,
|
||||
child: ComplexLayoutApp(),
|
||||
),
|
||||
));
|
||||
await SchedulerBinding.instance.endOfFrame;
|
||||
|
||||
final WidgetController controller = LiveWidgetController(WidgetsBinding.instance);
|
||||
|
||||
// Scroll down
|
||||
for (int iteration = 0; iteration < maxIterations; iteration += 1) {
|
||||
debugPrint('Scroll down... $iteration/$maxIterations');
|
||||
await controller.fling(find.byType(ListView), const Offset(0.0, -700.0), speed);
|
||||
await Future<void>.delayed(pauses);
|
||||
}
|
||||
|
||||
// Scroll up
|
||||
for (int iteration = 0; iteration < maxIterations; iteration += 1) {
|
||||
debugPrint('Scroll up... $iteration/$maxIterations');
|
||||
await controller.fling(find.byType(ListView), const Offset(0.0, 300.0), speed);
|
||||
await Future<void>.delayed(pauses);
|
||||
}
|
||||
|
||||
debugPrint('==== MEMORY BENCHMARK ==== DONE ====');
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
# microbenchmarks
|
||||
|
||||
To run these benchmarks on a device, first run `flutter logs' in one
|
||||
window to see the device logs, then, in a different window, run any of
|
||||
these:
|
||||
|
||||
```
|
||||
flutter run --release lib/gestures/velocity_tracker_data.dart
|
||||
flutter run --release lib/stocks/animation_bench.dart
|
||||
flutter run --release lib/stocks/build_bench.dart
|
||||
flutter run --release lib/stocks/layout_bench.dart
|
||||
```
|
||||
|
||||
The results should be in the device logs.
|
@ -1,49 +0,0 @@
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withInputStream { stream ->
|
||||
localProperties.load(stream)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 27
|
||||
|
||||
lintOptions {
|
||||
disable 'InvalidPackage'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 27
|
||||
versionCode 1
|
||||
versionName "0.0.1"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.yourcompany.microbenchmarks">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application android:name="io.flutter.app.FlutterApplication" android:label="microbenchmarks" android:icon="@mipmap/ic_launcher">
|
||||
<activity android:name="io.flutter.app.FlutterActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@android:style/Theme.Black.NoTitleBar"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
Before Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 442 B |