- 06 Dec, 2023 3 commits
-
-
Taha Tesser authored
Updated unit tests for `Tooltip` to have M2 and M3 versions. More info in #139076
-
Taha Tesser authored
fixes [`DatePicker` dialog contents are hidden when using smaller text size](https://github.com/flutter/flutter/issues/139120) ### Description - Fixed `DatePicker` dialog contents are hidden when using smaller text size. - Add golden tests ### Golden Test (Before) | `TextScale - 0.88` | `TextScale - 1.0` | `TextScale - 2.0` | | --------------- | --------------- | --------------- | | <img src="https://github.com/flutter/flutter/assets/48603081/9f301c5d-3acd-4a9f-8fb7-aa7b2e9553a2"> | <img src="https://github.com/flutter/flutter/assets/48603081/0496cf1a-5086-4cb1-ad3f-256f34346920"> | <img src="https://github.com/flutter/flutter/assets/48603081/2d1e1892-435a-4938-a7fc-2ffa4684828b"> | ### Golden Test (After) | `TextScale - 0.88` | `TextScale - 1.0` | `TextScale - 2.0` | | --------------- | --------------- | --------------- | | <img src="https://github.com/flutter/flutter/assets/48603081/8fb922b7-0f2c-4f08-a091-b359a01e3600"> | <img src="https://github.com/flutter/flutter/assets/48603081/59933cbf-49ef-46fb-98b5-217db2cc0ee7"> | <img src="https://github.com/flutter/flutter/assets/48603081/fd2501cb-511c-4b57-a4eb-f583af60aed7"> |
-
Reid Baker authored
FlutterView.display.size tells you the resolution of the display on supported platforms. FlutterView.physicalSize tells you the view size, which may be different from the display. This can help you tell if you are being letterboxed on android. https://medium.com/flutter/developing-flutter-apps-for-large-screens-53b7b0e17f10 Related to [flutter/website/9896](https://github.com/flutter/website/issues/9896)
-
- 05 Dec, 2023 4 commits
-
-
Shanmugam authored
This PR introduces a new feature that allows users to configure the 'dismissDirection' in SnackBarTheme. This enhancement provides users with the flexibility to set the 'dismissDirection' property in the ThemeData, rather than having to apply it each time when initializing a snack bar. This streamlines the process and makes it more convenient for users to manage and customize the behavior of snack bars within their applications. Fixes #139012
-
Kate Lovett authored
Part of https://github.com/flutter/flutter/issues/139243 Deprecated in https://github.com/flutter/flutter/pull/109702 The replacement for focusScopeNode is focusNode.enclosingScope
-
Ian Hickson authored
It's making the tests have a lot of logspam.
-
Greg Spencer authored
## Description When a DropdownMenu exists within another menu and a MenuItem is selected, the `TextEditingController` of the DropdownMenu is used after it has been disposed. This PR manages the local `TextController` instance better, making sure that the one used when building is the current one, and handling the case where the `controller` is set on the widget after initial creation. Also, places where we were setting the text and selection separately were converted to use `TextEditingValue` and set the value atomically. ## Related Issues - Fixes https://github.com/flutter/flutter/issues/139266 ## Tests - Added tests (Created by @josh-burton in https://github.com/flutter/flutter/pull/139268 - Thanks Josh!)
-
- 04 Dec, 2023 4 commits
-
-
Greg Spencer authored
## Description This converts some uses of `RawKeyEvent` to `KeyEvent` in preparation for deprecating `RawKeyEvent`. ## Related Issues - https://github.com/flutter/flutter/issues/136419
-
hgraceb authored
## Description Automatic focus request on Slider value change prevents Overlay from correctly handling hover events. Fixes #139281 ### Before ![slider3](https://github.com/flutter/flutter/assets/38378650/815e12a4-ccaf-4b99-8480-6cbdc97a91bd) ### After ![slider4](https://github.com/flutter/flutter/assets/38378650/473eca22-0308-4964-8368-b0c158ae30eb)
-
Anindya Chatterjee authored
With this PR, TapRegion would be able to detect any kind of mouse button events. Earlier, TapRegion used to detect only left mouse button event. Fixes #136706 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] 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
-
Bruno Leroux authored
This PR removes the call to `InkSparkle.constantTurbulenceSeedSplashFactory` which was introduced in https://github.com/flutter/flutter/pull/137998. This is now obsolete since https://github.com/flutter/flutter/pull/138757 was merged and InkSparkle randomness is no more active in tests.
-
- 01 Dec, 2023 1 commit
-
-
Bruno Leroux authored
## Description This PR updates the Material label for the share option, currently it is "**Share...**" (the expected label on iOS), on Android it should be "**Share**". Native Android TextField screenshot: ![Capture dâÃ
cran du 2023-11-20 17-19-02](https://github.com/flutter/flutter/assets/840911/6004b900-0ba4-441e-a814-4afd0c0e2fe2) ## Related Issue Step 2 for https://github.com/flutter/flutter/issues/138728 ## Tests Adds 1 test.
-
- 30 Nov, 2023 2 commits
-
-
Renzo Olivares authored
This change adds a feature to `UndoHistory` that allows the user to modify the value being pushed onto the undo stack. This is used by the framework to ignore the composing region when pushing history entries to the Undo stack on Android. This is so an undo does not trigger an input connection restart by the Android TextInputPlugin, which occurs when the framework changes the composing region. This is also the native platform behavior observed in Google Keep app on Android, where doing an undo during composing reverts to the previous state but with composing inactive and a subsequent redo does not bring back the composing region. Fixes #130881 Partial fix for #134398
-
xubaolin authored
Fixes #11884 As #38926 pointed out, the current Flutter implementation of multi-finger drag behavior is different from iOS and Android. This change introduces the `MultitouchDragStrategy` attribute, which implements the Android behavior and can be controlled through `ScrollBehavior`, while retaining the ability to extend iOS behavior in the future.
-
- 29 Nov, 2023 12 commits
-
-
Taha Tesser authored
fixes [Chips with `onDeleted` callback should show the delete button in the `disabled` state](https://github.com/flutter/flutter/issues/136638) ### 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 const MaterialApp( debugShowCheckedModeBanner: false, home: Example(), ); } } class Example extends StatefulWidget { const Example({super.key}); @override State<Example> createState() => _ExampleState(); } class _ExampleState extends State<Example> { @override Widget build(BuildContext context) { return Scaffold( body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ RawChip( avatar: const Icon(Icons.favorite_rounded), label: const Text('RawChip'), onSelected: null, isEnabled: false, onDeleted: () {}, ), InputChip( avatar: const Icon(Icons.favorite_rounded), label: const Text('InputChip'), isEnabled: false, onPressed: null, onDeleted: () {}, ), FilterChip( avatar: const Icon(Icons.favorite_rounded), label: const Text('FilterChip'), onSelected: null, onDeleted: () {}, ), ], ), ), ); } } ``` </details> | Before | After | | --------------- | --------------- | | <img src="https://github.com/flutter/flutter/assets/48603081/8bd458de-cfd2-44f0-a0dd-a8298938c61f" /> | <img src="https://github.com/flutter/flutter/assets/48603081/afca0684-b061-416b-b029-5316588c6888" /> |
-
Mitchell Goodwin authored
Addresses #63507, and is a follow up to the engine PR https://github.com/flutter/engine/pull/46857 Changes the font family string when attempting to use Apple system fonts to the new proxies added by the engine. For the "Text" font this will be more secure in the future against possible changes to Apple's API. For the "Display" font, this will now work correctly when it didn't before. I checked the letter spacing values against a native app for all font sizes between 17-28. I made a few adjustments to better match native, but especially for the "Text" font we were either really close, or close enough to not make a large breaking change to default fonts worth it. | Before | After | | ------------- | ------------- | | <img width="466" alt="Screenshot 2023-11-02 at 11 45 12â¯AM" src="https://github.com/flutter/flutter/assets/58190796/627ed8ac-d848-4f71-aa62-a467b8aac62d"> | <img width="383" alt="Screenshot 2023-11-02 at 11 46 25â¯AM" src="https://github.com/flutter/flutter/assets/58190796/9a502021-7d2b-4e14-98f1-86971b3830a5"> | The smaller text in both the before and after should be the same. The large system font that Flutter used before was incorrect, which caused it to look more spread out. Now we use the correct font.
-
Michael Goderbauer authored
Towards https://github.com/flutter/flutter/issues/134501. This change is based on https://github.com/flutter/engine/pull/48090. It changes the `RenderView` to be dynamically sized based on its content if the `FlutterView` it is configured with allows it (i.e. the `FlutterView` has loose `FlutterView.physicalConstraints`). For that, it uses those `physicalConstraints` as input to the layout algorithm by passing them on to its child (after translating them to logical constraints via the device pixel ratio). The resulting `Size` that the `RenderView` would like to be is then communicated back to the engine by passing it to the `FlutterView.render` call. Tests will fail until https://github.com/flutter/engine/pull/48090 has rolled into the framework.
-
yakagami authored
This PR adds the ability to get the `sourceTimeStamp` from `ScaleUpdateDetails` in a `GestureScaleUpdateCallback` like so: ```dart onScaleUpdate: (ScaleUpdateDetails details){ print(details.sourceTimeStamp); } ``` `sourceTimeStamp` is necessary when tracking velocity eg. ```dart VelocityTracker tracker = VelocityTracker.withKind(PointerDeviceKind.touch); ///... onScaleUpdate: (ScaleUpdateDetails details){ tracker.addPosition(details.sourceTimeStamp!, details.focalPoint); } ``` The docs say: >Having both a pan gesture recognizer and a scale gesture recognizer is redundant; scale is a superset of pan. Just use the scale gesture recognizer. Currently this is not entirely accurate, and should be fixed, as noted in https://github.com/flutter/flutter/issues/43833#issuecomment-548133779. This PR does not add `sourceTimeStamp` to `ScaleStartDetails` because it is more involved. Specifically, `ScaleStartDetails` can be created in `acceptGesture` which does not have access to the `PointerEvent` to get the `event.timeStamp` (https://github.com/flutter/flutter/blob/54fa25543243e3bf31af6af0c1fef6adabc1d5c1/packages/flutter/lib/src/gestures/scale.dart#L730C5-L730C5). fixes https://github.com/flutter/flutter/issues/135873. See also https://github.com/flutter/flutter/issues/43833 which added delta and https://github.com/flutter/flutter/issues/49025 which added `numPointers` to `ScaleUpdateDetails` for the reason given above. `sourceTimeStamp` should probably be added to `ScaleStartDetails` as well because it exists in `DragStartDetails` and therefore in `onPanStart`. I am not sure how to add tests for this, any input about this PR would be appreciated. - [] All existing and new tests are passing.
-
Greg Spencer authored
Part of https://github.com/flutter/flutter/issues/139243 ## Description This removes the `PlatformMenuBar.body` attribute and constructor parameter, since its deprecation period has elapsed. ## Tests - No tests were using the deprecated attribute, so no tests were removed. #FlutterDeprecations
-
Kate Lovett authored
This updates the implementation to use the stopwatch from the Clock object and pipes it through to the TestWidgetsFlutterBinding so it will be kept in sync with FakeAsync. Relands https://github.com/flutter/flutter/pull/138843 attempted to reland https://github.com/flutter/flutter/pull/137381 which attempted to reland #132291 Fixes https://github.com/flutter/flutter/issues/97761 1. The original change was reverted due to flakiness it introduced in tests that use fling gestures. * Using a mocked clock through the test binding fixes this now 2. It was reverted a second time because a change at tip of tree broke it, exposing memory leaks, but it was not rebased before landing. * These leaks are now fixed 3. It was reverted a third time, because we were so excellently quick to revert those other times, that we did not notice the broken benchmark that only runs in postsubmit. * The benchmark is now fixed
-
Kate Lovett authored
-
Fré Dumazy authored
The previous documentation did not point out the difference between the default corner radius for Material 2 and Material 3. Fixes: https://github.com/flutter/flutter/issues/139093
-
Veli Bacik authored
Before: ![Screenshot 2023-10-09 at 01 32 33](https://github.com/flutter/flutter/assets/17102578/cb90423c-8d8d-40d5-afd0-5aab23b9930b) After: ![Screenshot 2023-10-09 at 01 33 01](https://github.com/flutter/flutter/assets/17102578/3ba84243-42b8-4e02-b064-70618e21a305) ![Screenshot 2023-10-09 at 01 32 49](https://github.com/flutter/flutter/assets/17102578/4f311d74-f6a8-4f32-9974-109bd7f55812) Fixed #136164
-
Renzo Olivares authored
This change adds support for a `MaterialStatesController` in `TextField` and `TextFormField`. With this change a user can listen to `MaterialState` changes in an input field by passing a `MaterialStatesController` to `TextField` or `TextFormField`. Fixes #133273
-
Mateus Felipe C. C. Pinto authored
Provide parameter to Icon and IconThemeData for they to consider the context's text scaler (#135708) Provide a parameter `applyTextScaling` to both `Icon` and `IconDataTheme`. When `true`, the context's `TextScaler` will apply it's `scale` method to the icon size. Fixes #115466
-
LongCatIsLooong authored
Update `ButtonStyleButton.scaledPadding` documentation. Migrate callers in flutter/flutter (#139014) Fixes https://github.com/flutter/flutter/issues/138547. It makes more sense to me for the default padding values to use the scaled font sizes instead of the `textScaleFactor`.
-
- 28 Nov, 2023 9 commits
-
-
Gregor Zurowski authored
A documentation tiny fix of the comment for `WidgetsBindingObserver`.
-
yim authored
Fixes: #138836 Adds some comments to OverlayPortal to clarify its behavior.
-
Gabriel Tavares authored
**What has been done?** ---------------------- Added new enumeration in `TableCellVerticalAlignment`, which sets the cell size to the same as the topmost cell. There are no noticeable problems in using it in all cells together, as there are in `TableCellVerticalAlignment.fill` which is made not to be used in all cells together because it has another purpose. **Explanation of the logic** ---------------------- An assignment was made (which already existed in `TableCellVerticalAlignment.top; middle and bottom`) that assigns `rowHeight` the maximum double between the initialized height and the height of its child. ![image](https://github.com/flutter/flutter/assets/69699209/0fc9c168-5638-494b-aa0c-c579d0494c5e) Basically, defining a minimum cell height based on its child, and letting each table row have its own height stipulated from the largest element, creating an `IntrinsicHeight` for TableCell automatically. ![image](https://github.com/flutter/flutter/assets/69699209/488b258a-3d25-4655-a9a0-381680468dec) As the `TableCellVerticalAlignment` logic already provides for the use of the height of the largest cell in the row, it was possible to reuse this logic, and just not make the break statement that exists to fill in the calculation for `intrinsicHeight`. Real example in an Android application after added enumeration ---------------------- ![image](https://github.com/flutter/flutter/assets/69699209/51dce88d-f0f5-4644-942a-11ad218ffca0) Opened issue ---------------------- FIX: #130261
-
LongCatIsLooong authored
Fixes https://github.com/flutter/flutter/issues/138592. In an `Icon` widget if the icon font's body (ascender + descender) is larger than the font's units per em, the icon height reported by the text layout library will be larger than the specified font size. When that happens the icon glyph gets pushed towards the bottom because the `Icon` widget is wrapped in a fontSize x fontSize SizedBox and thus has a fixed height of fontSize px. This wasn't a problem for material icons because its UPEM == body.
-
Tirth authored
Added `keyboardType` & `textInputAction` props to `SearchBar`, `SearchAnchor` & `SearchAnchor.bar` Fixes #138483
-
Jim Kalafut authored
I believe this was intended (in #128351) to be a heading, but currently in the [published docs](https://api.flutter.dev/flutter/material/PopupMenuButton-class.html) it is rendered as: ``` /// ## Updating to MenuAnchor ```
-
Kate Lovett authored
Fixes https://github.com/flutter/flutter/issues/138753 This makes sure that InkSparkles are always fixed for testing rather than random.
-
Bruno Leroux authored
## Description This PR fixes an inversion on `MediaQuery.textScalerOf` and `MediaQuery.maybeTextScalerOf `documentation. ## Related Issue Fixes https://github.com/flutter/flutter/issues/139071 ## Tests Documentation only
-
neko-andrew authored
Fix min intrinsic width of input decorator by removing left or right padding when `prefixIcon` or `suffixIcon` are used. Fixes #137937.
-
- 27 Nov, 2023 5 commits
-
-
hangyu authored
issue: #97747 engine pr:https://github.com/flutter/engine/pull/47114
-
Kallen Tu authored
Bumping DartDoc to 8.0.0. https://pub.dev/packages/dartdoc/changelog Will be also removing the `@hideConstantImplementations` directive since the behaviour is default now. See issue https://github.com/dart-lang/dartdoc/issues/3564. ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] 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]. - [X] 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
-
Taha Tesser authored
Add ability to customize `NavigationBar` indicator overlay and fix indicator shape for the overlay (#138901) fixes [Provide ability to override `NavigationBar` indicator ink response overlay](https://github.com/flutter/flutter/issues/138850) fixes [`NavigationBar.indicatorShape` is ignored, `NavigationBarThemeData.indicatorShape` is applied to the indicator inkwell](https://github.com/flutter/flutter/issues/138900) ### 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 const MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( bottomNavigationBar: NavigationBarExample(), ), ); } } class NavigationBarExample extends StatefulWidget { const NavigationBarExample({super.key}); @override State<NavigationBarExample> createState() => _NavigationBarExampleState(); } class _NavigationBarExampleState extends State<NavigationBarExample> { int index = 0; @override Widget build(BuildContext context) { return NavigationBar( elevation: 0, overlayColor: const MaterialStatePropertyAll<Color>(Colors.transparent), // indicatorShape: RoundedRectangleBorder( // borderRadius: BorderRadius.circular(4.0), // ), indicatorColor: Colors.transparent, selectedIndex: index, onDestinationSelected: (int index) { setState(() { this.index = index; }); }, destinations: const <Widget>[ NavigationDestination( selectedIcon: Icon(Icons.home_filled), icon: Icon(Icons.home_outlined), label: 'Home', ), NavigationDestination( selectedIcon: Icon(Icons.favorite), icon: Icon(Icons.favorite_outline), label: 'Favorites', ), ], ); } } ``` </details> ### Before #### Cannot override `NavigationBar` Indicator ink well overlay ![Screenshot 2023-11-22 at 18 22 48](https://github.com/flutter/flutter/assets/48603081/06f54335-71ee-4882-afb0-53b614933c38) #### Indicator shape is ignored for the indicator overlay ![Screenshot 2023-11-22 at 15 29 52](https://github.com/flutter/flutter/assets/48603081/913e0f77-48f4-4c6e-87f3-52c81b78f3d9) ### After #### Can use `NavigationBar.overlayColor` or `NavigationBarThemeData.NavigationBar` to override default indicator overlay `overlayColor: MaterialStatePropertyAll<Color>(Colors.red.withOpacity(0.33)),` ![Screenshot 2023-11-22 at 18 22 08](https://github.com/flutter/flutter/assets/48603081/28badae4-a7c7-4bf0-8bcc-278a1f84729d) `overlayColor: MaterialStatePropertyAll<Color>(Colors.transparent),` ![Screenshot 2023-11-22 at 18 22 25](https://github.com/flutter/flutter/assets/48603081/674b48b1-f66a-4d91-9f10-ad307416ac32) #### Indicator shape is respected for the indicator overlay ![Screenshot 2023-11-22 at 15 30 36](https://github.com/flutter/flutter/assets/48603081/ae9a3627-787e-45ac-9319-2ea8ea1e6ae6)
-
Michael Goderbauer authored
Towards https://github.com/flutter/flutter/issues/134501. Required to roll https://github.com/flutter/engine/pull/48090 into the framework. Two new subclasses of FlutterView were added recently for testing (in https://github.com/flutter/flutter/pull/138849) that I missed in my previous PR (https://github.com/flutter/flutter/pull/138565).
-
Michael Goderbauer authored
Towards https://github.com/flutter/flutter/issues/134501. Required to roll https://github.com/flutter/engine/pull/48090 into the framework. **DO NOT SUBMIT until https://github.com/flutter/flutter/pull/138648 and https://github.com/flutter/engine/pull/48090 are ready.**
-