The lerp method for IconThemeData was not doing anything to prevent exceptions when null arguments are used. This change fixes that and adds a test for it.
* Include caret gaps in position calculation to avoid descender cutoff
* Calculate caret offset instead of exposing it
* Test that textfields scroll vertically by full line height
* Only add offset to end of caret to avoid going above 0.0
* Fix and test horizontal vs. vertical scrolling
* CR: docs and top caret offset logic
* Take max instead of assuming caretRect.top is always a full line down
* Always subtract caretOffset from caretTop since caretRect.top can be negative
Generally, we should always use default-less switches for
platform-specific behaviour so we're forced to make a conscious decision
on each instance of such behaviour any time we add support for a new
platform.
Previously, a disabled floating action button always had zero
elevation, which looks dumb.
This also fixes the issue whereby highlightElevation was not honoured
on floating action buttons.
This also fixes an issue I found during testing whereby setState was
being called during build when onHighlightChanged fired due to
onPressed becoming null while a gesture is ongoing (which triggers an
onTapCancel synchronously during build).
Adds asserts on required constructor parameters to a transition widgets.
This improves debuggability for those who aren't developing with live
analysis. e.g. when `turns` is not specified in a RotationTransition
constructor:
package:flutter/src/widgets/transitions.dart: Failed assertion: line 43 pos 15: 'listenable != null': is not true.
becomes:
package:flutter/src/widgets/transitions.dart': Failed assertion: line 259 pos 15: 'turns != null': is not true.
copySharedFlutterAssetsTask copies the `flutter_shared` folder assets to android's `src/main` folder of Flutter project, so that folder is bundled on the generated AAR
* Fix `flutter test`e xpression eval tests
We weren't passing `beforeStart` through so the breakpoints were never being set, which means the evaluations were happening while the code was running.
* Ensure we wait for breakpoints before trying to evaluate
* Allow a widget to be specified for the textfield count, and allow no count at all
* Test all possible states for counter and counterText
* Docs for counter
* counter is a function that generates a widget
* Tests use counter as function
* Fix analyze error in docs
* InputDecoration has counter widget, TextField has buildCounter function
* InputDecorator tests expect counter to be widget again and include
buildCounter
* counter widget example that might actually fit
* Clarify accessiblity concerns in docs
* Include isFocused param for accessibility
* Fix analyze error
* Improve docs per code review
* Rearrange getEffectiveDecoration a bit for clarity
* Fix analyze error about hashValues params
* Clean up docs and redundant code per code review
* Code review doc improvement
* Automatically wrap buildCounter widget in a Semantics widget for accessibility
Profile builds need access to sockets in order to launch the Dart
observatory server.
This permission used to be enabled by default in all build types,
but was moved to a build type specific manifest in
88b853f7eb
This adds some functions to the interface for RawKeyEventData and all subclasses that allow the recipient of an event to determine which modifier keys are currently being pressed without needing to know the specific modifier bitmasks for the platform.
Also adds constants for the modifier bitmasks for each platform, for completeness (and because I needed them anyhow to implement the above).
Added tests for the RawKeyEventData subclasses, and modified the raw_keyboard manual test app to show modifier keys being pressed. I also separated the different platform-specific subclasses into separate files.
Fixes#26155.
Usages of ParagraphConstraints (from dart:ui) whose constructor could be
const as of flutter/engine#7346 are currently marked //
ignore:prefer_const_constructors in the framework until all
Google-internal embedders have been updated to an engine version that
includes the above change. These were initially updated in engine roll
flutter/flutter#26252, but broke internal embedders.
We should re-enable use of the const constructor in those cases once
internal embedders are updated.
See: https://github.com/flutter/flutter/issues/26390
* Added the superellipse (a.k.a. squircle) shape to flutter, which is needed to recreate some cupertino components, e.g. buttons in pixel-perfect detail (issue #13914).
* [WIP] BAB theme
* [WIP] BAB theme
* Update goldens
* Extract helper function in tests
* Update Goldens version
* Add tests
* [WIP] Hans first round comments
* Added test
* Added docs
* Hans second round comments
* Fixed analyzer error
* Hans third round comments
* ambient
* Change [BottomAppBarTheme.of] to static
* Final doc change
* Add a validator to ensure NO_PROXY is set correctly if HTTP_PROXY is set
Fixes#24854.
* Fix typo
* Dummy edit to try and force update of PR desc on Cirrus
Before this change, rolling back a patch relied on deleting the patch
file from the server completely. This PR implements a more reliable
approach where developer needs to create a physical rollback patch file.
This is more robust to mistakenly taking down a patch from user devices.
When setting the Fuchsia logging function, it should happen before any
initialization code, as init can still cause warning/error/info messages
to get printed to logs. Since the default stderr/stdout fd's aren't
correct, this can cause a program to crash for unclear reasons.
* the onStart callback will report the location of the pointer where it wins the gesture arena by default instead of the pointer down location. Fixes all tests related to changing this default value.
* Add Robert Penner’s easing functions
These easing functions are the most popular functions in use on the web
and other platforms. Including them in Flutter will encourage users to
create more engaging and attractive animations.
* Adds start behavior option to the drag gesture recognizer and makes it the default option when a drag gesture recognizer is created. Also fixes all the tests to work correctly with the new default behavior.
* Ensure all errors thrown by image providers can be caught by developers.
Add an `onError` parameter to the ImageCache.putIfAbsent method.
In the event that an error is thrown when resolving an image, catch if
this parameter is provided. Use the onError parameter to ensure that all
errors thrown are forwarded to the ImageStream error channel instead of
directly into the void.
flutter/engine#7307 changes the engine side of embedded UIView to only
reject gestures when the framework sends a `rejectGesture` message, so
that gesture resolution can done after a touch sequence has ended (see
PR description for flutter/engine#7307 for more details).
This change makes the framework send a `rejectGesture` message to the
engine when a UiKitView rejects a gesture.
I'm planning to land this PR before the engine side change, so right now
it swallows the exception thrown if there is no engine implementation
for `rejectGesture` (which keeps us with the current behavior). After
this change lands I'll land the engine PR, and then clean up the part
that swallows the exception.
* Renamed --save-compilation-trace to flutter run --train.
* Renamed --precompile=<file> to --compilation-trace-file=<file>.
* In dynamic mode, made JIT snapshot the default, instead of kernel file.
* adding support for android app bundle.
* removing the debug statement.
* fixing formatting and code review changes.
* Revert "fixing formatting and code review changes."
This reverts commit 2041d459f3.
* Fixing code formatting issues.
* updating review comments fixing comments and spacing.
* changing and to & to rerun the CI and tests.
* updating the comment to re-run the test
updating the comment to re-run the test
* fixing the formatting.
* updating comments to re-trigger build
updating comments to re-trigger build
* Remove many timeouts.
These are essentially self-inflicted race conditions. Instead of timeouts we're going to try a more verbose logging mechanism that points out when things are taking a long time.
* Get the attach tests to pass.
* Apply review comments from Todd
* More review comment fixes
* Put back the extended timeouts here now that I know why we have them...
* Fix bug in calculation of downstream text distance when aligned: right
* After having affinity explained to me, match getOffset and tests to
expected behavior
* Clean up test formatting and fix analyze errors
* Improve test comments and reorganize a bit
* Specify logical pixels
* InputDecorator param for alignment of label
* Put baseline/center code in the right place where label is layed out
* Fix existing test
* Test top label positioning
* Rename to alignLabelWithHint, and make it a bool
* Test for TextField with and without alignLabelWithHint set
* alignLabelWithHint in theme as well
* debugFillProperties addition and test
* Small style fixes for review
* Fix analyze const error
* Revert "Add imports section to sample code templates, and more docs. (#25184)"
This reverts commit 95b0124785.
* Revert "Use stderr instead of stdout to contain errors in flutter attach test (#25305)"
This reverts commit 2b819dd257.
* Revert "Allow detection of taps on TabBar (#23919)"
This reverts commit 01694ab62d.
* Revert "a549981da Roll src/third_party/skia a69b10312977..5eb29448dfbd (1 commits) (flutter/engine#7211) (#25333)"
This reverts commit a37099f3b1.
* Revert "Revert "obscureText and enableInteractiveSelection defaults (#24527)" (#25335)"
This reverts commit c5457068df.
* Password fields are no longer selectable nor copiable
* Fall back to ANDROID_SDK_ROOT if ANDROID_HOME is not set
And update descriptions to use the non-deprecated ANDROID_SDK_ROOT.
Fixes#15114.
* Remove trailing whitespace
* Update dev/devicelab/lib/framework/adb.dart
Co-Authored-By: DanTup <danny@tuppeny.com>
* Reformat long line
* Add ipv6 and observatory port support to the attach command.
* Remove whitespace
* Explain why a name change is useful here
* Refactor common flags out into the parent
* Add an additional test case for when observatory port is provided but debug port is not
* Remove whitespace
* Fix flag validation
* obscureText true defaults to disabling selection
* Tests and comments for selectable text field
* Improve selection docs
* Refactor so that all enableInteractiveSelection params are null by default, delegate to selectionEnabled
* Fix selection param macros
* Merge TextField style with global style so that style changes don't override unspecified fields
* Test that a style param is merged with the theme
* Test a few more style properties
* Analysis fix
* Revert "e5195ee47 Remove unnecessary includes of Ganesh headers (flutter/engine#7189) (#25282)"
This reverts commit f198d66332.
* Revert "Validate style in TextField (#24587)"
This reverts commit 9a8e2f0c4b.
* Revert "Allow snippets tool to be run from arbitrary CWDs (#25243)"
This reverts commit 4a110b6227.
* Revert "Make doctor output consistent between VS Code/IntelliJ/Android Studio when plugins are missing (#25269)"
This reverts commit e29b023a6b.
* Revert "Add ipv6 and observatory port support to the attach command. (#24537)"
This reverts commit 9150b3f031.
* Update VS Code validator to match Android Studio
- Now shows a tick (instead of partial) if installed
- Now shows a cross (instead of dot) if extension is not installed
Fixes#22931.
This modifies our flutter_tools crash reports to include the error
message. This error message may contain personally identifying
information (PII), such as a file system path on the developer's
local machine that may contain user names, project code names,
etc. To disable crash reporting, the developer can run the
following command:
flutter config --no-analytics
For more information on what gets reported during crashes of the
flutter tool, see:
https://github.com/flutter/flutter/wiki/Flutter-CLI-crash-reporting
We hypothesize that many first-time users creating a new project will look at the README.md as a starting point for "what next". As we've updated our documentation particularly for new users, having better links to our codelabs and cookbooks will help them be productive.
* SwitchListTile.adaptive for wrapping an adaptive Switch
* Test SwitchListTile.adaptive same as Switch.adaptive
* Remove TODO
* Comment and switch statement cleanup
* Handle a missing ListView separator as an error
* Handle missing item, and errors in itemBuilder and separatorBuilder
* CR fixes and move error handling into sliver.dart to handle all ListView constructors
* Only show an error for null separatorBuilder value in debug mode
* Revert "Add dashing config file for generating docset from flutter docs (#24374)"
This reverts commit ec8ca8606c.
* Revert "Update driver script to execute test through test_core (#24168)"
This reverts commit 6c62cf337f.
* Added support for passing in velocity and offset into Draggable.onDragCompleted.
* Fixed documentation of DragCompletedCallback.
* Spun off previous onDragCompleted breaking changes into new callback called Draggable.onDragEnd.
* Revert "Fixed documentation of DragCompletedCallback."
This reverts commit 069051f5be.
* Revert "Added support for passing in velocity and offset into Draggable.onDragCompleted."
This reverts commit 7ef744aa56.
* DraggableDetails constructor is now declared first as per Flutter code style.
* Draggable.onDragEnd will only call back if its widget is currently mounted to the tree.
* Moved "});" in DraggableDetails constructor to new line, vertically aligned with the constructor name, as per Flutter code style.
* Added space between if statement in drag_target.dart.
* widget.onDragEnd call is now formated as per flutter code style.
* Added more details to DraggableDetails documentation.
* Added brackets to if statement block as per Flutter code style.
* Fixed minor nits in DraggableDetails documentation.
* Made DraggableDetails constructor public. Also added documentation for its constructor.
* Fix multi-step build handling process.
Stop listening for new step updates after 'all done.' log message. Make sure that we don't delete file too soon, until listener had a chance to process the 'all done' message.
Fixes https://github.com/flutter/flutter/issues/18750
* Emit 'all output' explicitly when build process is done.