This is not a grand refactor yet, it's just cleaning up what we have
already, so that people who keep using this API (e.g. dialogs) have
something coherent to deal with.
The major changes are that Navigator and NavigatorState have the same
API now, that most of the examples use `<void>` instead of `<Null>`,
that the navigator observer can see replaces, and that the `settings`
is moved from ModalRoute to Route. I also cleaned up some of the API
documentation.
* use HttpOverrides and dart:io HttpClient in flutter
* add missing package:http dependency
* update flutter packages and remove comment about createHttpClient from flutter_test
* move byte loading logic to common class, move string parsing logic to base class
* addAll doesn't work for a Uint8List
* use bytes.setRange
* undo addition to hello_world
* add newline to end of binding.dart
* and a newline for hello world
* refactor to function and add tests
* address comments on unknown length case
* alignment
* sort alaphabetically
* rename convertResponse to consolidateClientHttpClientResponseBytes. Add header
* fix alignment in test
* Gallery scaffolding
* Started RenderSliver
* demo and initial hookup
* Cleaned up demo more and scaffolding basic sliver->widget communication structure.
* works
* states and default indicator building works
* start adding docs
* added an alignment setting optimized the sliver relayout mechanism
* tested a default bottom aligned sized indicator
* Added a bunch of tests
* more fixes and more tests
* Finished the tests
* Add docs
* Add more doc diffing wrt material pull to refresh
* Mention nav bar synergy
* add more asserts
* review 1
* Fix mockito 2 / dart 2 / strong typed tests
* review
* Remove the vscode config
* review
* traverse dependencies and dev dependencies separately
* separate dev and reg deps
* update pubspecs
* add checksum string and update transitive dep string. Add additional verify command to check checksum
* cleanup comments
* add missing space, quote, run verify-onlu from bot script
* rerun tool with fixed string
* ensure correct working directory and bump versions
* flutter not flutterRoot
This adds a slider demo with a custom theme to the gallery.
In the process of adding this, I decided to add a text theme to the SliderThemeData, since it's a pain to change the text style on the value indicator otherwise.
* Add support to move the fab between positions.
* Motion demo for the FAB works between center and end floating.
* Add a Material curve to the offset animation.
* Move the fab position into an object
* Updates to docs
* Updates to docs
* Fix a lint on the bottom sheet type
* Add a ScaffoldGeometry class
* Improve the documentation
* Improve the documentation
* Add a fab motion animator
* Add position and scale animations
* FAB entrance and motion animations work
* Get started on FAB motion
* Make fab animation work properly.
* Change the fab animator to be stored in the state of the scaffold.
* Add a layout test
* Fix spacing being off
* Fix the entrance/exit animation test.
* Add a textDirection to the layout delegate.
* Fix const constructor lint checks
* Add toStrings for the fab positioner/animator
* Add a toString for CurveTween
* Change the fab motion demo icon to a simple add icon.
* Add tests and a custom fab positioner to the demo.
* Do not start the fab's motion animation when the fab is null.
* Adjust the code to pass the new tests.
* Rename for in response to Hans' comment.
* Revert the tabs fab demo
* Use timeDilation, and clean up the animation code a little.
* Clean up the prelayout geometry docs and ctr order
* Cleanup fab transition widget code
* Clean up comments on Scaffold, add cross-references between the two geometries
* Explain the fab motion animation scheduling better
* Add a const to the fab motion demo
* Make the fab animation never jank by keeping track of where to move the fab to in the future.
* Add a default fab positioner constant
* Add space after comma in the demo
* Add boilerplate dartdoc to all const constructors
* Comment improvement
* Rename 'fabSize' to 'floatingActionButtonSize'
* Rename 'fabSize' to 'floatingActionButtonSize'
* Rename 'fabSize' to 'floatingActionButtonSize'
* Clean up the prelayout geometry object's dartdoc
* Clean up the prelayout geometry object's dartdoc
* Remove extraneous comment
* Change possessive uses of Scaffold's to use dartdoc-compatible [Scaffold]'s
* Rename the horizontalFabPadding to an expansion
* Clean up controller cleanup and setState usage
* Animate instead of lerp
* Make the fab position animation use offsets instead of animations
* Streamline the fab motion demo
* Set up the animator to start from a reasonable place when interrupting animations.
* Doc cleanup on the new animation interruption
* Expand some uses of fab and clean up constants
* Expand remaining public uses of fab to floating action button
* Expand remaining public uses of fab to floating action button
* Expand on the documentation for the fab positioner and animator
* Refactor animations to broadcast the position properly.
* Add the ability to turn on and off the fab to the motion demo.
* Remove unused code
* Change the fab animator to animate even when the fab is exitting.
* Remove extra positioner.
* Apps -> Applications in docs
* Explain the scale animation.
* Name the child parameter in the animated builder
* RTL before LTR
* Wrap the AppBar in the example code
* const the fab motion demo name
* Start a test against animation jumps
* Test for jumps in the fab motion animation
* Dont initialize values to null
* Use constants, fix spacing from some of Hans' comments
* Clarify the relationship between fab positioners and prelayout geometries
* Explain the fab animmator a bit better
* Explain the animation progress in the fab animation
* Explain the animation restart better
* Explain the animation restart better
* Explain the prelayout geometry better
* Explain that height is a vertical distance.
* Explain the horizontal fab padding
* Update the scaffold size description to explain what happens when a wild keyboard appears
* Remove print statements
* Update the scaffold geometry with information about it being available at paint time.
* In one step of a transition
* Explain how the top-start fab positioner works
* Explain how the top-start fab positioner works
* Refactor the scaffold layout to just pass a padding instead of a bottom, top, start and end.
* Refactor the scaffold layout to just pass a padding instead of a bottom, top, start and end.
* Action buttons with with custom positioners.
* Add a rotation animation example.
* Use a swap animation to show swapping between two different animations.
* Use a swap animation to show swapping between two different animations.
* Add an example for the size animations.
* 2018 copyright
* Extra empty line
* Return new Scaffold
* Extra blank line fix
* All its contents have been laid out
* Position the fab
* Explain what the scaffold geometry is for.
* Move asserts to different lines
* The scaffoldsize will not
* Initial rename of FabPositioners to FloatingActionButtonLocation
* Rename comments in example to refer to location instead of positioner.
* Rename fabpositioner to location in tests and in the scaffold field
* Finish removing references to positioner in scaffold code.
* Split the fab location and animation out into a separate file.
* Make things more private
* Import foundation instead of meta
* Const curve instead of final.
* replace child parameter with builder on showDialog
* change builder parameter to WidgetBuilder
* mark child as deprecated and expand documentation to cover this and how builder should be used
* tidy comments and address some feedback
* phrasing
* move space to prev line and add //ignore comments for deprecated member use
* address comments and fix it's its
* update code samples
* adds semicolon to code snippets
* Update dependencies with forced upgrade.
Now that https://github.com/flutter/flutter/issues/15261 is fixed, do the update with upgrade.
* Update test package use following upgrade
* Replace addOption(allowMultiple) with addMultiOption
This implements an update to the look of the Slider widget.
Specifically, it does the following:
* Adds the ability to customize the colors of all components of the slider
* Adds the ability to customize the shape of the slider thumb and value indicator
* Adds the ability to show the value indicator on continuous sliders
* Updates the default value indicator to be a "paddle" shape with new animations.
* Changes the tick marks to be visible all the time on discrete sliders
* Fixes a memory leak of an animation controller.
* Removes "thumbOpenAtMin" flag, which is no longer needed, and can be emulated by the
custom thumb shape support. It was not widely used.
* Adds tests for all of the new features.
* If example code is not found, render a message instead of an endless spinner
* Trim codeTags to avoid lookup issues with windows carriage returns
* Trim \r on Windows off the end of code blocks so they're consistently \n
* Add a test to ensure sample code parses if built on Windows
* Add a comment about why we trimRight()
Fixes#14820.
30+4 has made some changes to the remoting protocol that are incompatbile
with a test harness running 30+3 (e.g. adding a type='initial' field to the
first message)
* Use engine-built dart sdk
* Download dart-sdk from engine
* Move up deps to fix dart sdk constraint problem
* Update update_dart_sdk.ps1 for Windows
* Fix tests so they pass analysis
* More types for tests
* Roll engine
* Update dart sdk stamp location in flutter.bat
* Add newline
There were some problems I introduced with the last PR for this. It passed the test, but failed in practice.
This adds tests for those failure cases, adds a "--help" and fixes the test so that it doesn't try and actually download MinGit as part of the Windows test.
I added package:platform as a dependency, so I did a force upgrade on the packages.
Also, re-enabling 'create package' in the cache warming code, now that #14448 is fixed.
Applies horizontal and bottom safe area insets to the Shrine demo in the
Gallery. Top insets are not applied due to the presence of the
omnipresent sliver app bar. Specifically, this ensures that the grid
cards are inset inside the iPhone X notch in horizontal mode, and that
the bottom of the grid is positioned above the iOS home indicator.
* iOS works
* Works on Android
* Take in commit number in iOS also. Get rid of image upload for Android. It's just a waste of bandwidth
* Tweak to fix on Travis
* first round fastlane working on Android
* clean up and start ios
* Partial iOS
* Got a fastfile that works on iOS
* Finalize Android push instructions
* Finalize instructions for iOS
* Extra cleanup and optipng
* Disable readme autogen and add a default readme
* Unpin package:test and upgrade packages
* Update packages/flutter/test/foundation/stack_trace_test.dart
* Also add packages/flutter_tools/test/data/asset_test/font/.dartignore to ensure that update-packages --force-upgrade does not crash.
* controller, position and test
* Make controllers swappable
* WIP
* Create a ListWheelScrollPhysics
* Created picker and gallery demo and testing now
* Works. Ready to document and test.
* Document and add tests. Make the scroll controller more generic.
* minor cleanup
* review
* review
* fix tests
* stop using TransformLayers for now
* Revert "Reverting package changes until I can figure out how to fix Windows. (#14007)"
This reverts commit 6fda8ee821.
* Make prepare_package run on Windows
* Revert "Fixed output validation. (#14005)"
This reverts commit d84398db72.
* Revert "Update package prep script to do async process execution and emit output as it happens. (#13918)"
This reverts commit b7169c1d95.
- Switches to async process execution, which now shows output as it happens instead of in chunks when the process completes
- Now uses ProcessManager so that it may be mocked for the test.
- Adds in the download and install of mingit on Windows.
- Updated package dependencies because of added dependency on process package.
This simply updates the package dependencies by running flutter update-packages --force-upgrade.
I'm doing this with no other changes, because the last time I tried that, redness occurred. I want to isolate the problem to a "clean" update of the packages.
It looks like the plugins device_info, connectivity, and url_launcher haven't yet had their gradle configurations updated, so they fail when trying to build with the new gradle. I did not upgrade for those three packages only (in flutter_gallery) until we are ready to fix them (fixing them for master will break them for alpha users, so we need to do an alpha roll to do that).
Fixes#13743Fixes#12379
Follow-up to #13745
Also adds an option to hide gestures introduced by `InkWell` and `InkResponse` from the semantics tree (see also `GestureDetector.excludeFromSemantics`).
Applies horizontal safe area insets to the animation demo in the
Gallery. Specifically, this ensures the back button is positioned
consistently with iOS expectations and that that main image card in the
detail view respects safe area insets.
This is to support the iPhone X sensor housing notch and other similarly
creative display features when in landscape orientation.
Applies horizontal safe area insets to the video demo in the Gallery.
This is to support the iPhone X sensor housing notch and other similarly
creative display features when in landscape orientation.
This adds our self-compiled copy of the MinGit executable (built from the flutter/git repo) to the archive when building an archive for Windows.
I also tweaked the internal API for prepare_package.dart so that there's a single entry point to build an archive.
Prevent header from thinking it can wrap and then overflowing.
Fix default footer string which lost its colon (localized values are fine).
Make the "rows per page" drop-down include at least one value even when the table lacks many items. (Previously it would assert if your table was too short.)
Make the footer scrollable.
Fix some todos and improve some debug output.
Tests for much of the above.
Applies horizontal safe area insets to the Pesto demo in the Gallery.
This is to support the iPhone X sensor housing notch and other similarly
creative display features when in landscape orientation.
Applies horizontal safe area insets to the Contacts demo in the Gallery.
This is to support the iPhone X sensor housing notch and other similarly
creative display features when in landscape orientation.
Applies media padding (e.g. iPhone X safe area insets) to the Material Design demos in the Gallery.
Covers the following demos:
* Buttons (via the TabbedComponentDemoScaffold change)
* Cards
* Expansion panels
* Grid list
* Icons
* Images (via the TabbedComponentDemoScaffold change)
* Page Selector
* Progress Indicator
* Scrollable tabs
* Selection controls (via the TabbedComponentDemoScaffold change)
* Snack bar
* Tabs
* Text fields
* Tooltips
Fixes#13594
Adds safe areas around:
1. The body of the colour swatch view (tab 1)
2. The chat header (tab 2)
3. The chat bubbles (tab 2)
4. The 'Sign In' launcher button (tab 3)
Rather than use a Center widget, center the title using AppBar's
centerTitle property. This ensures the title is horizontally centred
with respect to the screen rather than centred in the space between the
leading and trailing app bar widgets, which are asymmetrical in Shrine.
Applies media padding (e.g. iOS safe area insets) around the list tile
children inside the InkWell.
Also adds safe area around gallery section titles for consistency with
surrounding list tiles.
* Let translucent Cupertino bars have its scaffold children automatically pad their heights (#13194)
* Let lists automatically add sliver padding from media query. Translucent nav and tab bars leave behind media query paddings in scaffolds.
* tests
* const lint
* Rename base abstract class to generalized ObstructingPreferredSizeWidget
* review
* More docs and comments from #13317
Extracts Tab2ConversationRow class that consolidates widget tree for a
chat message in the Cupertino navagation chat demo. This refactoring
simplifies adding SafeArea support to handle iOS 11 safe areas in a
followup patch.
* Let lists automatically add sliver padding from media query. Translucent nav and tab bars leave behind media query paddings in scaffolds.
* tests
* const lint
* Rename base abstract class to generalized ObstructingPreferredSizeWidget
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.
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.
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).
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.
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.
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.
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.
* 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
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.
* 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
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/
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.
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.
* 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
* 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.
* 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
* 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
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.
* 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
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.
* 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.