The most recent Flutter IntelliJ plugin replaces FLUTTER_MODULE with
WEB_MODULE and eliminates the exclusion of packages/ directories.
Use of the packages/ directory was turned off by default months ago, and
is replaced by the .packages file.
* fix examples/layers/widgets/gestures.dart
* use a list of colors to avoid error prone in elseif
* address review comments
* add tests
* keep index to lower complexity
* address review comments
* add Android instrumentation test
* add devicelab test
* add to manifest.yaml
* rename _smoke_test.dart to _smoketest.dart to prevent flutter test from picking it up
* volatile fields; style fixes
* use ConditionVariable; fix sh script
The main purpose of this PR is to make it so that when you set the
initial route and it's a hierarchical route (e.g. `/a/b/c`), it
implies multiple pushes, one for each step of the route (so in that
case, `/`, `/a`, `/a/b`, and `/a/b/c`, in that order). If any of those
routes don't exist, it falls back to '/'.
As part of doing that, I:
* Changed the default for MaterialApp.initialRoute to honor the
actual initial route.
* Added a MaterialApp.onUnknownRoute for handling bad routes.
* Added a feature to flutter_driver that allows the host test script
and the device test app to communicate.
* Added a test to make sure `flutter drive --route` works.
(Hopefully that will also prove `flutter run --route` works, though
this isn't testing the `flutter` tool's side of that. My main
concern is over whether the engine side works.)
* Fixed `flutter drive` to output the right target file name.
* Changed how the stocks app represents its data, so that we can
show a page for a stock before we know if it exists.
* Made it possible to show a stock page that doesn't exist. It shows
a progress indicator if we're loading the data, or else shows a
message saying it doesn't exist.
* Changed the pathing structure of routes in stocks to work more
sanely.
* Made search in the stocks app actually work (before it only worked
if we happened to accidentally trigger a rebuild). Added a test.
* Replaced some custom code in the stocks app with a BackButton.
* Added a "color" feature to BackButton to support the stocks use case.
* Spaced out the ErrorWidget text a bit more.
* Added `RouteSettings.copyWith`, which I ended up not using.
* Improved the error messages around routing.
While I was in some files I made a few formatting fixes, fixed some
code health issues, and also removed `flaky: true` from some devicelab
tests that have been stable for a while. Also added some documentation
here and there.
Also, clean up the menus code a bit.
Also, make it easier to write a PopupMenuEntry that has itself many
items (for example, the way Chrome's menu has icons in a row).
Minor fixes throughout, e.g. removing trailing commas from the end of sample code expressions, changing headings to "sample code" more consistently, removing stale todos, fix typos in a private method name, minor grammar fixes, added some clarifications to CircularProgressIndicator, LinearProgressIndicator, CrossAxisAlignment, added some cross-references to various members, made it slightly clearer that layout algorithms are implementation details.
Clarified "elevation" throughout.
Added docs to InkResponse and InkWell.
Added sample code for: SliverAppBar, Card, ListTile, EdgeInsets, Row, Column, CustomScrollView, ListView, SliverFixedExtentList, and SliverGrid.
Fixes#10317.
Fixes#10316.
Fixes#10267. (sort of, see comment therein)
Fixes#9331. (sort of, see comment therein)
Fixes#9407. (sort of, see comment therein)
* Revert "Update reference to url_launcher plugin in Gallery pubspec (#9879)"
This reverts commit 96a04dea0d.
* Revert "Revert "Revert plugin use in gallery (#9838)" (#9877)"
This reverts commit ede72a8043.
This ensures that when someone opens the project using IDEA,
the Flutter plugin will find the location of the Flutter SDK
and run "flutter packages get".
* Adjust the defaults behaviour of scroll views.
Now, primary scroll views scroll by default. Others only scroll if necessary.
* apply suggested changes
* Add a text formatter interface used by EditingText. Provide some default implementations.
* self nits
* Handle -1 selection offsets
* review notes
* simplify regular expression
* Add whitelisting formatters. Use a custom phone number formatter in text demo.
* review notes
* not being able to addAll(null) is pretty annoying
* review notes
* partial tests
* Add tests
* didn’t end up needing mockito
* move to services
This patch reworks some of the guts of scrolling to make it easier to
implement nested scrolling effects. The actually nested scrolling effect
will be included in a later patch.
* Manually fix every use of Point.x and Point.y
Some of these were moved to dx/dy, but not all.
* Manually convert uses of the old gradient API
* Remove old reference to Point.
* Mechanical changes
I applied the following at the root of the Flutter repository:
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]origin\b/Offset.zero/g'
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]lerp\b/Offset.lerp/g'
git ls-files -z | xargs -0 sed -i 's/\bnew Point\b/new Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bconst Point\b/const Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bstatic Point /static Offset /g'
git ls-files -z | xargs -0 sed -i 's/\bfinal Point /final Offset /g'
git ls-files -z | xargs -0 sed -i 's/^\( *\)Point /\1Offset /g'
git ls-files -z | xargs -0 sed -i 's/ui[.]Point\b/ui.Offset/g'
git ls-files -z | xargs -0 sed -i 's/(Point\b/(Offset/g'
git ls-files -z | xargs -0 sed -i 's/\([[{,]\) Point\b/\1 Offset/g'
git ls-files -z | xargs -0 sed -i 's/@required Point\b/@required Offset/g'
git ls-files -z | xargs -0 sed -i 's/<Point>/<Offset>/g'
git ls-files -z | xargs -0 sed -i 's/[.]toOffset()//g'
git ls-files -z | xargs -0 sed -i 's/[.]toPoint()//g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point, /show /g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point;/show Offset;/g'
* Mechanical changes - dartdocs
I applied the following at the root of the Flutter repository:
git ls-files -z | xargs -0 sed -i 's/\ba \[Point\]/an [Offset]/g'
git ls-files -z | xargs -0 sed -i 's/\[Point\]/[Offset]/g'
* Further improvements and a test
* Fix minor errors from rebasing...
* Roll engine
* Fix tests to use Ahem, and helpful changes around that
- Fix fonts that had metric-specific behaviours.
- LiveTestWidgetsFlutterBinding.allowAllFrames has been renamed
to LiveTestWidgetsFlutterBinding.framePolicy.
- LiveTestWidgetsFlutterBinding now defaults to using a frame policy
that pumps slightly more frames, to animate the pointer crosshairs.
- Added "flutter run --use-test-fonts" to enable Ahem on devices.
- Changed how idle() works to be more effective in live mode.
- Display the test name in live mode (unless ahem fonts are enabled).
- Added a toString to TextSelectionPoint.
- Style nit fixes.
* Roll engine to get Ahem changes.
* Update tests for dartdoc changes.
* Fix flutter_tools tests
Rename State.config to State.widget
Rename State.didUpdateConfig to State.didUpdateWidget
Renamed all State subclasses' local variables named config to something else
* generate_from_arb has been moved to intl_translantion library
* fixed typo
* added missing intl dependency
* Regenerated language files with latest intl script
* Added version to intl_translations
* added isolate min version constraint
The stocks routing table is a clearer example of how to do this.
People know to look at the gallery, but don't think to look at the
stocks version. This points them from the former to the latter.
Now the scale gesture will accept if its focal point moves more than the pan
slop. This change lets it compete with a drag gesture (e.g., a containing scrol
view) in the same way that the pan gesture does.
Fixes#8735
This yak shave went as follows:
Fix https://github.com/flutter/flutter/issues/8795 by adding stocks to
the examples README.
Notice the layers entry in that README isn't quite right either.
Update that.
Check the layers/README file is worth pointing at.
Update the layers/README.
Let's run some of the layer tests to see if they still work.
Oops, need to update them to gradle.
Ok let's try running them again.
Oops, sector is broken.
Add a test for sector.
Fix sector. Find you need to add an assert to a const constructor.
Notice we need to turn const asserts on for the analyzer.
Notice the analysis_options files are out of sync with each other and
with the full list of lints.
Turn on the lints that should be on.
Fix the bugs that finds.
* Make IntelliJ metadata files consistent with the current flutter create template
* Add missing IJ files from current flutter create template
* Remove run config from layers as it requires running with -t
* Remove workspace.xml files per review feedback
Gradle projects are evaluated in lexicographical order, and the plugin
projects are at the same level as the :app project, so if a plugin has
a name that comes before 'app' (like, for example, any name that starts
with a capital letter), the plugin project will be evaluated before
:app.
Since :app applies the Flutter Gradle plugin, which tries to
modify the dependencies of the plugin projects, we have a problem if the
plugin projects have already been evaluated. Adding
evaluationDependsOn(':app') to the plugin projects fixes this.
Updated example projects to the latest (plugin-enabled) Gradle build
files.
Also removed two unused imports in `pluginClass.java.tmpl`.
* Moved stuff around yet
* Fix depedencies
* Add more dartdoc comments to packages
* Remove Cupertino dependency on material
* Removed mountain_view package and added page transition test
* Fix analyze warnings
* Remove commented code
* Partial solution. Still need to stop the animation on the previous page for modal
* Some review notes
* Move the cupertino back gesture controller’s lifecycle management back to its parent
* Reviews
* Add background color
* Directional curves, full screen transition
* Don’t perform the exit animation if the incoming page is a dialog
* It works!
* Test structures
* Add a bunch of more tests and fix the gallery
* One more comment
* Review notes
* final controller
* Use that sweet sweet `is!` keyword
* Play golf, because I’m bitter that there’s no nullable `as` or something in dart
* Remove a space
* Review notes
* Remove the last deprecated test
After this patch, there are three major text input widgets:
* EditableText. This widget is a low-level editing control that
interacts with the IME and displays a blinking cursor.
* TextField. This widget is a Material Design text field, with all the
bells and whistles. It is highly configurable and can be reduced down
to a fairly simple control by setting its `decoration` property to
null.
* TextFormField. This widget is a FormField that wraps a TextField.
This patch also replaces the InputValue data model for these widgets
with a Listenable TextEditingController, which is much more flexible.
Fixes#7031
* wip
* wip
* delete main.m
* readd main.m
* update to use new channel api
* update android
* removed android/
* remove debug print
* remomved main.m
* Update year in copyright
* break long line and update name
* mit comments
* update examples/README
* break line
* update README
* update test
Also refactors demos list into a class with `synchronized` and
`profiled` properties.
When run with --trace-startup, as we do in this test, the VM stores
trace events in an endless buffer instead of a ring buffer. To avoid
out-of-memory conditions, we restrict timeline collection to a subset.
* Bump to Dart SDK 1.23.0-dev.10
* allows us to understand flutter usage via telemetry
* brings in `@immutable`
Fixes: #9042
* completer fix
* Update to platform 1.1.1.
**THIS IS A BREAKING CHANGE.** See below for migration steps for
existing projects.
Previously, Flutter app code was built as a raw dylib on iOS. Dynamic
libraries outside of a framework bundle are not supported on iOS, except
for the system Swift libraries provided by Xcode.
See:
https://developer.apple.com/library/content/technotes/tn2435/_index.html#//apple_ref/doc/uid/DTS40017543-CH1-TROUBLESHOOTING_BUNDLE_ERRORS-EMBEDDED__DYLIB_FILES
* Migrates Xcode build from app.dylib to App.framework
* Migrates flutter create template
* Migrates example projects
Migration steps for existing projects
=====================================
The following steps should be taken from the root of your Flutter
project:
1. Edit `ios/.gitignore`: add `/Flutter/App.framework` on a new line.
2. In the Xcode project navigator, remove `app.dylib` from the Flutter
folder. Delete this file from the `ios/Flutter` directory in your project.
3. Run a build to generate `ios/Flutter/App.framework`. From the command
line, run `flutter build ios`. If you have not configured app signing
in Xcode, an alternative method is to open the simulator, then run
`flutter run -d iP`.
4. In the Xcode project navigator, select the `Runner` project. In the
project settings that are displayed in the main view, ensure that the
`Runner` target is selected. You can verify this by exposing the
sidebar using the [| ] icon in the upper-left corner of the main
view.
5. Select the *General* tab in the project settings. Under the
*Embedded Binaries* section, click '+' to add `App.framework`. In the
sheet that drops down, click the *Add Other...* button. Navigate to
the `ios/Flutter` directory and select `App.framework`. Click *Open*.
In the sheet that drops down, select *Create folder references*, then
click *Finish*.
6. In the project settings, verify that `App.framework` has been added to the
*Embedded Binaries* and *Linked Frameworks and Libraries* lists.
7. In the Xcode project navigator, drag `App.framework` under the
Flutter folder.
8. In the Xcode project navigator, select `Flutter` then from the
*File* menu, select *Add Files to "Runner"...*. Navigate to the
`ios/Flutter` directory, select `AppFrameworkInfo.plist` and click
the *Add* button.
9. From the command line, in your project directory, run
`flutter build clean`, then `flutter run`.
At this point your project should be fully migrated.
Breaking change: removed deprecated methods of PlatformMessages, leaving only binary messaging there. All other use of platform communication now goes through PlatformMessageChannel and PlatformMethodChannels. Retained use of String and JSON codecs for now.
Companion engine PR: flutter/engine#3482
* Add cupertino to gallery and add CupertinoButto
* Use single quotes
* Add disabled state
* Some review notes
* Make button animation more responsive and tweak timing
* Renamed things Cupertino
* Button with background, move cupertino demos, move material demos
* Move 2 level list too
* Refactor various demo route names
* Some review notes
* More reviews and add test
* Linter as
* Move private constant up
* Revert "Revert "Simplify path handling logic in dependency checker and devFS (#8414)" (#8467)"
This reverts commit 96ba7f76d2.
* Intentionally use a self-package URI in flutter_gallery
* tests to catch problems with self-package imports
It's common to just want a simple colored box. Simple thing should be simple,
so this patch adds a convenience argument to Continer for creating a box
decoration that is just a color.
Fixes#5555
Extend app bar left to edge, right to 4dp
Make leading button square and 56dp
Keep title at 72dp on Android according to Material
Renamed IconButton.size to .iconSize
IconButton minimum size expands to 48dp (#8264)
IconButton default constraints to 48. Can still stretch to infinity but can't be smaller than 48.
Ink splash for IconButton 40% bigger than the touch target to match Material
Tests
This does not attempt to correct any logic, only to port it as written.
The API changed a bit to take into account what is newly available and
no longer available in the new world.
* Update hello_world to new gradle based build flow
* Update flutter_gallery to gradle based build
* Align hello_services with new gradle based build
* Update platform_services to new gradle based build
* Upgrade stock to gradle based build
* Make new project template gradle-based for Android.
With this change, the 'new project' template uses the same gradle-based build for Android as the hello_services example. This has some implications on build performance, since we're now building a complete Android app instead of just combining a pre-compiled .dex with the Flutter assets.
The very first build is a little over 2x slower, since it needs to download gradle and build the build scripts before getting to the actual code. Subsequent builds with changes to the code are comparable to the old builds. Null builds are faster. Enabling the gradle daemon speeds up subsequent builds by around 5s.
* Move Flutter Gradle plugin to Flutter root.