Commit graph

1771 commits

Author SHA1 Message Date
Mikkel Nygaard Ravn d2efd189db Fix compile error (#9449) 2017-04-18 22:05:36 +02:00
Mikkel Nygaard Ravn 945cfc3ee2 Make naming consistent across channel APIs (#9270) 2017-04-18 15:23:15 +02:00
Sarah Zakarias 752d6096a6 Query battery state on startup in iOS Platform Channel examples (#9437) 2017-04-18 14:59:33 +02:00
Sarah Zakarias 3dfe225cb9 Add charging status to Swift version of Platform Channel example (#9436) 2017-04-18 14:05:33 +02:00
Phil Quitslund fc58bd7679 IntelliJ metadata cleanup (flutter-intellij#914). (#9427)
Follow-up from #9422
2017-04-17 13:42:31 -07:00
Chris Bracken 2480c4d448 Handle pluralisation in Cupertino button demo (#9420)
Also switches to single quotes for consistency with surrounding code.
2017-04-17 10:01:03 -07:00
Devon Carew 9493df2da8 update the IntelliJ metadata files (#9388) 2017-04-14 08:55:26 -07:00
Ian Hickson bf017b79b3 Move Point to Offset (#9277)
* 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
2017-04-12 15:06:12 -07:00
Hans Muller d9cd85e3ef Remove the pesto gallery demo (#9341) 2017-04-12 14:41:03 -07:00
Ian Hickson 2a54524337 Fix tests to use Ahem, and helpful changes around that (#9332)
* 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
2017-04-12 13:33:02 -07:00
xster 89a7fdfc56 Rename State.config to widget everywhere (#9273)
Rename State.config to State.widget
Rename State.didUpdateConfig to State.didUpdateWidget
Renamed all State subclasses' local variables named config to something else
2017-04-10 18:32:24 -07:00
xster 4f258357c9 Fix lints (#9307) 2017-04-10 02:09:51 -07:00
xster 7ce1cfd48d AppBar automatically show a close button for dialogs (#9268)
* Wiring fullscreen dialog

* Make fullscreen dialog use the new API. Add tests

* Review notes

* Move field back up

* final
2017-04-10 01:05:25 -07:00
Dariusz Baciński d25981cfb3 generate_from_arb has been moved to intl_translantion library (#9255)
* 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
2017-04-08 00:25:01 -07:00
Ian Hickson 2a5810e36f Point from gallery's routing table to stocks'. (#9287)
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.
2017-04-07 17:51:41 -07:00
Adam Barth f9ae22677a Improve cooperation between scale and drag gestures (#9298)
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
2017-04-07 17:00:32 -07:00
Alexandre Ardhuin 8bcf302e23 use conditional assignment (#9252) 2017-04-07 21:41:17 +02:00
Ian Hickson 3eb87830e9 Constants! Constants everywhere! (#9286)
Aggressively apply the const lint.
2017-04-07 12:24:32 -07:00
Jason Simmons bb0adcb873 Update version strings in Gallery (#9263)
Fixes https://github.com/flutter/flutter/issues/9259
2017-04-06 13:11:20 -07:00
Ian Hickson a52c7b470d Update the examples/ README and associated fixes. (#9090)
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.
2017-04-05 11:28:33 -07:00
Michael Thomsen c48f5f6d00 Remove title code as no title is shown (#9213) 2017-04-05 20:00:18 +02:00
Sarah Zakarias 4a4d100b91 Add battery charging status to Platform Channel example (#9147) 2017-04-05 09:40:35 +02:00
Hans Muller 20e214fa71 Document the buildTransitions() method (#9182) 2017-04-04 17:18:16 -07:00
Jason Simmons 3000c8bb59 Distinguish canceling a route pop from bubbling the pop up to the next level (#9165) 2017-04-04 16:42:31 -07:00
Alexandre Ardhuin 189028a958 Separate the 'if' expression from its statement (#9177) 2017-04-04 21:45:50 +02:00
Michael Thomsen 398ee35e03 Update IJ files to match latest flutter create template (#9103)
* 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
2017-04-04 15:50:03 +02:00
Jakob Andersen 5541d71b11 Android: Set evaluationDependsOn for plugin subprojects. (#9179)
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`.
2017-04-04 13:03:06 +02:00
Adam Barth 5d8bad74d2 Add more dartdocs (#9174) 2017-04-03 22:08:51 -07:00
xster 58ddde88f4 Make Cupertino page transitions match native behaviours (#9138)
* 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
2017-04-03 12:44:43 -07:00
Adam Barth ae8994860e Rationalize text input widgets (#9119)
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
2017-04-01 17:30:21 -07:00
Alexandre Ardhuin 2de61a0853 add @required when there's an assert not null (#9124)
* add @required when there's an assert not null

* address review comments
2017-03-31 18:34:13 +02:00
Sarah Zakarias a94e995f3e Add swift version of Platform Channel example (#9098)
* 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
2017-03-30 15:11:19 +02:00
Sarah Zakarias 089194fc15 update iml and .idea (#9101) 2017-03-30 14:23:12 +02:00
Sarah Zakarias 3e6a2c7636 cleanup platform_channel (#9099) 2017-03-30 13:27:48 +02:00
Mikkel Nygaard Ravn 471c97df30 Platform channel API cleanup (#9048) 2017-03-30 08:27:13 +02:00
Chris Bracken bd8e431d79 Restrict timeline collection to a subset of demos (#9093)
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.
2017-03-29 19:12:50 -07:00
Chris Bracken 2993ae8ddb Migrate flutter_view example to new plugin API (#9096)
Ref: flutter/engine#3539
2017-03-29 18:45:19 -07:00
Chris Bracken 002ba64bc1 Migrate platform_channel to updated API (#9094)
See flutter/engine#3539
2017-03-29 17:59:45 -07:00
Alexandre Ardhuin 4c530d5e8c prefer_final_fields (#8967) 2017-03-29 21:21:46 +02:00
Phil Quitslund ab6df3af40 Bump to Dart SDK 1.23.0-dev.10 (#9051)
* 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.
2017-03-28 14:53:03 -07:00
Michael Goderbauer 506aea0316 enable windows tests with workaround (#9058) 2017-03-28 14:22:03 -07:00
Hans Muller 9192f67252 Shrine gallery demo: support for landscape layout (#9025) 2017-03-27 15:07:24 -07:00
Sarah Zakarias 657a4c3fc6 update platform_channel package name (#9021)
* update platform_channel package name

* lowercase name
2017-03-27 14:33:15 +02:00
Sarah Zakarias 67bd17b4f0 remove platform_channel/android/buildSrc (#9020) 2017-03-27 13:35:20 +02:00
Sarah Zakarias d274888be6 Rename platform_services to platform_channel (#9018)
* Rename platform_services to platform_channel

* rename in README

* renamed tests

* update modules.xml
2017-03-27 11:17:31 +02:00
Hans Muller 606f56221b Eliminated DrawerItem, use ListTile instead (#8992) 2017-03-24 15:34:43 -07:00
Hans Muller 49f5fbb809 Tweaked the appaearance of the cards demo (#8964) 2017-03-24 10:21:59 -07:00
Sarah Zakarias 3c99272ce2 Update the examples README file (#8994)
* Update the examples README file

* Addressed comment
2017-03-24 11:51:54 +01:00
Sarah Zakarias df3a3657cf Remove hello_services sample (#8995) 2017-03-24 11:50:13 +01:00
Michael Thomsen 2d29c62590 Update links to platform services -> channels (#8975) 2017-03-23 14:16:42 +01:00