6905 Commits

Author SHA1 Message Date
Michael Goderbauer
dc3d6603f2
Make dpr available during Scrollable disposal (#126535)
Fixes https://github.com/flutter/flutter/issues/126454.

In certain situations (see linked bug) the Scrollable needs access to the DPR of the View it is drawn into during disposal. Since inherited widget lookups are not allowed during disposal, we cannot look up the DPR dynamically in these situations. Instead, we have to cache the DPR when lookups are still allowed.
2023-05-11 15:31:23 +00:00
Michael Goderbauer
42d9a2b3fa
Sync lints (#126316)
Sync lints with https://github.com/dart-lang/linter/blob/master/example/all.yaml and enable `implicit_reopen` and `type_literal_in_constant_pattern` (which have no violations). Also contains some clean-up work towards enabling `matching_super_parameters`, which is not quite ready yet due to its handling of "private" arguments.
2023-05-11 13:27:51 +00:00
Qun Cheng
4e7e4512b6
Reorder materialStateProperty defaults (#125905)
Fixes #122250. This PR is to make sure all the MaterialStateProperty defaults are able to correctly resolve different states. 
* When a widget is pressed, it is also hovered, so we need to put the `MaterialState.pressed` check before `MaterialState.hovered`. 
* When a widget is focused, the widget should still be able to be hovered, so we should check `MaterialState.hovered` before `MaterialState.focused`.
* There are also cases like in _InputDecoratorDefaultsM3, the `MaterialState.disabled` should be checked before `MaterialState.error`.

 the order should be disabled, (error), pressed, hovered, focused.
2023-05-11 00:03:09 +00:00
Alex Li
d01d8aeed0
Add strokeAlign to CircularProgressIndicator and RefreshProgressIndicator (#125945) 2023-05-10 14:57:55 -07:00
Kevin Chisholm
a153d6da84
Revert "Provide default constraints for M3 dialogs" (#126355)
Reverts flutter/flutter#120082

Causing breakages: b/281181985
2023-05-09 14:21:52 -05:00
Michael Goderbauer
58454e9e31
Remove dead code (#126266)
Dead code was flagged by `unreachable_from_main` lint, which is still experimental and not ready to be enabled yet.
2023-05-09 15:47:16 +00:00
Michael Goderbauer
9b230d239a
Fix leaks (#126144)
Fixes https://github.com/flutter/flutter/issues/126096.
Fixes https://github.com/flutter/flutter/issues/126097.
Fixes https://github.com/flutter/flutter/issues/126102.
Fixes https://github.com/flutter/flutter/issues/126098.
Fixes https://github.com/flutter/flutter/issues/126147.
Work towards https://github.com/flutter/flutter/issues/126100.

Does not fix the OverlyEntry/ModalRoute leak (https://github.com/flutter/flutter/issues/126100).
2023-05-08 09:11:23 +00:00
Tirth
835b892d7f
[ExpansionPanelList] add materialGapSize property in ExpansionPanelList Widget (#123971)
Adds `materialGapSize` property to `ExpansionPanelList` widget.

| `materialGapSize: 0` | `materialGapSize: 16` (default) | `materialGapSize: 30` |
| --- | --- | --- |
| ![screenshot_1680450783](https://user-images.githubusercontent.com/13456345/229366131-8dd105cd-6371-4852-b57b-5900e3dbd203.png) | ![screenshot_1680453525](https://user-images.githubusercontent.com/13456345/229366640-e2ae5f95-0cd6-4694-b8ff-0de7fb7c8554.png) | ![screenshot_1680450910](https://user-images.githubusercontent.com/13456345/229366742-3121331b-b22e-46a1-bdfa-20b5663cbe2b.png) |
| ![screenshot_1680450785](https://user-images.githubusercontent.com/13456345/229366133-bf345914-9d74-4dcc-afc4-a6a9ccca13ab.png) | ![screenshot_1680453527](https://user-images.githubusercontent.com/13456345/229366644-bfff8e4f-8a66-4419-90b8-6a16442b7157.png) | ![screenshot_1680450912](https://user-images.githubusercontent.com/13456345/229366745-364b1a1e-ed2c-4463-a74d-d8e94bf509b9.png) |
| ![screenshot_1680450787](https://user-images.githubusercontent.com/13456345/229366138-3f6280f0-e58a-4621-aced-c7eee2077ef8.png) | ![screenshot_1680453530](https://user-images.githubusercontent.com/13456345/229366648-3805db23-29b0-46a3-82ce-92688e65f0fd.png) | ![screenshot_1680450914](https://user-images.githubusercontent.com/13456345/229366747-73d46f9c-3edc-4197-8f02-651ff8499323.png) |
| ![screenshot_1680450789](https://user-images.githubusercontent.com/13456345/229366140-4ff8572c-8d06-4985-a697-3af0ce0e5743.png) | ![screenshot_1680453532](https://user-images.githubusercontent.com/13456345/229366651-88af37ac-7503-4abc-b6a6-d8556a583871.png) | ![screenshot_1680450916](https://user-images.githubusercontent.com/13456345/229366749-0db156b0-6b53-4ef2-9699-0d3e8704433b.png) |

Fixes: #118167
2023-05-06 20:00:22 +00:00
林洵锋
7c356d047d
[ios] fix hold and drag spacebar does not move cursor when obscureTex… (#122383)
Fixes #122139 with engine pr [flutter/engine#40216](https://github.com/flutter/engine/pull/40216)
2023-05-06 04:22:11 +00:00
Alex Li
62a4643e4f
Add rect argument to _ArcPaintPredicate for tests (#125953)
As preparation for #125945.

The PR improves tests itself which allows the `arc` method to be available to check whether corresponding rects are drawn during tests.
2023-05-06 02:10:36 +00:00
Viren Khatri
d5df458684
add tests for dominant bottom sheet in scaffold (#124472)
while debugging https://github.com/flutter/flutter/issues/123882 found out that below lines were untested. although they'll change due to the issue above, but the tests will remain.

e0045d04f7/packages/flutter/lib/src/material/scaffold.dart (L3169-L3180)
2023-05-05 20:51:14 +00:00
Patrick Lindsay
37f348b006
Added CupertinoDatepicker monthYear mode (flutter#93508) (#125603)
This PR adds a month and year mode to the CupertinoDatePicker. The monthYear mode is the date mode without the day of the month.
![monthYearMode](https://user-images.githubusercontent.com/98486346/234749274-794dce24-28c7-4f48-92ab-5ac46ec069d7.png)

This feature was added at the request of:
[Proposal] CupertinoDatePicker with month and year. #93508

One thing that I was unsure of was the use of the DatePickerDateOrder to determine the monthYear order. It could be considered a workaround since the DatePickerDateOrder is intended to order day, month, and year. This means that a developer could use the DatePickerDateOrder.dmy (day, month, year) or DatePickerDateOrder.mdy (month, day, year) to get the same result. 

At first I intended to add a DatePickerMonthYearOrder enum to the localizations, in addition to a new parameter for the CupertinoDatePicker for monthYearOrder, but I ended up reverting these changes (1c61f1084e) because I had not considered the effects of adding values to the localizations.

I decided it may be better to not add an additional parameter (monthYearOrder) that would go mostly unused. I am very open to feedback or ideas on this matter.
2023-05-05 20:49:34 +00:00
Qun Cheng
c1c2513ac9
Add Switch.trackOutlineWidth property (#125848) 2023-05-05 13:34:08 -07:00
Taha Tesser
ad009fb7ac
Fix Material 3 tab indicator weight and position (#125883)
fixes https://github.com/flutter/flutter/issues/123112

### Description
1. Add proper M3 indicator height aka`IndictorWeight` from the M3 specs for the primary tab bar with label indicator size.
db6074ade4/dev/tools/gen_defaults/data/navigation_tab_primary.json (L9)
(this was held due to `indicatorWeight` having a hard-coded value) 

and added a secondary tab bar indicator height.
2. Set a minimum value for the rounded indicator to maintain the indicator shape.
3. With proper indicator height, the rounded indicator position is also fixed.
4. Fix round indicator is shown for the primary tab bar with tab indicator size.
5. Above changes fix https://github.com/flutter/flutter/issues/123112.
6. Fix the `startOffset` const value from https://github.com/flutter/flutter/pull/125036  to match docs and move it to a variable.
2023-05-05 14:09:18 +00:00
Tirth
91a84dedf5
[NavigationDrawer] adds padding property in NavigationDrawer Widget (#123961)
Adds `tilePadding` property to `NavigationDrawer` Widget.

Fixes: #121662

| Without adding `tilePadding` in NavigationDrawer | With `tilePadding: EdgeInsets.all(16)` in NavigationDrawer |
| --- | --- |
| ![photo_2023-04-02_15-03-56](https://user-images.githubusercontent.com/13456345/229344718-9070c0c0-9c71-4436-9953-d258367951e9.jpg) | ![photo_2023-04-02_15-04-00](https://user-images.githubusercontent.com/13456345/229344717-0768f9d5-6a55-4c2f-918e-53f2423bb959.jpg) |
2023-05-05 05:36:30 +00:00
Ian Hickson
a11da307bf
Minor fixes found while working on blankcanvas (#125751)
This PR contains a series of minor changes to address issues that I happened to run into:

 - Pretty-print errors triggered when handling events that are pending because of having locked event handling. Previously these were just dumped to the console.
 - Add more documentation for `debugPaintPadding`.
 - Add documentation to `Tween` saying how to implement it.
 - Slight formatting changes in the scrollbar code to align some expressions.
 - Since we convert ScrollMetricsNotifications to ScrollNotifications in various places, provide an explicit API to do this. This will make the behaviour consistent throughout, and makes the code easier to understand. Added a test for this.
 - Clarifications to some of the BindingBase and SchedulerBinding documentation.
 - Clarified some documentation in `flutter_test`'s `Finder` class.
2023-05-05 00:34:04 +00:00
chunhtai
0b657236ca
Cleans up appbar imply leading logic (#125315)
fixes https://github.com/flutter/flutter/issues/80256
2023-05-04 22:21:11 +00:00
Polina Cherkasova
5a80f8d637
Define testWidgetsWithLeakTracking. (#125063) 2023-05-04 12:09:41 -07:00
Pierre-Louis
8ec5001ac2
Provide default constraints for M3 dialogs (#120082)
This PR constrains M3 dialogs to 560dp max width and height.

This is not a breaking change per the breaking change policy.

Part of https://github.com/flutter/flutter/issues/118619

## 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
2023-05-04 19:27:11 +02:00
LongCatIsLooong
f704c68924
Add InlineSpan.visitDirectChildren (#125656)
I'd like to find out the `fontSize` of a `PlaceholderSpan`, and currently there doesn't seem to be a way to do `TextStyle` cascading in the framework:

 `InlineSpan.visitChildren` traverses the entire `InlineSpan` tree using a preorder traversal, and nodes that don't have "content" will be skipped (https://master-api.flutter.dev/flutter/painting/InlineSpan/visitChildren.html): 

> Walks this [InlineSpan](https://master-api.flutter.dev/flutter/painting/InlineSpan-class.html) and any descendants in pre-order and calls visitor for each span that has content.

which makes it impossible to do `TextStyle` cascading in the framework: 
- `InlineSpan`s with a non-null `TextStyle` but has no content will be skipped
- `visitChildren` doesn't directly expose the hierarchy, it only gives information about the flattened tree.

This doesn't look like a breaking change, most internal customers are extending `WidgetSpan` which has a concrete implementation of the new method.

Alternatively I could create a fake `ui.ParagraphBuilder` and record the `ui.TextStyle` at the top of the stack when `addPlaceholder` is called. But `ui.TextStyle` properties are not exposed to the framework.
2023-05-03 20:33:06 +00:00
fzyzcjy
4d38f94e27
ModalBarrier's gesture recognizer does not call invokeCallback (#125386)
Close #125385 - please see explanations there :)

If you think this PR looks OK, I will polish it (e.g. copy-and-paste-and-modify the tests shown in #125385 into here and make CI pass)
2023-05-03 09:05:16 +00:00
Valentin Vignal
00cd3edae3
Align the Popup Menu under its child (#125534)
Align the `PopupMenu` under its child.

Before:

![image](https://user-images.githubusercontent.com/32538273/234468262-beddb257-5f5a-422f-a678-c26efc52dc07.png)

After:

![image](https://user-images.githubusercontent.com/32538273/234468233-3ea4d741-b04c-4012-bdd7-a36ecedc029c.png)

*List which issues are fixed by this PR. You must list at least one issue.*

Fixes https://github.com/flutter/flutter/issues/125474

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2023-05-02 17:02:55 +00:00
Polina Cherkasova
209865ae19
Clean up in memory_allocations_test.dart. (#125777) 2023-05-02 09:13:36 -07:00
Jonah Williams
12b3023e98
[framework] delete physical model layer. (#125719)
Engine PR: https://github.com/flutter/engine/pull/41593

This must land first

We should remove these, as they've been deprecated for a while. On the engine side of things, the physical model layer is the only one which requires the device pixel ratio, so deleting it will allow us to simplify the layer tree code in https://github.com/flutter/engine/pull/41559
2023-05-02 16:03:56 +00:00
Bruno Leroux
e435b1ae26
Add debugPrintKeyboardEvents flag (#125629)
## Description

This PR adds a new debug flag named `debugPrintKeyboardEvents` to help debugging keyboard issues.

Keyboard code has some useful asserts but sometimes an assertion failure is related to the handling of previous key events. This debug flag will help understanding the flow of key events which leads to an assertion failure.

## Related Issue

Fixes https://github.com/flutter/flutter/issues/125627

## Tests

Adds 1 test.
2023-05-02 15:15:07 +00:00
Casey Rogers
4d86f5d00d
Make future and stream required arguments in their respective builder widgets (#125838)
cc'ing existing conversation participants: @domesticmouse @srawlins
cc'ing to request review: @goderbauer 

This PR makes the following constructor arguments required:
1. `FutureBuilder.future`
2. `StreamBuilderBase.stream`
3. `StreamBuilder.stream`

This fixes:
https://github.com/flutter/flutter/issues/83081
https://github.com/flutter/flutter/issues/125188 (dupe of 83081)

This obviates:
https://github.com/dart-lang/linter/issues/4309
(I suggest we skip straight to merging this PR as this should be a low impact breaking change-assuming few to no devs are intentionally using the builders without their relevant arguments, however we could always merge 4309 first and then this)
https://github.com/flutter/flutter/pull/83101 
(The above PR required that at least one of future and initial data be non-null, this is undesirable as there are plenty of valid reasons to have both arguments be null)

See above issues for a deeper dive, but here is a summary:
It is very easy for a developer to forget to specify `future` or `stream` when using the respective `*Builder` widgets. This produces a non-obvious failure where the UI sits in a "no data yet received" state. It is easy for a dev to misinterpret this as the async work backing the future/stream hanging and they thus waste a lot of time trying to debug the async work.
As such, we should require these two constructor arguments to make it impossible/much harder for devs to make this time-wasting mistake.

This is a breaking change. However, it should break only a small number of active projects given that using a builder without specifying `future` or `stream` seems highly niche.
The only place I've found non-accidental examples of this is in widget tests where you're calling `pumpWidget` with and without these arguments to test `*Builder.didUpdateWidget`'s behavior. In this and similar cases, it is a trivial fix to add `future: null`/`stream: null`.

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2023-05-02 08:03:02 +00:00
Taha Tesser
a732a74888
Introduce TabBar.tabAlignment (#125036)
fixes https://github.com/flutter/flutter/issues/124195

This introduces `TabBar.tabAlignment` while keeping the default alignment for both M2 and M3.
2023-05-01 16:59:55 +00:00
Viren Khatri
293715a6a4
add support to customize Slider interacivity (#121483)
design doc: https://docs.flutter.dev/go/permissible-slider-interaction

closes #113370

open questions:
  - No, as `SliderInteraction.none` doesn't exist anymore.
  - Yes (done)
  - Yes.
    - SliderInteraction
    - SliderAction
    - Slider.allowedInteraction
    - Slider.permissibleInteraction
    - Slider.interaction
    - Slider.allowedAction
    - Slider.permittedAction
2023-05-01 16:42:05 +00:00
Dan Field
e1e8ad8038
Fix crasher in DragableScrollableSheet when controller is animating and switching widgets (#125721)
We were failing to dispose of animation controllers created by `animateTo` when `didUpdateWidget` happens and we null out the `_attachedController`. This would cause the listener added here to fail on a null assertion:

fef41cfce0/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart (L135)

Without the code change, the test ends up throwing exceptions related to that line. I don't have a great way to verify what this does visually though, hoping for help on that from internal customer.

b/279930163

See cl/527868355 as well.

Fixes https://github.com/flutter/flutter/issues/125709
2023-04-29 05:38:08 +00:00
Tae Hyung Kim
1a0b03cb25
Sliver Cross Axis Group (#123862)
This widget implements the ability to place slivers side by side in a single ScrollView so that they scroll together. The design document for `SliverCrossAxisGroup` can be found [here](https://docs.google.com/document/d/1e2bdLSYV_Dq2h8aHpF8mda67aOmZocPiMyjCcTTZhTg/edit?resourcekey=0-Xj2X2XA3CAFae22Sv3hAiA).

Fixes #56756.
2023-04-28 23:41:58 +00:00
Bruno Leroux
af050d95ae
Add a channel to query the engine keyboard state (#122885)
## Description

This PR adds a new channel to query the engine keyboard state.
See https://github.com/flutter/flutter/issues/87391#issuecomment-1228975571 for motivation. 

## Related Issue

Framework side implementation for https://github.com/flutter/flutter/issues/87391.

Once approved the framework will try to query the initial keyboard state from the engine. PRs will be needed on the engine side to answer the framework query.

## Tests

Adds 1 test.
2023-04-28 21:05:20 +00:00
Qun Cheng
a433f88d16
Checkbox.fillColor should be applied to checkbox's background color when it is unchecked. (#125643) 2023-04-28 12:05:31 -07:00
fzyzcjy
00bbf5434c
Allow users to provide route settings to showMenu (#124935)
Background: I am adding logging to things like dialogs, bottom sheets and menus. Then I realized that, showMenu does not allow users to provide RouteSettings, while showDialog and showModalBottomSheet both allow. Therefore, IMHO a consistent API design may need to add this to showMenu.

I will add tests if this proposal looks OK :)
2023-04-28 15:21:54 +00:00
arvin
f87d208742
fix RangeSlider, with no overlayShape shifts to the left (#125483) 2023-04-28 09:24:49 -05:00
Taha Tesser
18e36dcb5d
Fix SnackBar material clip (#125622)
fixes https://github.com/flutter/flutter/issues/125619

### Before

![Screenshot 2023-04-27 at 14 08 05](https://user-images.githubusercontent.com/48603081/234853490-0a9c4e18-20aa-40f7-a6b0-efb278f515eb.png)

### After

![Screenshot 2023-04-27 at 14 00 44](https://user-images.githubusercontent.com/48603081/234853470-c69c20d3-124d-438a-9312-2d17492c5606.png)
2023-04-27 16:48:27 +00:00
Pierre-Louis
1f602cb6ca
Provide default constraints for M3 bottom sheets (#120065)
This PR constrains M3 bottom sheets to 640dp max width by default.
`constraints` can be used to provide different `minWidth` and
`maxWidth`.

This is not a breaking change per the breaking change policy.

Part of https://github.com/flutter/flutter/issues/118619
Part of https://github.com/flutter/flutter/issues/111448

## 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.
- [x] 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
2023-04-27 09:28:11 +02:00
chunhtai
ef82f97fc0
Adds selected semantics flag to radio button for Apple devices (#125499)
fixes https://github.com/flutter/flutter/issues/125495

The iOS will announce 'Selected, \<label\>, button' for selected radio button after this change
2023-04-25 21:11:15 +00:00
Srujan Gaddam
829a2d07ce
Relabel JSFunction as JSExportedDartFunction (#125453)
toDart exists on the latter, not the former.

Fixing https://github.com/flutter/flutter/pull/125220.

## 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.
- [x] 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.
2023-04-25 12:19:33 -07:00
Justin McCandless
85ec874260
iOS TextField spell check style (#125432)
When using a Material TextField on iOS, the spell check selection style now defaults to the red iOS-style, not Android's blue.
2023-04-25 11:33:45 -07:00
Taha Tesser
6e1d4f9fc6
Fix SliverAppBar.medium & SliverAppBar.large text scale (#125038)
fixes https://github.com/flutter/flutter/issues/114340

<details> 
<summary>code sample</summary> 

```dart
import 'package:flutter/material.dart';

/// Flutter code sample for [SliverAppBar.medium].

void main() {
  runApp(const AppBarMediumApp());
}

class AppBarMediumApp extends StatelessWidget {
  const AppBarMediumApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        useMaterial3: true,
      ),
      home: MediaQuery(
        data: MediaQuery.of(context).copyWith(textScaleFactor: 3.0),
        child: Material(
          child: CustomScrollView(
            slivers: <Widget>[
              SliverAppBar.medium(
                leading:
                    IconButton(icon: const Icon(Icons.menu), onPressed: () {}),
                title: const Text('Medium App Bar'),
                actions: <Widget>[
                  IconButton(icon: const Icon(Icons.more_vert), onPressed: () {}),
                ],
              ),
              // SliverAppBar.large(
              //   leading:
              //       IconButton(icon: const Icon(Icons.menu), onPressed: () {}),
              //   title: const Text('Large App Bar'),
              //   actions: <Widget>[
              //     IconButton(
              //         icon: const Icon(Icons.more_vert), onPressed: () {}),
              //   ],
              // ),
              // Just some content big enough to have something to scroll.
              SliverToBoxAdapter(
                child: Card(
                  child: SizedBox(
                    height: 1200,
                    child: Padding(
                      padding: const EdgeInsets.fromLTRB(8, 100, 8, 100),
                      child: Text(
                        'Here be scrolling content...',
                        style: Theme.of(context).textTheme.headlineSmall,
                      ),
                    ),
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

``` 
	
</details>

### Before
|  Medium App Bar - `textScaleFactor: 3.0` |   Large App Bar - `textScaleFactor.30` |
| --------------- | --------------- |
| <img src="https://user-images.githubusercontent.com/48603081/232815191-ab42523b-d710-4c93-a889-e9c92ca472c8.png" height="450" /> | <img src="https://user-images.githubusercontent.com/48603081/232815232-104c208d-f1dd-404e-9218-5dfb61244d56.png" height="450" /> |

### After
|  Medium App Bar - `textScaleFactor: 3.0` |   Large App Bar - `textScaleFactor.30` |
| --------------- | --------------- |
| <img src="https://user-images.githubusercontent.com/48603081/232815733-8b8af94f-197f-427a-bbb9-bc6cd0173658.png" height="450" /> | <img src="https://user-images.githubusercontent.com/48603081/232815758-2c336d14-085b-4e91-8b93-748a40822ea6.png" height="450" /> |
2023-04-25 08:27:24 +00:00
Tirth
9525934ed3
[date_picker] [date_range_picker] add properties to change switch-to icons (#124881) 2023-04-24 16:20:21 -07:00
Tae Hyung Kim
482d1aaf13
Sliver Constrained Cross Axis (#125239)
Reimplements what we reverted here: #125233.
2023-04-24 23:17:36 +00:00
Bernardo Ferrari
9e9ac77dea
Add borderRadius to LinearProgressIndicator (#123517)
Split from https://github.com/flutter/flutter/pull/122664 so it gets easier to review, as this is now unrelated to the `preferRound`. I'm one step from adding a width attribute, lol.

<img width="474" alt="image" src="https://user-images.githubusercontent.com/351125/226083798-71e529e9-4ae9-41de-a500-0412b989a273.png">

cc @Piinks
2023-04-24 22:43:05 +00:00
Srujan Gaddam
aa5bb7d92e
Fix JS types in _test_http_request.dart (#125220)
Types are being reified in the JS backends, so these need to be
addressed. Fixes two issues:

- @staticInterop types need to be casted to JS types
- JS functions need to be cast to JSFunction before conversion

Enables landing of https://dart-review.googlesource.com/c/sdk/+/295105.

## 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.
- [X] 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.
2023-04-24 14:48:27 -07:00
Taha Tesser
38c7c2fe93
Fix OutlinedButton, TextButton, and IconButton throw exception when passing only one cursor to styleFrom (#125204)
fixes https://github.com/flutter/flutter/issues/118071
2023-04-24 21:41:06 +00:00
Renzo Olivares
1a51dc2131
Fix iOS touch drag behavior (#125169)
Before this change on a quick touch drag the cursor, where the touch is not on the previous collapsed selection, the cursor would move to the tapped position.

After this change on a quick touch drag the cursor does not move unless the touch is on the previously collapsed selection. This is inline with native behavior.

Before|After|Native
--|--|--
<video src="https://user-images.githubusercontent.com/948037/233224775-f33b42b5-5638-416c-9278-39ecd964e3bb.mov" />|<video src="https://user-images.githubusercontent.com/948037/233224760-2d1af657-8d99-45fc-8499-9567f17d533e.mov" />|<video src="https://user-images.githubusercontent.com/948037/233224790-f5997cfa-7370-4891-8952-11ef8057a729.mov" />
2023-04-24 19:25:21 +00:00
chunhtai
3b4ac4d5cc
Implement url support for RouteInformation and didPushRouteInformation (#119968)
Related https://github.com/flutter/flutter/issues/100624

The goal is to make sure the engine can send a location string in either the existing format or a complete uri string to the framework, and the framework will still work as usual.
2023-04-24 18:33:24 +00:00
Justin McCandless
98aaf00a09
Fix the position of the Android-style spell check toolbar (#124897)
The spell check menu now appears directly below the misspelled word on Android.
2023-04-24 10:26:47 -07:00
Callum Moffat
e84daf3b70
Adjust selection rects inclusion criteria (#125022)
Include rects with any overlap instead of only when top-left or bottom-right included. The previous criteria didn't send any selection rects when text was taller than the text box and scroll offset was not zero.

Part of #30476
2023-04-22 01:40:20 +00:00
Luccas Clezar
f86b9220a3
Update Cupertino desktop text selection toolbar (#121829)
Visual fidelity of the right-click context menu on MacOS.
2023-04-21 16:03:34 -07:00