Commit graph

540 commits

Author SHA1 Message Date
amirh a8f565eb43
Icons demo cleanup - set color in the icon theme, remove unused iconOpacity (#13255) 2017-11-29 16:02:39 -08:00
amirh 4f240a4dda
Fix 'Animated images' demo name in Gallery's test. (#13240)
In https://github.com/flutter/flutter/pull/13141 I updated the demo name
from 'Animated Images' to 'Animated images' before submitted, but did
not update the name in the smoketest and transitions_perf test.
2017-11-28 22:00:17 -08:00
amirh 47b5c37f1a
Add Images demo to the gallery app. (#13141) 2017-11-28 18:17:11 -08:00
Greg Spencer 909406ba25
Consolidating .gitignore files. (#13002)
This consolidates all of the non-template .gitignore rules into the top level .gitignore, to ignore common things more broadly, with less maintenance needed for the .gitignore files. Does not touch the templates, so that they still produce needed .gitignores as part of flutter create.
2017-11-28 17:06:57 -08:00
xster 7ad69b38b0
Update xcode project template to 9.1 (#13193) 2017-11-28 15:49:00 -08:00
Devon Carew bdbe53be01
remove unused constants (#13199) 2017-11-24 19:13:18 -08:00
Ian Hickson 2bda59a1fe
TabBar RTL (#13164) 2017-11-22 18:53:42 -08:00
Ian Hickson 2db0c25f82
Dismissible RTL (#13137)
Fix the dismissible demo in the gallery (make it actuall update when you pick something from its menu; give it a better affordance for resetting once you've dismissed everything).

Improve some docs.

Fix various flinging bugs with dismissible. Add tests for those cases.

Add a feature to flutter_test to support a drag-then-fling gesture (used by the flinging tests).
2017-11-22 15:20:15 -08:00
Greg Spencer 0259be90b8
Fix spelling errors in all the dartdocs. (#13061)
I got tired of drive-by spelling fixes, so I figured I'd just take care of them all at once.

This only corrects errors in the dartdocs, not regular comments, and I skipped any sample code in the dartdocs. It doesn't touch any identifiers in the dartdocs either. No code changes, just comments.
2017-11-17 10:05:21 -08:00
Ian Hickson 8b15b537b3
DropdownButton RTL (#13040)
This fixes DropdownButtons to align their popups correctly in RTL as well.

Also while I was there I fixed the issue with text scale factor in the gallery.
2017-11-16 17:57:50 -08:00
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