Commit graph

730 commits

Author SHA1 Message Date
Ian Hickson c97fc2063f
ExpansionPanel animation fixes (#13032)
Previously, ExpansionPanel would do weird things if interacted with
when it was already animating. This is fixed and there's now a test.

Also:

 * Minor fixes to make the gallery work in RTL, not that there's
   any way to see that without hard-coding the framework to RTL.
   But at least I'll be less annoyed when doing that.

 * Some trivial code and documentation cleanup.
2017-11-16 10:22:50 -08:00
Greg Spencer 797b39e9b2
Creates a new flutter command 'ide-config' and removes *.iml and .idea from tree. (#12958)
Creates a new (hidden) flutter command 'ide-config' that will create and/or update
existing .iml files and some files under the .idea directory, as well as
removing existing *.iml files and the .idea directory.

It also:

 * Adds *.iml to the .gitignore
 * Removes existing .iml files from the repo, and moves them to the
   packages/flutter_tools/ide_templates/intellij directory.
 * Adds a flag to ide-config ('--update-templates') that will take any new .iml
   files in the flutter tree and add them to the existing templates.
     - If --overwrite is also specified, then all existing templates will also
       be overwritten with the contents from the flutter tree, and any that have
       been deleted from the flutter tree will also be removed from the
       templates.
 * Added new run configurations for all existing app targets that will now also
   be automatically added to IntelliJ.
 * Setting up the environment also includes setting the coding style guidelines
   and the git VCS.
 * Note that after this PR lands, Flutter developers will need to run it once to
   re-create the .iml files and configuration files that have been removed.

After this PR lands, .iml files will no longer appear in the untracked files
section for git.
2017-11-13 10:55:22 -08:00
xster 89405002bc
Add an iOS style demo to the gallery (#12651)
* Built first tab

* Small additions

* started tab 3

* Need color arithmetics

* tab 2 built

* finalize

* lint and tests

* review

* Reapply docs after rebase

* use color.computeLuminance

* linter

* nit
2017-11-03 08:50:29 -07:00
5u3it c608e666ad Material scaffold to have simultaneous left-and-right drawers (#12686)
Adds `Scaffold#endDrawer` property to supply a second drawer to a Scaffold.
2017-11-01 21:35:28 -07:00
Greg Spencer 05e10633f2
Adding proper accommodation for textScaleFactor in chips, and StadiumBorder border. (#12533)
In order to allow chips to be properly drawn when they expand in size (without
using IntrinsicHeight), I needed a BoxDecoration shape that would be dependent
upon the rendered height of the widget. This seemed to be pretty generally
useful, so I added a new ShapeDecoration called StadiumBorder. It uses the
minimum dimension to adjust the BorderRadius of a rounded rect in the shape
decoration.

I also converted some uses of BoxShape to be case statements, updated the
chips to use the StadiumBorder decoration, and updated some of the metrics to match
the Material spec, as well as implementing lerping to and from StadiumBorder.
2017-11-01 19:37:02 -07:00
Chris Bracken 83df7bdd0f
Update Dart package dependencies (#12829) 2017-11-01 15:28:46 -07:00
Yegor 154f2e5402 Reapply #12700 but keep linter pinned at 0.1.35 (#12735)
* Revert "Revert "fix --force-upgrade script; upgrade to the latest package versions (#12700)" (#12729)"

This reverts commit 7f0d4f4caa.

* keep linter pinned at 0.1.35
2017-10-26 09:55:36 -07:00
Yegor 7f0d4f4caa Revert "fix --force-upgrade script; upgrade to the latest package versions (#12700)" (#12729)
This reverts commit 5b3575006e.
2017-10-25 17:08:08 -07:00
Yegor 5b3575006e fix --force-upgrade script; upgrade to the latest package versions (#12700)
* fix updrade script; upgrade to the latest package versions

* exclude special dependencies from transitive closure

* fix stack trace handling in flutter_test due to stack_trace change

* change type on _emptyStackTrace
2017-10-25 16:12:43 -07:00
Chris Bracken d69fcea1a8 Use Mountain View/Cupertino terms in drawer on iOS (#12699)
Use our platform identifiers rather than OS names for the platform
switcher radio buttons in the drawer as noted in section 2.3.10 of the
App Store review guidelines.

See: https://developer.apple.com/app-store/review/guidelines/
2017-10-24 18:11:10 -07:00
Phil Quitslund d6a7d05a25 Fix typo in Calculator demo. (#12688) 2017-10-24 10:36:31 -07:00
Alexandre Ardhuin 1fce14a31c enable lint prefer_single_quotes (#12665) 2017-10-22 18:11:36 +02:00
P.Y. Laligand e04472e8d5 Update location of intl package. (#12644)
Also switched to relative paths for local packages.
2017-10-19 19:36:50 -07:00
Hans Muller 765167bb8c Updated stocks example README (#12634) 2017-10-19 16:37:48 -07:00
Michael Goderbauer f8a2bd20e9 Redesign Semantic Tree Compilation Algorithm (#12605)
* Oct 12 10:12am

* implicit_semantics_test.dart passes

* refactoring

* works in nice

* minor rename

* more doc comments

* to be explicit check better

* fix test

* ++

* ++

* semantics_9_test (BlockSemantics) and implicit_semantics_test are passing

* doc updates

* tiny refactor

* fix static errors in tests

* fix gesture detector

* ++

* ++

* geometry

* ++

* remove noGeometry

* revert test

* +

* all tests but scrolling/clipping pass

* clipping works

* scrolling halfway

* sliver tests pass

* ALL TESTS PASS

* SemanticsNode changed

* docs and tiny fixes

* card test

* more doc comments

* remove missed print

* more tests

* make test pass on Linux

* remove changes to intellij proj file

* review comments
2017-10-18 16:28:24 -07:00
Greg Spencer e697e5523f Add large text switching to Gallery app. (#12443)
This lets us preview widgets in the gallery using small, normal, large, and HUGE text.

Added selections to the main drawer for these options. Defaults to "normal", obviously.
2017-10-13 21:44:24 -07:00
P.Y. Laligand 0999fca99d Update references to the engine project. (#12515) 2017-10-13 17:16:33 -07:00
Hans Muller c3d56b1dad flutter_localization optional package (#12410) 2017-10-11 16:01:13 -07:00
P.Y. Laligand 21b81d902d Disable Dart analysis in Fuchsia. (#12409)
Fuchsia will soon use a newer version of the Dart analysis server which Flutter code has not been adjusted for yet.
2017-10-06 10:47:52 -07:00
Alexander Aprelev c02850b4dc Force upgrade update packages with improved update process. (#12412)
* Force upgrade update packages with improved update process.

* Update packages

* Revert "Update packages"

This reverts commit a37de26d3f.
2017-10-05 20:59:08 -07:00
Adam Barth 6128f48c80 Switch SlideTransition over to using Offset (#12369)
Previously, we used `Alignment`, which was difficult to understand. Now,
we just use an `Offset` scaled to the child's size, which is much easier
to understand.
2017-10-02 23:30:14 -07:00
gspencergoog 18f0d3aef7 Add framework support for system text scale factor. (#12180)
* Add framework-side support for system text scale factor.

* Rolling engine to e3404b81a53ba3180c7623a6f2190ebb28518f30
  Additional changes rolled in with engine change:
    libtxt: implementation of GetRectsForRange that processes a line at a time - e3404b8
    Provide an entropy source to the Dart engine (#4161) - e1aa867
    libtxt: search for fallback fonts that can match emoji and CJK characters - 8061df1
    Roll skia to e4679fa06a. (#4157) - 267e7a8
    Update buildroot to 53fea9aebbcc39c6522731471a1a45960ee0685e (#4160) - 02ea7ae
    Revert engine Dart roll. (#4158) - 14aab33
    Add support for system text scale factor. (#4124) - b2a7f4b
    Include _http into sky_engine libraries for analyzer (#4154) - b930f10
    libtxt: Remove postprocess_line and improve tracking of X offsets - 86f95f0
    libtxt: remove redundant line_widths (#4152) - 14bf515
    Roll dart to ade37f931e90b0fdb8fe16d6bf6f089545da55b6 (#4151) - 6f1264f
2017-10-02 14:18:18 -07:00
Adam Barth 0044ea2dbb Replace usage of FractionalOffset with Alignment (#12348)
Alignment will eventually replace FractionalOffset.
2017-10-02 00:06:24 -07:00
Ian Hickson efb45ea788 Trivial nit fixes (#12285) 2017-09-27 16:13:48 -07:00
Sarah Zakarias a0e91bf9e8 Update Flutter Gallery to use new asset api for package assets (#12254) 2017-09-26 15:21:01 +02:00
Jason Simmons 6420c75f26 Handle cancellation of the date/time picker in the Gallery full screen dialog demo (#12248) 2017-09-25 13:59:05 -07:00
Yegor f2d096010d Internationalize time numerals in the time picker and TimeOfDay (#12166)
* internationalize time numerals

* tests

* use foundation.dart instead of meta.dart

* address comments
2017-09-22 14:35:25 -07:00
Ian Hickson 441b5c2031 Pin all dependencies ONCE AND FOR ALL (#12210)
* Pin all dependencies ONCE AND FOR ALL

This replaces the secret `flutter update-packages --upgrade` with a destructive `flutter update-packages --force-upgrade` that actually goes and pins every dependency and transitive dependency in every flutter package to the same version.

* Add comments.
2017-09-22 13:35:35 -07:00
Alexander Aprelev 63802b3dff Pin args to 0.13.7 to avoid version conflict (#12208) 2017-09-21 18:29:16 -07:00
Alexandre Ardhuin 2958d7d0fc use bool in assert (#12170) 2017-09-21 09:33:01 +02:00
Todd Volkert 11de1a516f Fix capitalization in gallery RegExp (#12035) 2017-09-11 12:56:38 -07:00
Adam Barth 1792766a88 Rename BannerLocation enum values (#11960)
* Rename BannerLocation enum values

 * topLeft -> topStart
 * topRight -> topEnd
 * bottomLeft -> bottomStart
 * bottomRight -> bottomEnd

These names will make it easier for us to adjust the location of the
banner in right-to-left mode.

See the discussion on flutter-dev.

* Add RTL support for Banner

Fixes #11905
2017-09-07 21:12:28 -07:00
xster 538a33ee3b update plugin underscore (#11779) 2017-08-24 15:20:19 -07:00
Dan Rubel 3a31c35ba0 Rename .analysis_options to analysis_options.yaml (#11594) 2017-08-15 08:46:42 -04:00
Alexandre Ardhuin 8a88e2efca Bump Dart SDK to 1.25.0-dev.9.0 (#11509)
* Bump Dart SDK to 1.25.0-dev.9.0

* add link to sdk bug
2017-08-09 14:45:55 +02:00
Michael Goderbauer b551f53471 Don't trigger an assert when markNeedsSemanticsUpdate is called multiple times in edge cases (#11544)
* Don't trigger assert if a render object ceases to be a semantic boundary

This bug was exposed by https://github.com/flutter/flutter/pull/11309, which caused the following assertion to trigger when scrolling in the Animation demo:

```
The following assertion was thrown during _updateSemantics():
'package:flutter/src/rendering/object.dart': Failed assertion: line 2626 pos 16: 'fragment is
_InterestingSemanticsFragment': is not true.
```

A minimal reproduction of the bug can be found in `semantics_10_test.dart`, which has been added as a regression test for the bug by this PR.

Looking at that test, here is a description of the faulty behaviour:
1. During the second `pumpWidget` call `RenderExcludeSemantics` marks itself as needing a semantics update (due to excluding going from `false` -> `true`).
2. This causes the nearest ancestor with semantics information (here: `RenderSemanticsAnnotations` representing the "container" Semantics widget) to be added to the `_nodesNeedingSemantics` list.
3. `RenderSliverList` (implementation behind ListView) marks itself as needing a semantics update (due to its changing children).
4. This causes the `RenderSemanticsGestureHandler` to be added to the `_nodesNeedingSemantics` list.
5. Next, canDrag is updated from `true` -> `false`. This means, `RenderSemanticsGestureHandler` is no longer a semantics boundary, it marks itself as needing a semantics update.
6. The nearest ancestor with semantics (`RenderSemanticsAnnotations`, the "container") is added to the `_nodesNeedingSemantics` list (this is a no-op because it is already in the list).
7. During `flushSemantics`, the `_nodesNeedingSemantics` list is walked. The first entry (`RenderSemanticsAnnotations`) updates the semantics tree to only contain the container widget and drop everything else (= no children of the ExcludeSemantics widget are walked).
8. The second entry (`RenderSemanticsGestureHandler`) is updated. It does not add any semantics of its own and is no longer a semantics boundary. Therefore, it wants to merge its descendent semantics into its parents. Here is where the assert throws because the algorithm assumes that every entry in the `_nodesNeedingSemantics` list will produce and own an `_InterestingSemanticsFragment` (passing your semantics on to your parents is not interesting).

The problem here seems to be step 4 in combination with step 5. In step 4 we rely on the fact that `RenderSemanticsGestureHandler` is an (explicit or implicit) semantics boundary and that it will be able to absorb the semantics change of `RenderSliverList`. This is true
at this time. However, in step 4 `RenderSemanticsGestureHandler` decides to no longer be an (explicit or implicit) semantics boundary and our assumption from step 5 becomes incorrect. We did nothing to correct this assumption.

This PR removes a node, that could potentially cease to be a (explicit or implicit) semantics boundary from the `_nodesNeedingSemantics` list to fix that problem. Please node that this does not mean that the node's semantics will not be updated: The node's closest ances
tor with semantics is added to that list during the `markNeedsSemanticsUpdate` call. During `flushSemantics` we will walk from this node to update the semantics of it's children (if changed), which will include the node in question.

* tiny fix

* simplify test

* analyzer fixes

* review comments
2017-08-08 14:17:20 -07:00
Jaime Wren dbd3bf28e6 Replace FLUTTER_MODULE_TYPE with WEB_MODULE in dev/manual_tests/* and examples/* iml files (#11234) 2017-08-07 15:53:56 -07:00
Chris Bracken cb14eb989d Update IntelliJ project files for latest plugin (#11536)
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.
2017-08-07 12:19:25 -07:00
Jacob Richman 93a98327a8 Add Diagnosticable base class and add documentation. (#11458)
Add Diagnosticable base class and documentation
2017-08-03 09:49:44 -07:00
Jacob Richman 9f510ebdc9 Refactor RenderObject.toStringDeep and Widget.toStringDeep code to use DiagnosticsNode (#11359)
Refactor RenderObject.toStringDeep and Widget.toStringDeep code to use DiagnosticsNode.
2017-07-25 09:25:13 -07:00
Michael Goderbauer 6ac0f61234 Gallery: remove unused code and a11y fix (#11209) 2017-07-14 14:44:11 -07:00
Michael Goderbauer cb35a1c728 Tiny a11y fix for Gallery (#11187) 2017-07-13 09:50:37 -07:00
Todd Volkert 77da737847 Bump intl to 0.15.1 (#11162)
* requires bumping `process` to a version that has
  relaxed version restrictions on `intl`

https://github.com/flutter/flutter/issues/10650
2017-07-11 21:11:26 -07:00
Michael Goderbauer 792c98751f a11y fix for list_demo.dart (#11142)
* a11y fix for list_demo.dart

* fix semantics of persistant bottom sheet
2017-07-10 17:37:21 -07:00
Yegor 18d9b20ffb add Android instrumentation test (#11063)
* 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
2017-07-10 17:20:49 -07:00
Mikkel Nygaard Ravn 1731a16d81 Make consistent use of gradle wrapper (#10993) 2017-06-29 09:48:01 +02:00
Michael Goderbauer 8b888e6a12 Apply tempalte changes to examples (#10865) 2017-06-20 15:27:00 -07:00
Michael Goderbauer 0e1b652d53 Make Demos in flutter_gallery more accessible (#10832)
Remaining known issues are #10831 and #10830.
2017-06-20 11:09:57 -07:00
Hans Muller 40db1e4bc6 Added InputDecoration helperText, helperStyle (#10852) 2017-06-20 09:33:26 -07:00
Todd Volkert 4739159eff Allow transitions_perf_test.dart to be run using package:test (#10725)
package:test does not allow main() methods to have required
arguments - changing to an optional positional arguments list
fixes this.
2017-06-15 10:15:56 -07:00
Michael Goderbauer e2d4f9242e Benchmark for semantic overhead during transitions (#10678)
* Benchmark for semantic overhead during transitions

* review comments
2017-06-14 08:09:05 -07:00
gspencergoog 9f344b695d Adds prefix and suffix support to TextField, per Material Design spec. (#10675)
* Prefix and Suffix support for TextFields

* Adding Tests

* Removing spurious newline.

* Fixing a small problem with the test

* Review Changes
2017-06-13 19:17:04 -07:00
Ian Hickson a9f1cb8c0a More documentation (#10606)
- How do you handle a tap on text?
- Why is AnimatedOpacity expensive?
- Why would you use a gesture arena team?
...and other minor fixes
2017-06-12 16:53:01 -07:00
Ian Hickson 9ac16680d2 Analyze sample code (#10619) 2017-06-12 16:52:35 -07:00
Alexandre Ardhuin 1eaefe1837 more const for immutables (#10563) 2017-06-08 22:04:18 +02:00
Alexandre Ardhuin 7d71326363 apply prefer_asserts_in_initializer_list lint (#10540) 2017-06-07 21:39:47 +02:00
Ian Hickson ccad2849e7 Docs for menus (#10396)
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).
2017-05-31 10:48:49 -07:00
Ian Hickson f50caddfbd Much work on the documentation (#10331)
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)
2017-05-26 17:15:09 -07:00
Jason Simmons e913a51c47 Update Gallery's GeneratedPluginRegistrant to the latest template (#10349)
See https://github.com/flutter/flutter/pull/10259
2017-05-26 11:37:06 -07:00
Hans Muller e3ae11e879 Updated example gitignore files per the flutter create template (#10251) 2017-05-22 10:31:50 -07:00
Ian Hickson cd6e3b1ac2 CheckboxListTile, RadioListTile, SwitchListTile (#10160) 2017-05-19 08:46:17 -07:00
Chris Bracken 2da63e4657 Update example project .gitignores to latest template (#10188)
Under android/ directory, ignore:
GeneratedPluginRegistrant.java

Under ios/ directory, ignore:
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m
Pods/
2017-05-18 18:09:51 -07:00
Ian Hickson 61c56ba15f Make Slider take up whatever space it has. (#10132)
Previously it was (arbitrarily?) set to 144.0 pixels wide.
2017-05-17 14:31:55 -07:00
Ian Hickson 6ffcadfa38 Remove the slider from the Icon demo page (#10134)
The slider never really made much sense and it violated UX guidelines.

https://github.com/flutter/flutter/issues/4147
2017-05-16 19:34:50 -07:00
stevemessick cc91b159c0 Fix typo (#10111) 2017-05-16 10:19:21 -07:00
Jason Simmons e65d47d4ba Update Gallery primary swatch colors in order to select the intended text color (#10090) 2017-05-15 12:40:20 -07:00
Jason Simmons 91b1a07656 Framework support for checkerboardOffscreenLayers (#10054)
See https://github.com/flutter/flutter/issues/9473
2017-05-12 14:41:07 -07:00
Adam Barth ff0aa51326 Update gallery assets (#9957)
The new assets have been optipng'ed.
2017-05-11 23:28:25 -07:00
xster 81ec553fb6 More Cupertino dialog UI tweaks (#9960)
* is default

* hit target

* correct test name

* review note
2017-05-10 18:59:50 -07:00
Alexandre Ardhuin 9b56c1c58c enable always_put_control_body_on_new_line lint (#9950) 2017-05-10 09:41:55 +02:00
Alexandre Ardhuin e4546584d1 enable always_require_non_null_named_parameters lint (#9948)
* enable always_require_non_null_named_parameters lint

* Update home.dart
2017-05-10 08:45:36 +02:00
Chris Bracken 60f5ae8e77 Add const non-null asserts where required (#9945)
Also includes minor doc fixes.
2017-05-09 21:15:42 -07:00
Hans Muller 1157812bb9 Added ExpansionTile and deprecated TwoLevelList et al (#9938) 2017-05-09 16:32:01 -07:00
Michael Thomsen 5cec108023 Roll android build tools to 25.0.3 (#9922)
* Roll android build tools to 25.0.3

* Roll android build tools to 25.0.3 in templates
2017-05-09 18:58:46 +02:00
Sarah Zakarias ee6cd679c8 More use of url_launcher plugin in Flutter Gallery (#9836) 2017-05-09 15:05:23 +02:00
Sarah Zakarias 4e3a4ce830 Update Flutter Gallery to new plugin registry (#9914) 2017-05-09 14:00:06 +02:00
Sarah Zakarias 2dd26a93a5 Revert "Revert plugin use in gallery (#9838)" (#9913)
This reverts commit 4bbf158b6a.
2017-05-09 11:49:03 +02:00
Michael Thomsen a625d3e140 Revert "Upgrade to most recent android build tools version (#9878)" (#9888)
This reverts commit 5ed2984e75.
2017-05-08 20:33:12 +02:00
Michael Thomsen 5ed2984e75 Upgrade to most recent android build tools version (#9878) 2017-05-08 20:12:32 +02:00
Ian Hickson 3012cce146 Clean up Tween and friends. (#9858) 2017-05-08 10:42:06 -07:00
Hans Muller a6eb0a3e38 Gallery animation demo back button update (#9853) 2017-05-08 10:13:13 -07:00
Andrew Wilson f752cd3844 Add url_launcher dependency to BUILD.gn. (#9886) 2017-05-08 09:53:41 -07:00
Ian Hickson a5894fca82 Revert "Revert "Revert plugin use in gallery (#9838)"" (#9883)
* 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.
2017-05-08 09:42:23 -07:00
Ian Hickson f3c60eaf5a Revert "Update reference to url_launcher plugin in Gallery pubspec (#9879)" (#9885)
This reverts commit 96a04dea0d.
2017-05-08 09:42:06 -07:00
Sarah Zakarias 96a04dea0d Update reference to url_launcher plugin in Gallery pubspec (#9879) 2017-05-08 15:24:52 +02:00
Sarah Zakarias ede72a8043 Revert "Revert plugin use in gallery (#9838)" (#9877)
This reverts commit 4bbf158b6a.
2017-05-08 13:32:41 +02:00
P.Y. Laligand 8cef5232d5 Use the correct set of options to analyze Flutter packages. (#9758)
This affects the Fuchsia build which will soon run analysis by default.
2017-05-05 17:18:58 -07:00
Hans Muller 3681aee5a4 Selectively enable page scrolling in the gallery animation demo (#9845) 2017-05-05 16:02:25 -07:00
Sarah Zakarias 4bbf158b6a Revert plugin use in gallery (#9838)
* Revert "add Podfile (#9835)"

This reverts commit 74e656752c.

* Revert "update ref to url_launcher plugin in Flutter Gallery (#9833)"

This reverts commit 30c49781c5.

* Revert "Use url_launcher plugin in Flutter Gallery (#9751)"

This reverts commit 02dfd6be53.
2017-05-05 14:14:33 +02:00
Sarah Zakarias 74e656752c add Podfile (#9835) 2017-05-05 12:59:01 +02:00
Sarah Zakarias 30c49781c5 update ref to url_launcher plugin in Flutter Gallery (#9833) 2017-05-05 11:37:27 +02:00
Sarah Zakarias 02dfd6be53 Use url_launcher plugin in Flutter Gallery (#9751) 2017-05-05 10:48:46 +02:00
Chris Bracken 28feba043f Update Gallery plugin integration (#9823)
Enable plugin infra for both iOS and Android post-#9791.
2017-05-04 19:02:00 -07:00
Hans Muller 6d8930e4d6 Animation demo scrolling (#9804) 2017-05-04 11:13:36 -07:00
Hans Muller cddf06cf26 Added scroll snapping to the gallery animation demo (#9710) 2017-05-03 16:35:28 -07:00
Chris Bracken eacf793b35 Use default FlutterActivity in non-plugin examples (#9770)
Brings hello_world and flutter_gallery Android code in line with the
corresponding iOS code.
2017-05-03 14:20:17 -07:00
Kyle Bradshaw b5671f1b22 Gallery Cupertino Dialog demo snackbar fix (#9764)
Fixes #9757
2017-05-03 12:29:45 -07:00
Jason Simmons b586a97ad2 Enable physical model shadows (with animation) and change elevation to a double (#9756)
Fixes https://github.com/flutter/flutter/issues/9342
2017-05-03 12:11:01 -07:00
Chris Bracken 1dc2d4eb43 Migrate Gallery demo to latest template (#9730) 2017-05-02 14:05:53 -07:00
Ian Hickson 89856c0e5b Adjust the defaults behaviour of scroll views. (#9679)
* Adjust the defaults behaviour of scroll views.

Now, primary scroll views scroll by default. Others only scroll if necessary.

* apply suggested changes
2017-05-02 09:14:50 -07:00
xster f65fea8e2e Create a text validator/formatter mechanism (#9535)
* 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
2017-04-28 15:33:38 -07:00
Jason Simmons a4992f0eac Fix the sizing of the stack containing the Gallery preview banner (#9657) 2017-04-27 15:16:05 -07:00
Ian Hickson 11fa80bb78 MediaQuery.of shouldn't give a default return value (#9596) 2017-04-27 15:02:59 -07:00
Ian Hickson 36052e68dd BoxDecoration API changes: backgroundColor -> color et al (#9648)
backgroundColor -> color
backgroundImage -> image
BackgroundImage -> DecorationImage
2017-04-27 14:19:01 -07:00
Adam Barth 744c91265b Add NestedScrollView (#9640)
A NestedScrollView lets you implement patterns where you have a header, tabs,
and additional scrollers inside the tabs.

Fixes #8359
2017-04-27 12:29:40 -07:00
Jason Simmons 834c142d04 Fix the sizing of the image in Gallery/Contacts (#9625) 2017-04-27 11:32:53 -07:00
Alexandre Ardhuin 31828609dc add @required (#9579) 2017-04-25 08:59:43 +02:00
Adam Barth c288c7064f Refactor scrolling code to prepare for nested scrolling (#9575)
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.
2017-04-24 23:32:55 -07:00
Michael Thomsen c313984409 Exclude generated PluginRegistry files from git (#9555) 2017-04-24 15:23:18 +02:00
Alexandre Ardhuin 83fce211a3 More const immutable classes (#9544)
* more widget const constructors

* prefer const constructors

* address review comments
2017-04-23 22:37:29 +02:00
Adam Barth 0d0861b3ee The const will continue until morale improves (#9536) 2017-04-21 14:59:24 -07:00
Alexandre Ardhuin 9541848272 make @immutable const classes (#9532)
* make @immutable const

* fix build
2017-04-21 23:09:42 +02:00
Michael Thomsen 7a57d37195 Add Pods cache dir to ios/.gitignore (#9464)
* Add Pods cache dir to ios/.gitngnore

* Add missing ending newlines
2017-04-21 13:18:05 +02:00
Alexandre Ardhuin 03c54abd5f make some widgets const (#9477) 2017-04-20 08:59:05 +02:00
Hans Muller 92e40b5c45 Image color blend mode (#9486) 2017-04-19 17:46:00 -07:00
Brian Slesinsky af25a5b888 gallery: set Dart SDK location in IDEA (#9452) 2017-04-18 15:46:22 -07:00
Hans Muller 1e4151691a Fix PageSelector, page selector gallery demo (#9448) 2017-04-18 14:15:32 -07: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
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
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
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
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
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
Chris Bracken 0ee3f57a10 Build Flutter app as a framework on iOS (#8971)
**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.
2017-03-22 17:41:49 -07:00
Alexandre Ardhuin 578ca0a295 use color.shadeXxx instead of color[Xxx] (#8932)
* use color.shadeXxx instead of color[Xxx]

* remove calls to .shade500 on MaterialColor

* remove calls to .shade200 on MaterialAccentColor

* fix test
2017-03-21 23:14:55 +01:00
Adam Barth 269538df58 Add a constant for padding in a Material ListView (#8918)
Fixes #8235
2017-03-20 16:18:41 -07:00
Adam Barth 97816e1571 Rename Dismissable to Dismissible (#8919)
The latter is the proper spelling.

Fixes #8883
2017-03-20 16:17:08 -07:00
Hans Muller 031e042eee Now each Colors.foo constant is-a Color and a color swatch (#8833) 2017-03-17 15:24:54 -07:00
Adam Barth 5cf04b6141 Rename ImageFit to BoxFit (#8871)
This machinery is useful for arbitrary boxes (e.g., with FittedBox).

Fixes #6463
2017-03-17 15:21:55 -07:00
Alexandre Ardhuin a0769f2488 apply the upcoming rule unnecessary_this (#8838) 2017-03-17 08:05:42 +01:00
Alexandre Ardhuin 2166ea5b7f apply partially the upcoming unnecessary_lambdas (#8810) 2017-03-15 23:09:58 +01:00
Alexandre Ardhuin a9ba0e2f88 prefer_initializing_formals (#8797) 2017-03-15 18:30:55 +01:00
Adam Barth fd51093146 Rename SliverPadding.child to SliverPadding.sliver (#8757)
The new name follows the pattern of the name suggesting which layout
protocol the parent expects the child to speak.

Fixes #8664
2017-03-14 14:07:13 -07:00
Hans Muller 859da8d28b Rename ListItem to ListTile, document ListTile fixed height geometry (#8769) 2017-03-14 11:46:30 -07:00
Adam Barth 6b75ac3fde Rename dependenciesChanged to didChangeDependencies (#8767)
The new name matches the style guide. (The old name was just old and predated
the style guide.)

Fixes #8000
2017-03-14 11:21:53 -07:00
Ian Hickson 8eac6cd0da Test API improvements: pumpAndSettle, autogenerate pointer IDs (#8751) 2017-03-13 16:27:15 -07:00
Alexandre Ardhuin 16d800b204 normalize setter format (#8708) 2017-03-10 21:52:30 +01:00
Alexandre Ardhuin 6a2148dde9 prefer const constructors (#8594)
* prefer const constructors

* fix double throw
2017-03-08 14:58:14 -08:00
Alexandre Ardhuin ce734e8f24 apply the upcoming rule : directives_ordering (#8582) 2017-03-08 14:58:09 -08:00
Alexandre Ardhuin 329e52c02c apply upcoming rule use_collection_literals_when_possible (#8649) 2017-03-08 14:57:31 -08:00
Chris Bracken 53daa55f93 Rollback example Xcode project changes (#8645)
* Revert "Update Hello World to latest iOS project template (#8634)"

This reverts commit 6dc6ed4e97.

* Revert "Update Gallery to latest iOS project template (#8637)"

This reverts commit 84c42aac0e.

* Revert "Update Stocks to latest iOS project template (#8640)"

This reverts commit 90774c188a.
2017-03-07 21:16:34 -08:00
Chris Bracken 19ad3ea456 Enable landscape mode in Flutter Gallery (iOS) (#8638)
Already enabled on Android.
2017-03-07 17:13:20 -08:00
Chris Bracken 84c42aac0e Update Gallery to latest iOS project template (#8637) 2017-03-07 17:13:10 -08:00
Chris Bracken a4125f3b0e Declare Xcode 8.3.x compatibility in project files (#8622)
Update templates and example Xcode project files to indicate they've
been tested for Xcode 8.3 compatibility.
2017-03-07 13:11:41 -08:00
Chris Bracken 3b4f6b1ae0 Update Example iOS icon assets for Xcode 8.2.x (#8616)
Gallery and stocks:
* Add 20x20 notification icons.
* Remove unused 76x76 (3x scale) icon.

Other examples: update JSON to Xcode 8.2.1 defaults

Fixes warnings for missing/unused icon assets in Xcode 8.2.x
2017-03-07 12:29:08 -08:00
Hans Muller 44dbecc6be Animation Demo performance tweaks (#8586) 2017-03-06 11:06:05 -08:00
Chris Bracken 96eea437b2 Declare locals final where not reassigned (gallery) (#8571) 2017-03-03 17:51:21 -08:00
Hans Muller 54d9541638 Added a gallery animation demo (#8547) 2017-03-03 11:38:19 -08:00
Chris Bracken c54cc96905 Default contacts demo to pinned AppBar (#8445) 2017-03-02 14:40:13 -08:00
xster e55c7239ec Fix test (#8536) 2017-03-02 12:46:43 -08:00
Alexandre Ardhuin 69b6bb87d1 prefer_is_empty and prefer_is_not_empty (#8474) 2017-03-01 22:17:30 -08:00
Ian Hickson 2f002885cc Allow two shrine order pages to be on the screen at the same time. (#8507)
This happens when, for instance, you go back then forward quickly.
2017-03-01 22:07:37 -08:00
xster a76c352d57 Add Cupertino to gallery and add CupertinoButton and many yak friends (#8411)
* 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
2017-03-01 16:06:48 -08:00
Michael Goderbauer 2a9fc2e70e Remove self-package import (#8483)
This is apperently breaking some customers.

If this gets submitted, we should investigate why self-package imports
don't work for certain customers.
2017-02-28 19:45:29 -08:00
Michael Goderbauer 65835af4e6 Roll forward #8467 (#8477)
* 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
2017-02-28 17:21:17 -08:00
Adam Barth ecb6efa926 Generalize AnimatedWidget to work with any Listenable (#8469) 2017-02-28 16:40:41 -08:00
Michael Thomsen 0533ffc020 Upgrade build tools to latest Android Studio default (#8461) 2017-02-28 18:25:28 +01:00
Adam Barth f20c3d1032 Add a color argument to Container. (#8396)
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
2017-02-24 12:25:48 -08:00
Alexandre Ardhuin 8c043d06de fix lints for directives_ordering rule (#8382) 2017-02-23 13:37:26 -08:00
xster 72fa281f12 Conform appbar buttons to Material (#8263)
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
2017-02-22 11:32:22 -08:00
Adam Barth b6e282779a Disable menu button when bottom sheet open (#8319)
Otherwise tapping the menu button causes the bottom sheet to disappear and
reappear.

Fixes #8275
2017-02-21 16:25:28 -08:00
Alexandre Ardhuin e9a775bf38 prefer const constructors (#8316) 2017-02-21 14:54:29 -08:00
Alexandre Ardhuin da925c7d71 Replace @checked with covariant (#8300)
Fixes #7734
2017-02-21 09:30:22 -08:00
Michael Thomsen 1e1f7703cc Revert "Revert "Update /examples/ to new gradle based build flow (#8173)"" (#8291) 2017-02-21 12:22:26 +00:00
Ian Hickson f9c2d7d9aa Introduce a quick way to test across platforms (#8262) 2017-02-17 17:47:49 -08:00
Adam Barth e0b12ca17e Two becomes one (#8253)
Rename all the "2" classes related to scrolling to remove the "2". Now that the
old scrolling code is gone, we don't need to use the suffix.
2017-02-17 14:06:15 -08:00
Ian Hickson 0962dd6a94 More better toStrings and more vigorous smoke testing of gallery (#8237)
* More better toStrings and more vigorous smoke testing of gallery

* Update scroll_controller.dart

* Update sliver.dart
2017-02-17 12:56:25 -08:00
Ian Hickson 6303a32d63 Pesto crash (#8238) 2017-02-16 20:44:33 -08:00
Ian Hickson 1bd7dbc2ec Rename "Over-scroll" demo to "Pull to refresh" (#8224)
Fixes https://github.com/flutter/flutter/issues/5935
2017-02-16 17:14:01 -08:00
Ian Hickson 659bc2263d Port RefreshIndicator to slivers (#8218)
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.
2017-02-16 14:54:34 -08:00
Adam Barth 1773e47b03 Remove a number of old scrolling widgets: (#8212)
- ScrollableList
 - ScrollableLazyList
 - LazyBlock
 - MaterialList

Clients should use ListView instead.
2017-02-15 21:30:51 -08:00
Yegor d6527451a0 Revert "Update /examples/ to new gradle based build flow (#8173)" (#8177)
This reverts commit 8da4778e1d.
2017-02-15 09:44:44 -08:00
Michael Thomsen 8da4778e1d Update /examples/ to new gradle based build flow (#8173)
* 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
2017-02-15 17:13:10 +01:00
Adam Barth 464a8e7cde Formally deprecate Block and ScrollableViewport (#8166)
The replacements are ListView and SingleChildScrollView, respectively.
2017-02-14 21:03:55 -08:00
Adam Barth 14743566ca Migrate Dropdown to ScrollConfiguration2 (#8135)
Also use the word "dropdown" consistently over "drop down".
2017-02-14 14:06:59 -08:00
Michael Thomsen 8857fa080e Revert back IntelliJ .iml file to project root (#8139)
* Move .iml file back to project root directory

* Update .iml location in all examples
2017-02-14 18:15:26 +01:00
Adam Barth fd30f63161 Replace Scrollbar with Scrollbar2 (#8133) 2017-02-14 08:55:16 -08:00
Adam Barth 9df8b7211b Deprecate old list-based scrolling widgets (#8120)
- MaterialList
 - ScrollableList
 - ScrollableLazyList
 - LazyBlock

All of these widgets can be replaced by ListView now.
2017-02-13 17:45:29 -08:00
Adam Barth 547f89d0c0 Remove two clients of MaterialList (#8076)
Clients should use ListView instead.
2017-02-11 23:33:56 -08:00
Ian Hickson 581b929bc7 Actually fix the memory_nav benchmark (#8041) 2017-02-09 15:35:22 -08:00
Chris Bracken 490a897382 Add quotes to example Xcode projects (#8035)
Required to support Flutter SDK paths with spaces.
2017-02-09 15:11:06 -08:00
Ian Hickson 3c065ad20f Also fix the memory_nav test... (#8023) 2017-02-08 21:51:00 -08:00
Ian Hickson 36c63e7024 Align the flutter_gallery test to the middle for better results (#8015) 2017-02-08 19:45:41 -08:00
Ian Hickson 83a4cf269f Port AppBar to Scrollable2 (#7996)
Move the back button and drawer opening logic into the app bar.

Move the tap-status-bar-to-scroll-to-top logic to using
ScrollControllers. Provide a PrimaryScrollController and a `primary`
flag on scroll views.

Make it possible to track when a route becomes or stops being poppable.
2017-02-08 18:16:19 -08:00
Adam Barth 1ec625ffad Remove PageableList (#7997)
All clients have moved to PageView.
2017-02-08 15:50:30 -08:00
Adam Barth 1a066c8404 Use ListView in text_field_demo.dart (#7965)
Now that ensureVisible works, we can use ListView instead of Block in
this demo.
2017-02-08 10:33:49 -08:00
Chris Bracken 708909fc6b Add Thin Binary step to example Xcode projects (#7933) 2017-02-07 12:25:51 -08:00
Adam Barth 31e2a500f7 Use sliver-based scrolling in more places (#7892)
This patch uses sliver-based two more gallery demos, the stocks example,
in the date picker, and in markdown.
2017-02-05 21:39:24 -08:00
Adam Barth 0bcecef5de Convert ShrineHome to use CustomScrollView (#7887)
This patch converts the Shrine home page to using a sliver-based grid.
This required using a CustomScrollView to mix the block at the top with
the grid below.
2017-02-04 16:43:02 -08:00
Adam Barth 652e9c7aa3 Make kPestoRecipes a constant (#7886)
Someone on stack overflow was mutating the list of recipes and getting
confused about why the UI didn't redraw. Making kPestoRecipes a constant
might help avoid that confusion.
2017-02-04 09:33:56 -08:00
Adam Barth ff14f35d6d CustomScrollView (#7881)
Also, use CustomScrollView in Shrine and fix a bug with one-line grids
not painting properly due to their reporiting zero paintExtent.
2017-02-03 22:52:25 -08:00
Ian Hickson 332a23030b Rename and refactor ScrollView hierarchy (#7865)
This prepares us for a CustomScrollView that takes slivers.
2017-02-03 16:05:43 -08:00
Ian Hickson be7be2b8b6 Test service extensions (#7849)
...and fix bugs that the tests uncovered.

WRITE TEST FIND BUG
2017-02-03 13:55:07 -08:00
Chris Bracken acc7d110c0 Subclass FlutterAppDelegate in iOS examples (#7847)
Subclassing FlutterAppDelegate is not required for real-world apps, but
it's what 'flutter create' generates, and applies the default behaviours
that most real-world apps will want.
2017-02-02 18:38:48 -08:00
Ian Hickson 5928d221d4 ShrinkWrap Viewport (#7790) 2017-02-02 14:50:04 -08:00
Ian Hickson 6dcd127188 Delay time dilation so users see the checkbox (#7803)
Fixes https://github.com/flutter/flutter/issues/5066
2017-02-01 22:48:00 -08:00
Adam Barth fe01c71cf4 Switch clients to ScrollGrid (#7752)
The only remaining client of ScrollableGrid (the old version) is Pesto,
which needs AppBar integration.
2017-02-01 11:01:02 -08:00
Adam Barth 695302029f Revert "Revert "Add SliverGrid and ScrollGrid"" (#7780) 2017-02-01 10:18:48 -08:00
Chris Bracken ac145e06c3 Upgrade example projects to Xcode 8.2 (#7771)
This avoids Xcode complaining at us about unused xcconfig files (for the
time being).
2017-01-31 18:19:37 -08:00
Chris Bracken d01c55d289 Eliminate calls to deprecated FlutterInit() (#7770) 2017-01-31 17:39:29 -08:00
Ian Hickson 32784d35f9 Revert "Add SliverGrid and ScrollGrid" (#7769) 2017-01-31 17:34:02 -08:00
Adam Barth 9119969ad2 Add SliverGrid and ScrollGrid (#7745)
This patch adds grid supports to slivers and introduces a ScrollGrid
convenience class for making the common types of scrollable grids.

This patch also deploys ScrollGrid in an example in the Flutter Gallery.
2017-01-30 17:27:51 -08:00
Adam Barth a0dee550c0 Use ScrollView in more places (#7746)
Now that ScrollView supports itemExtent, we can use it in a few more places.
2017-01-30 16:45:51 -08:00
Ian Hickson 62c1b0b217 Fix wording of app bar vs toolbar in gallery (#7720)
Reverts a change from https://github.com/flutter/flutter/pull/3158.
Fixes https://github.com/flutter/flutter/issues/3161
2017-01-28 14:24:19 -08:00
Ian Hickson 571834ea3c Indicate required fields in flutter_gallery demo. (#7717) 2017-01-28 01:48:18 -08:00
Adam Barth 5ecf8786b4 Add ScrollView.padding (#7690)
Uses SliverPadding to implementing paddding in ScrollView. Also, deploy
ScrollView in more places now that it implements padding.

Finally, remove loader_app.dart because it is not referenced.
2017-01-26 23:14:37 -08:00
Chris Bracken 3241f643f0 Migrate sample applications off FlutterAppDelegate (#7677)
Almost all real-world apps will want a custom app delegate, and 'flutter
create' code-gens one by default. This brings the samples in line with
our templates and the most common use case.
2017-01-26 17:37:42 -08:00
Adam Barth a4eca31777 Use ScrollView in examples a manual_tests (#7645)
This patch deploys ScrollView in a number of demos and manual tests.
2017-01-25 21:59:03 -08:00
Adam Barth 559621ca5a Add SingleChildScrollView (#7620)
This widget is a replacement for ScrollableViewport that uses the new
Scrollable2 machinery. The widget is not based on Slivers but does use the new
scroll behavior classes.
2017-01-24 15:16:01 -08:00
Chinmay Garde 2380d854c5 Add a Fuchsia target for the Flutter gallery. (#7619) 2017-01-24 14:03:06 -08:00
Ian Hickson 1bdf351818 Merge pubspec.yaml and flutter.yaml. (#7605) 2017-01-24 11:19:31 -08:00
Adam Barth bf296f715e Test DataTable (#7591)
This patch adds a basic test for the DataTable widget.
2017-01-23 12:40:51 -08:00
Michael Thomsen 24f1b2ee09 Update IntelliJ template for new projects and existing samples (#7501)
* Disable 'Show Excluded' by default

* Move .iml file inside .idea dir

* Remove pub and build excludions as they are automatically set by the Dart plugin

* Exclude .idea folder (new users will edit it through the IJ UI, not the file)

* Move .iml files into .idea dir to be consistent with template changes

* Add workspace.xml from new template to existing samples

* Update current examples to match template changes for excluding folders

* Add missing flutter.yaml to make sure there are no analysis errors

* Add back .pub and build excludeFolder tags per https://github.com/flutter/flutter-intellij/issues/630#issuecomment-272887230

* Remove workspace.xml from example per review feedback
2017-01-23 16:33:18 +01:00
Ian Hickson 63aa1397a3 Increase the strictness of our requiring explicit types (#7585)
...now that we have generic methods, their types need to be specified too.
2017-01-23 01:04:31 -08:00
Ian Hickson 9573bc14e0 Avoid double negatives in text editing APIs (#7577)
hideText -> obscureText
hideDivider -> !showDivider
2017-01-21 23:34:54 -08:00
Ian Hickson 15a7eb3b6c Move to real generic method syntax (#7235) 2017-01-21 20:58:44 -08:00
Adam Barth b2a2ee72f9 Migrate from Input to TextField
We expect TextField to be used much more often than Input. This patch updates
our old example code to use TextField instead.

See #7031
2017-01-19 14:53:08 -08:00
Adam Barth 930b52a3e5 Rename InputFormField to TextField
This patch is the first of a series to rationalize the names of the text-input
related widgets.

See #7031
2017-01-19 14:53:08 -08:00
Adam Barth 32fea4db82 Remove gallery dependency on flutter_markdown (#7534)
The gallery doesn't actually use `package:flutter_markdown`.
2017-01-19 14:47:48 -08:00
Michael Goderbauer 8b1121851e Fix icon color in dark theme of gallery (#7544)
Previously, the icon in the tooltip demo was black on black background
in the dark theme. Now it is white on black background in the dark theme
and black on white background in the light theme.

fixes #7018
2017-01-19 11:20:55 -08:00
Hans Muller 0ce9917fb2 Support for vetoing an attempt to pop the current route (#7488) 2017-01-18 11:04:18 -08:00
Adam Barth ad27fcd3dc Add SimpleDialogOption (#7494)
The demo of the SimpleDialog had some useful code that should really be part of
the framework. This patch extracts it into a SimpleDialogOption widget.

Remove debugCheckHasScaffold because it is unused.

Also, add tests for InkWell, SimpleDialog, and other widgets.
2017-01-13 23:26:05 -08:00
Adam Barth 4955eef8a7 Refactor IconThemeData.fallback (#7490)
Now IconThemeData.fallback is a factory constructor and IconThemeData.of() does
the work of computing the fallback for its clients.

Also, add tests for ImageIcon and ListItems.
2017-01-13 14:44:47 -08:00
Michael Goderbauer fea7496546 Add frameSync mechanism to flutter_driver. (#7471)
With frameSync enabled, flutter_driver actions will only be performed
when there are no pending frames in the app under test. This helps with
reducing flakiness.
2017-01-13 10:26:59 -08:00
Phil Quitslund a8cd212575 Add example IntelliJ metadata (flutter-intellij#607). (#7428)
* Add example IntelliJ metadata (flutter-intellij#607).

Ensures example projects open cleanly out-of-the-box w/ the Flutter Plugin.

See: https://github.com/flutter/flutter-intellij/issues/607.

* Fixed IML files.
2017-01-11 17:37:30 -08:00
Hans Muller b23aed7a86 New Tabs API (#7387) 2017-01-09 14:55:36 -08:00