- 07 Mar, 2024 2 commits
-
-
Bruno Leroux authored
## Description This PRs changes the default value transit mode for key event simulation. The default transit mode for key event simulation is currently `KeyDataTransitMode.rawKeyData` while on the framework side `KeyDataTransitMode.keyDataThenRawKeyData` is the preferred transit mode. `KeyDataTransitMode.keyDataThenRawKeyData` is more accurate and can help detect issues. For instance the following test will fail with `KeyDataTransitMode.rawKeyData` because raw keyboard logic for modifier keys is less accurate: ```dart testWidgets('Press control left once', (WidgetTester tester) async { debugKeyEventSimulatorTransitModeOverride = KeyDataTransitMode.keyDataThenRawKeyData; final List<KeyEvent> events = <KeyEvent>[]; final FocusNode focusNode = FocusNode(); addTearDown(focusNode.dispose); await tester.pumpWidget( Focus( focusNode: focusNode, autofocus: true, onKeyEvent: (_, KeyEvent event) { events.add(event); return KeyEventResult.handled; }, child: Container(), ), ); await simulateKeyDownEvent(LogicalKeyboardKey.controlLeft); // This will fail when transit mode is KeyDataTransitMode.rawKeyData // because a down event for controlRight is synthesized. expect(events.length, 1); debugKeyEventSimulatorTransitModeOverride = null; }); ``` And the following this test is ok with `KeyDataTransitMode.rawKeyData` but rightly fails with `KeyDataTransitMode.keyDataThenRawKeyData`: ```dart testWidgets('Simulates consecutive key down events', (WidgetTester tester) async { debugKeyEventSimulatorTransitModeOverride = KeyDataTransitMode.rawKeyData; // Simulating several key down events without key up in between is tolerated // when transit mode is KeyDataTransitMode.rawKeyData, it will trigger an // assert on KeyDataTransitMode.keyDataThenRawKeyData. await simulateKeyDownEvent(LogicalKeyboardKey.arrowDown); await simulateKeyDownEvent(LogicalKeyboardKey.arrowDown); debugKeyEventSimulatorTransitModeOverride = null; }); ``` ## Related Issue Related to https://github.com/flutter/flutter/issues/143845 ## Tests Adds two tests.
-
Valentin Vignal authored
-
- 06 Mar, 2024 3 commits
-
-
Martin Kustermann authored
Use wasm-compatible conditional import in timeline.dart, avoid emitting timeline events in SchedulerBinding (#144682)
-
Qun Cheng authored
This PR is to remove deprecated `ThemeData.errorColor`. These parameters are made obsolete in https://github.com/flutter/flutter/pull/110162. Part of https://github.com/flutter/flutter/issues/143956
-
Greg Price authored
I was doing some debugging on a RenderSliver subclass, and found that SliverConstraints.toString was missing the precedingScrollExtent field. Add that, and add both that field and userScrollDirection to the `==` and hashCode implementations, which had been skipping them, so that all three methods now handle all the class's fields.
-
- 05 Mar, 2024 5 commits
-
-
Tirth authored
Adds missing `style` to `PopupMenuButton`. Fixes: #114709
-
Michael Goderbauer authored
This is a regression test for https://github.com/flutter/flutter/issues/144087 and https://github.com/flutter/flutter/issues/138588. To be submitted after https://github.com/flutter/flutter/pull/144579.
-
Michael Goderbauer authored
Revert "_DefaultTabControllerState should dispose all created TabContoller instances. (#136608)" (#144579) This reverts commit 9fa9fd36. Fixes https://github.com/flutter/flutter/issues/144087. Fixes https://github.com/flutter/flutter/issues/138588. This crash has been reported previously from a customer in google3 in https://github.com/flutter/flutter/issues/138588, but we weren't able to track it down. Thankfully, a repro was now provided in https://github.com/flutter/flutter/issues/144087#issuecomment-1968257383 which traced the crash down to a change made in #136608. This PR reverts that change to fix that crash for now. I will post a new PR shortly that will add a test to cover the use case that caused the crash with #136608 to make sure we don't re-introduce the crash in the future.
-
Bruno Leroux authored
## Description This PR makes `CupertinoTextFormFieldRow` restorable. The implementation is based on https://github.com/flutter/flutter/pull/78835 which made `FormField` and `TextFormField` restorable. ## Related Issue Fixes https://github.com/flutter/flutter/issues/144504. ## Tests Adds 4 tests.
-
Jonah Williams authored
Until we figure out why this is unstable on Impeller swiftshader, disable it.
-
- 04 Mar, 2024 5 commits
-
-
LongCatIsLooong authored
Nobody calls it except for `markNeedsLayout`, and the render object is a guaranteed relayout boundary.
-
Bruno Leroux authored
## Description This PR fix the text color for the default action in a CupertiniContextMenu. Previously the dynamic color was not resolved which leads to text being blacks when theme brightness was dark. | Before | After | |--------|--------| |  |  | ## Related Issue Fixes https://github.com/flutter/flutter/issues/144492. ## Tests Adds 1 test, updates 1.
-
Nate authored
Originally, my aim was just to refactor (as per usual), but while messing around with the `TableBorder.symmetric` constructor, I realized that `borderRadius` was missing! This pull request makes a few class constructors more efficient, and it fixes #144277 by adding the missing parameter. <br>
-
Qun Cheng authored
Fixes https://github.com/flutter/flutter/issues/144135 This PR is just a doc fix.
-
Loïc Sharma authored
Updates link to the new location. No tests as this only changes a comment.
-
- 01 Mar, 2024 6 commits
-
-
Taha Tesser authored
fixes [`showDateRangePicker` interactive sample not loading](https://github.com/flutter/flutter/issues/144474) ### Description This fixes `showDateRangePicker` example not loading in Dartpad. Similar fix was made for `showDatePicker` in https://github.com/flutter/flutter/pull/99401
-
Taha Tesser authored
fixes [`DatePickerDialog` date entry hover background and ink splash have different radius](https://github.com/flutter/flutter/issues/141350) fixes [Ability to customize DatePicker day selection background and overlay shape](https://github.com/flutter/flutter/issues/144220) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Center( child: Builder(builder: (context) { return FilledButton( onPressed: () { showDatePicker( context: context, initialDate: DateTime.now(), firstDate: DateTime.utc(2010), lastDate: DateTime.utc(2030), ); }, child: const Text('Show Date picker'), ); }), ), ), ); } } ``` </details> ### Material DatePicker states specs  ### Day selection overlay | Before | After | | --------------- | --------------- | | <img src="https://github.com/flutter/flutter/assets/48603081/b529d38d-0232-494b-8bf2-55d28420a245" /> | <img src="https://github.com/flutter/flutter/assets/48603081/c4799559-a7ef-45fd-aed9-aeb386370580" /> | ### Hover, pressed, highlight preview | Before | After | | --------------- | --------------- | | <video src="https://github.com/flutter/flutter/assets/48603081/8edde82a-7f39-4482-afab-183e1bce5991" /> | <video src="https://github.com/flutter/flutter/assets/48603081/04e1502e-67a4-4b33-973d-463067d70151" /> | ### Using `DatePickerThemeData.dayShape` to customize day selection background and overlay shape | Before | After | | --------------- | --------------- | | <img src="https://github.com/flutter/flutter/assets/48603081/a0c85f58-a69b-4e14-a45d-41e580ceedce" /> | <img src="https://github.com/flutter/flutter/assets/48603081/db67cee1-d28d-4168-98b8-fd7a9cb70cda" /> | ### Example preview 
-
Taha Tesser authored
fixes [Chips delete button hover style is square, not circular](https://github.com/flutter/flutter/issues/141335) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Center( child: RawChip( label: const Text('Test'), onPressed: null, deleteIcon: const Icon(Icons.clear, size: 18), onDeleted: () {}, ), ), ), ); } } ``` </details> ### Preview | Before | After | | --------------- | --------------- | | <img src="https://github.com/flutter/flutter/assets/48603081/c5d62c57-97b3-4f94-b83d-df13559ee3a8" /> | <img src="https://github.com/flutter/flutter/assets/48603081/b76edaab-73e0-4aa9-8ca2-127eedd77814" /> |
-
Bruno Leroux authored
## Description This PR migrate hint related tests to M3 and adds some missing tests. It is the fourth step for the M3 test migration for `InputDecorator`. Step 1: https://github.com/flutter/flutter/pull/142981 Step 2: https://github.com/flutter/flutter/pull/143369 Step 3: https://github.com/flutter/flutter/pull/143520 ## Related Issue Related to https://github.com/flutter/flutter/issues/139076
-
Bruno Leroux authored
## Description This PR expands the items displayed in the overflow menu of a `TextSelectionToolbar` making buttons clickable in the blank area. | Before | After | |--------|--------| | Each item has its own width | All items expand horizontally | |  |  | ## Related Issue Fixes https://github.com/flutter/flutter/issues/144089. ## Tests Adds 1 tests.
-
Michael Goderbauer authored
-
- 29 Feb, 2024 9 commits
-
-
hangyu authored
reland https://github.com/flutter/flutter/pull/143117 fixes: https://github.com/flutter/flutter/issues/143116 fixes: https://github.com/flutter/flutter/issues/141992 ## Pre-launch Checklist - [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [ ] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [ ] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat [Data Driven Fixes]: https://github.com/flutter/flutter/wiki/Data-driven-Fixes
-
Qun Cheng authored
This PR is to remove deprecated ThemeData.backgroundColor. These parameters are made obsolete in https://github.com/flutter/flutter/pull/110162. Part of https://github.com/flutter/flutter/issues/143956
-
Amir Panahandeh authored
Adds a test to validate state is preserved after reordering in `TwoDimensionalViewport` (reference: https://github.com/flutter/flutter/pull/141504#pullrequestreview-1837501775). - Fixes #130754
-
Qun Cheng authored
This PR is to remove deprecated ThemeData.toggleableActiveColor. These parameters are made obsolete in https://github.com/flutter/flutter/pull/97972. Part of https://github.com/flutter/flutter/pull/111080
-
LongCatIsLooong authored
This is for https://github.com/flutter/flutter/issues/127803: a text field should unregister from the scribble scope, when it becomes unfocusable. When a `FocusNode` has listeners and its `_canRequestFocus` flag is set to true, it adds `+1` to `_focusabilityListeningDescendantCount` of all ancestors until it reaches the first ancestor with `descendantsAreFocusable = false`. When the a `FocusNode`'s `descendantsAreFocusable` changes, all listeners that contributed to its `_focusabilityListeningDescendantCount` will be notified.
-
Bruno Leroux authored
## Description This PR simplifies one external link in a commented section of the Android manifest template. ## Related Issue Fixes https://github.com/flutter/flutter/issues/144249 ## Tests Documentation only PR.
-
Justin McCandless authored
I was talking with @tvolkert about the complex behavior of Shortcuts when a text field is focused. I created [this dartpad](https://dartpad.dev/?id=0b5c08fa85637422baa84927b7f1ee5f) to illustrate the problem, which shows a key being stolen from a text field by Shortcuts, and how to prevent that using DoNothingAndStopPropagationIntent. This PR adds a section in the docs explaining how all of this works and how to override this "stealing" problem.
-
LongCatIsLooong authored
The [internal test failure](https://github.com/flutter/flutter/pull/144207#issuecomment-1968236339) was caused by `Focus.withExternalFocusNode` modifying the external node's attributes. The extra changes are in this commit: https://github.com/flutter/flutter/commit/e53d98b06c6e2ae65271681c4b40b28b2d02ad04 CL with (almost) passing TGP: cl/611157582
-
Tong Mu authored
Fixes https://github.com/flutter/flutter/issues/144261
-
- 28 Feb, 2024 7 commits
-
-
Justin McCandless authored
Most users should be using SelectionArea over SelectableText, so this makes that more clear/discoverable in the docs.
-
Qun Cheng authored
-
Tomasz Gucio authored
This PR removes an irrelevant comment in `TextPainter` for `_computePaintOffsetFraction`. Also some typos are corrected and missing spaces/newlines added. test-exempt: no functional change
-
auto-submit[bot] authored
Reverts flutter/flutter#144207 Initiated by: CaseyHillers Reason for reverting: b/327301206 - Breaking a customer test Original PR Author: LongCatIsLooong Reviewed By: {gspencergoog} This change reverts the following previous change: Original Description: `FocusNode.canRequestFocus` was doing a double traversal if no ancestor disallows focus. The last for loop only has to reach as far as the enclosing scope. Also this caches the `FocusNode.enclosingScope` since the getter access happens much more frequently than node reparenting.
-
Polina Cherkasova authored
-
Taha Tesser authored
This a test utility class for `tabs_test.dart` to prepare the class for Material 3 tests updates. More info in https://github.com/flutter/flutter/issues/139076
-
Qun Cheng authored
This PR is to remove deprecated ThemeData.bottomAppBarColor. These parameters are made obsolete in https://github.com/flutter/flutter/pull/110162. Part of https://github.com/flutter/flutter/pull/111080
-
- 27 Feb, 2024 3 commits
-
-
ufolux authored
*Fixed the issue with abnormal Chinese punctuation marks.*
-
hangyu authored
Reland #143334
-
LongCatIsLooong authored
It was deprecated in https://github.com/flutter/flutter/pull/110616. Deprecated in https://github.com/flutter/flutter/pull/110616
-