This PR aims at several things:
1. Use pub_semver to check a version in pubspec.yaml meets the requirements specified in https://semver.org/.
2. Don't limit build-number/build-name as a fixed format. Instead, validate it according to the target(ios/android).
3. Make sure that build-number/build-name are always validated no matter it's specified by the `flutter command` or version in pubspec.yaml.
Fixes#27589
* Make plugin path search logic use version check as a fallback.
* In JetBrainsToolbox, Info.plist would be just some kind of wrapper, we need a double check before get the real one.
* Use Regex to get content instead of `default command` to avoid error output as there could be no JetBrainsToolboxApp key/value for a normal Info.plist(Android Studio.)
This makes Android raw key event handling use the "character" data coming from the engine properly, and gets rid of the "toLowerCase" hack that I was using to normalize logical key events, in favor of using the new "plainCodePoint" that has the unmodified code point (the code point as if no modifier keys were pressed).
* Update stepper.dart
Added 'physics' prop which allows the developer to assign the Stepper's scroll view's 'ScrollPhysics' which can solve with unwanted scrolling behaviour if the parent is also a scroll view. Defaults to 'AlwaysScrollableScrollPhysics' if null.
* Update stepper.dart
Removed unnecessary import and defaulting to 'AlwaysScrollableScrollPhysics' if physics prop is null.
* Update stepper.dart
Ran through format to remove unwanted whitespace which Analysis isn't happy about.
* Update stepper.dart
Tried reformatting again.
* Update stepper.dart
Tried reformatting again.
* Update stepper.dart
Formatting again why do you hate me github editor.
* Update stepper.dart
* Update stepper.dart
if this format doesn't work i'll cry
* Update stepper_test.dart
Added Stepper scroll tests. One that fails to find Text after Stepper if physics left as null and one that succeeds if physics set to `ClampingScrollPhysics()`
* Update stepper_test.dart
Added const constructors
* Update stepper_test.dart
trying to get rid of whitespace again
* Update stepper_test.dart
* Update stepper_test.dart
why whitespace why
* Update stepper_test.dart
* Update stepper_test.dart
* Update stepper_test.dart
* Update stepper_test.dart
Swapped to `findsNothing` because I'm an idiot.
* Update stepper_test.dart
* Update stepper.dart
Currently, in pubspec.yaml, semver.org is referred to for more about versioning.
However, the versionCode/versionName could differ on different platforms (iOS, Android, Dart).
This adds more clear and complete information that could help users to understand it better.
See: #27251
* Fix for #26261. Changes CupertinoTextField's cursorColor to read from CupertinoTheme instead of prior default of activeBlue. CursorColor will still default to activeBlue for light theme and activeOrange for dark theme if a primary color has not been specified for the CupertinoTheme.
* Reverted unnecessary changes in XCode file.
* Updated text_field.dart per suggestions from @gspencergoog
* Updated comments for cursorColor to reflect appropriate hyperlinks per @Hixie
* Simplified cursorColor assignment per @xster
* Added test in cupertino/text_field_test.dart to check for correct cursorColor based on CupertinoTheme per @Hixie & @xster.
* Provide a simmplified API for skipping over slider thumb, overlay, and tick mark painting
* doc fixes
* comments
* comments
* comments
* comments
* comments
* analyzer
* comments
This change was dropped out of #26227 because it seems to inexplicably result in timeouts talking to the VM service on Windows Cirrus. After 1 month of periodically debugging it, it just started passing 🤷♂️.
In Dart 2, it is a compile-time error if a superinitializer
appears in an initializer list at any other position than at the end so this
rule is made redundant by the Dart analyzer's basic checks and is no longer
necessary.
This adds support for logical and physical key information inside of RawKeyEvent. This allows developers to differentiate keys in a platform-agnostic way. They are able to tell the physical location of a key (PhysicalKeyboardKey) and a logical meaning of the key (LogicalKeyboardKey), as well as get notified of the character generated by the keypress. All of which is useful for handling keyboard shortcuts.
This PR builds on the previous PR (#27620) which generated the key code mappings and definitions.
Try to detect Gradle error messages that hint at AndroidX problems, and
warn in the logs about the potential problem and point to documentation
on how to fix the issue.
Unfortunately the Gradle errors based on this root issue are varied and
project dependent. It's probably better to still leave the message
intact in case the problem is unrelated.
Also filters out the plugin warning message pending in
flutter/plugins#1138. It's still valuable to add that for people on
previous versions of Flutter, but this link should override that message
for anyone on an up to date version of Flutter.
#27106
This adds a keycode generator that incorporates input from the Chromium and Android source trees, as well as some local tables, to generate static constants for the LogicalKeyboardKey and PhysicalKeyboardKey classes, as well as mappings from each of the platforms we support so far (currently only Android and Fuchsia).
This code generator parses the input files, generates an intermediate data structure (`key_data.json`) that is checked in, and then generates the Dart sources for these classes and some static maps that will also be checked in (but are not included in this PR).
The idea is that these codes don't change often, and so we don't need to generate them on every build, but we would like to be able to update them easily in the future if new data becomes available. If the existing data disappears or becomes unusable, we can maintain the checked-in data structure by hand if necessary, and still be able to generate the code.
This PR only contains the code generator, not the classes themselves. In another follow-on PR, I'll run the generator and check in the output of the generator.
For `fuchsia_compat.dart` Instead of using `runSync`, use `run` to avoid
deadlock when attempting to access specific resources like the Hub in Fuchsia.
The specific example is that in Fuchsia, the `find` command is
attempting to explore `out` which hasn't yet been serviced, as `find` is
blocking on it, causing a deadlock.
Before this, we had several places where an isReleaseMode was defined, all with the same definition. This just makes it more broadly visible to allow our users to use it, as well as creating debug and profile versions, and adding a device lab test for it.
Since this is a const value, this makes it possible for a developer to easily mark blocks that can be removed at AOT compile time.
* Bugfix: Add platformBrightness to TestWindow.
* Manual engine roll:
cc27cafb8 Implemented Dark Mode for Android (#25525) ([flutter/engine#7488](https://github.com/flutter/engine/pull/7488))
9c05cbcfb Roll src/third_party/dart b53dceadaa..5823be65af (5 commits) 5823be65af [vm/compiler] Continued graph checker development (reland) 8231cdb7a3 [gardening] Update status for issue 35854 db7f848632 [vm] Remove dead BigInt code. 35ab1755f4 Support more type propagation for code-as-ui features 569ee07f91 [vm] Cleanup class finalization checks
ec5e6f6ef Ensure dart2js and kernel worker snapshots are copied out of gen dir ([flutter/engine#7692](https://github.com/flutter/engine/pull/7692))
8b5fa65c4 Roll src/third_party/skia 50ea3c06b80f..2d35a1c87553 (6 commits) ([flutter/engine#7693](https://github.com/flutter/engine/pull/7693))
This PR does two things:
- It allows BottomAppBar to have a custom shape even when it doesn't
have a notch.
- It adds AutomaticNotchedShape, an adapter from ShapeBorder to
NotchedShape.
* Crash when a TabBar is put in a BottomAppBar.
* Tabs bugs (e.g. crash on transparent material)
- Tabs would crash when placed on transparent Materials
- Tabs would fail to render the child if an icon was specified
* Don't send accept/reject if compilation never started.
Ensure that we wait for reject's response since that is async operation.
Fixes https://github.com/flutter/flutter/issues/27120.
* Fix analysis errors
* Rename flag. Ensure we raise it on first compilation too.
* Remove stray extra space
* Add ImageStreamCompleter.hasListeners (and cleanup)
This is mostly just some cleanup of stuff I ran into, but it makes
`hasListeners` protected on `ImageStreamCompleter`, because otherwise
there's no way to track if listeners are registered or not.
* Address review comments
In certain situations, a developer may require the border of a Material to be painted behind its child. For example a Card widget that has a full width image across the top half. In that scenario, the image should ideally be painted above the border with regards to z-position.
This change exposes a flag on Material widget to achieve this behavior. Additionally, the same flag is exposed on Card widget to allow the Card widget to pass this down to its Material.
I added a couple golden tests to verify this new behavior. Goldens are here:
46a3d26acb
This implements support for hovering mouse pointers, so that mice connected to Android devices, and ChromeOS devices running Android apps will work properly.
It teaches flutter_test about hover events, which required changing how they are created and used.
Also modifies AnnotatedRegion to allow a region that can be located someplace other than just the origin.
Along with tests for all of the above.
Fixes#5504
This status shows for the duration of the run, not just while starting. It looks kinda weird in the editors to show a progress bar for "Starting Xcode build" and then removing it once it completes.
It appears that the encoding Apple is using to ensure their syslog
conforms with the syslog requirement for seven-bit ASCII encoding (see:
RFC 5424) is `vis`.
Details: https://www.freebsd.org/cgi/man.cgi?query=vis&sektion=3
* Revert "Make UriMapper and StdoutHandler public and add test cases (#26932)"
This reverts commit 6cf554b0c4.
* Revert "Update packages (#27046)"
This reverts commit 496c57386b.
* Revert "roll engine for TODAY bug (#27049)"
This reverts commit 5ae6346f1d.
* Revert "Warn when building on master channel (#25007)"
This reverts commit dd65a54628.
* Revert "Add experimentalBuildEnabled flag and initial shim for build_runner (#26989)"
This reverts commit 1237ee8f63.
* Revert "Experimental flags for hot reloads, fixed (#27043)"
This reverts commit 2c05d08f0c.
This change creates an `AppBarTheme` to be used with `AppBar` widgets. This allows for users to theme their AppBars separately from their overall Theme if they choose.
* move flutter_assets to App.framework
* Roll engine to 05fee4eeee0ff6b219b1fcc394371e5f6963cc46
05fee4eee Update default flutter_assets path for iOS embedding (flutter/engine#7518)
02205db01 Roll src/third_party/skia 5d052dac3ac1..02738a86e5fd (4 commits) (flutter/engine#7541)
af907c074 Roll src/third_party/skia 5c7a3ac0e214..5d052dac3ac1 (7 commits) (flutter/engine#7540)
dde286673 IWYU to get SkFontMetrics (flutter/engine#7539)
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.
There's no reason to disallow this as TextStyle can handle lerping between null parameters just fine. This change also adds tests to ensure the correct behavior
* Fix Podfile issue #24342
Sometimes base configurations (config.base_configuration_reference) can be nil, which leads to undefined method `real_path' for nil:NilClass.
* Disable bitcode in every case
* [FAB] Adding FAB as class in tests.
* [Material] FAB theme tests corrected. Also deeper into Material for elevation testing.
* [Material] Comment clarification.
* [Material] TODO formatting.
* [Material] Formatting.
* [Material] Comment correction.
* [Material] Updated values.
* [Material] Removing comment, low-level check, and adding safety.
* Add more animation tests for rotation
* Test animation progress
* Progress on the tests
* Everything 'works'
* We don't need to guarantee the rotation of the fab as it exits.
* Remove print statement
* Cleanup extra lines
* Remove whitespace
Newer NDKs switched to clang which by default uses system linker, instead
we need to force it to use appropriate toolchain linker by passing
-fuse-ld= command line flag.
Fixes#23458
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.
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