22418 Commits

Author SHA1 Message Date
Ian Hickson
b417812547
Roll dependencies (#139203)
Removes video_player and scoped_model pins, rolls everything else to latest.
2023-11-29 20:12:59 +00:00
yakagami
443d8617f7
add sourceTimeStamp to ScaleUpdateDetails (#135936)
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` (54fa255432/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.
2023-11-29 20:09:21 +00:00
Greg Spencer
6295289163
Remove deprecated PlatformMenuBar.body (#138509)
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
2023-11-29 18:13:50 +00:00
Elias Yishak
60d5c8abc5
Migration for the sendTiming events for package:unified_analytics (#138896)
Related to tracker issue:
- https://github.com/flutter/flutter/issues/128251

<img width="278" alt="image" src="https://github.com/flutter/flutter/assets/42216813/cee7b9be-48d6-48e5-8c39-de28d0a1f0de">

The image above shows all of the instances where we have `sendTiming`. All of the call sites have been updated to use the new `Event.timing` event from `package:unified_analytics`.
2023-11-29 17:42:52 +00:00
Kate Lovett
8ba459ce9f
Update VelocityTracker (4) (#139166)
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
2023-11-29 14:59:13 +00:00
Kate Lovett
133711ba9a
Analyze against using Stopwatches in the framework (#138507) 2023-11-29 08:49:35 -06:00
Fré Dumazy
1d4d002592
Improve documentation of CardTheme.shape (#139096)
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
2023-11-29 09:54:59 +00:00
Ian Hickson
5e216d44ca
Simplify devicelab logic and fix tests (#139122)
- fix https://github.com/flutter/flutter/issues/53707 by having the test not expect a timeout but instead actually look for the retry message
- simplify the `--task` option to only accept task names rather than also accepting paths
- remove some obsolete options that referred to the manifest which no longer seems to exist
2023-11-29 08:41:27 +00:00
Veli Bacik
c5328650f1
implemented leadingWidth and automaticallyImplyLeading options (#136165)
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
2023-11-29 08:29:06 +00:00
Renzo Olivares
178130b169
TextField and TextFormField can use a MaterialStatesController (#133977)
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
2023-11-29 08:25:20 +00:00
Mateus Felipe C. C. Pinto
49632fc374
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
2023-11-29 07:44:21 +00:00
LongCatIsLooong
075b9f763f
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`.
2023-11-29 07:05:42 +00:00
Gregor Zurowski
352a06018f
Fix comment (#138973)
A documentation tiny fix of the comment for `WidgetsBindingObserver`.
2023-11-28 23:27:40 +00:00
yim
f3c84ce20f
Added some documentation for OverlayPortal (#138934)
Fixes: #138836 

Adds some comments to OverlayPortal to clarify its behavior.
2023-11-28 23:22:24 +00:00
Gabriel Tavares
66935a82e8
feature(table-widget): Added intrinsicHeight to TableCellVerticalAlignment enum. (#130264)
**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
2023-11-28 23:13:09 +00:00
LongCatIsLooong
f2b74725c5
Ensure Icon vertically centers its icon glyph. (#138937)
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.
2023-11-28 21:24:28 +00:00
Tirth
18b239fbde
Added keyboardType & textInputAction props to SearchBar, SearchAnchor & SearchAnchor.bar (#138553)
Added `keyboardType` & `textInputAction` props to `SearchBar`, `SearchAnchor` & `SearchAnchor.bar`

Fixes #138483
2023-11-28 18:38:55 +00:00
Jim Kalafut
89edac4041
Fix header formatting typo in PopupMenuButton docs (#139084)
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
```
2023-11-28 18:01:07 +00:00
Kate Lovett
92ad558e25
Fix turbulence seed for all tests with ink sparkles (#138757)
Fixes https://github.com/flutter/flutter/issues/138753

This makes sure that InkSparkles are always fixed for testing rather than random.
2023-11-28 17:59:19 +00:00
Bruno Leroux
a28f4e3a6c
Fix textScalerOf and maybeTextScalerOf documentations (#139123)
## 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
2023-11-28 08:57:04 +00:00
neko-andrew
ad62645fce
Fix intrinsic width of input decorator (#138074)
Fix min intrinsic width of input decorator by removing left or right padding when `prefixIcon` or `suffixIcon` are used.

Fixes #137937.
2023-11-28 05:20:07 +00:00
hangyu
8d42987771
Record focus in route entry to move a11y focus to the last focused item (#135771)
issue: #97747 
engine pr:https://github.com/flutter/engine/pull/47114
2023-11-27 23:54:50 +00:00
Kallen Tu
4727627b49
Bump DartDoc to 8.0.0 (#139088)
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
2023-11-27 15:33:07 -08:00
Christopher Fujino
6bf3ccd47d
[flutter_tools] fix instructions to disable CLI animations (#139094)
Fixes https://github.com/flutter/flutter/issues/139011
2023-11-27 22:00:50 +00:00
Taha Tesser
397fd25be1
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)
2023-11-27 21:02:35 +00:00
Andrew Kolos
1952a6c8a1
Add type validation to non-template .arb file parsing logic (#139035)
Resolves https://github.com/flutter/flutter/issues/138297. 

When reading from a .arb file (which contains localizations of strings in the form of a user-defined JSON string-string map), validate the type of values that we read.

See [this comment of mine on #138297](https://github.com/flutter/flutter/issues/138297#issuecomment-1827043260) to see how I arrived at this fix.
2023-11-27 20:50:24 +00:00
Bartek Pacia
e8282edf4d
Update Android app project template to apply Kotlin Gradle plugin declaratively (#139006)
This PR updates the app templates generated by `flutter create` to use declarative `plugins {}` syntax for applying the Kotlin Gradle Plugin.

I realized this is missing while writing [#9857.](https://github.com/flutter/website/pull/9857)
2023-11-27 20:50:21 +00:00
Michael Goderbauer
9147a1c1b8
Prepare for dynamically sized views - pt. 2 (#139079)
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).
2023-11-27 19:06:00 +00:00
Michael Goderbauer
bf5d2b875f
Prepare for dynamically sized views (#138565)
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.**
2023-11-27 17:41:22 +00:00
stuartmorgan
d628a6ff97
Give an actionable error message when a Pod requires a higher minimum OS version (#138097)
Checks `pod install` output for the case where a pod requires a higher minimum OS deployment target version than the app is set to use, and attempts to turn it into a more actionable error message. This isn't foolproof since we are parsing the Ruby rather than actually executing it, but I would expect that the vast majority of cases would end up in the most useful version (and even those that don't are still much clearer with this as the final error message text than without it).

Fixes https://github.com/flutter/flutter/issues/113762
2023-11-27 16:22:54 +00:00
Reid Baker
311193d3f1
Edge case on flutter/flutter/issues/135402 with test (#138814)
fixes flutter/flutter/issues/135402
Edge case that was reported by a user along with a test case specifically covering their output.
2023-11-27 16:14:58 +00:00
Christopher Fujino
4c978efead
[flutter_tools] Fix bad state future already completed in flutter logs (#138517)
Fixes https://github.com/flutter/flutter/issues/138436
2023-11-23 19:56:14 +00:00
chunhtai
d92d2c12b2
Fix SliverGrid garbage collection issue (#138915)
The code doesn't consider indices of children may not be continuous after rebuild.

fixes https://github.com/flutter/flutter/issues/138749
2023-11-23 19:47:36 +00:00
Yegor
14549b3889
make FakeView not send Scene and semantics to the engine (#138849)
`FakeView` wraps the same underlying `FlutterView`. Sending semantics updates and Scene objects from multiple fake views into the same engine `FlutterView` violates contracts with the engine. This PR stubs out `render` and `updateSemantics` methods in `FakeView` classes to prevent that.

This unblocks https://github.com/flutter/engine/pull/48251, which implements multi-view semantics for web.
2023-11-22 20:48:20 +00:00
Qun Cheng
c7d4b32fdd
Update the default outline color for OutlinedButton (#138768)
Fix b/311343182

This is to update the default outline for `OutlinedButton`. When the button is focused, the outline color should be primary color.
2023-11-22 20:16:37 +00:00
Elias Yishak
48187028c1
Add commandHasTerminal parameter + apple usage event + sendException events for package:unified_analytics (#138806)
Relates to tracker issue:
- https://github.com/flutter/flutter/issues/128251

This PR includes 3 major updates:
- Adding the `commandHasTerminal` parameter for `Event.flutterCommandResult`
  - In `packages/flutter_tools/lib/src/runner/flutter_command.dart`
- Adding the new event for `sendException` from package:usage to be `Event.exception` (this event can be used by all dash tools)
  - In `packages/flutter_tools/lib/runner.dart`
- Migrating the generic `UsageEvent` which was only used for Apple related workflows for iOS and macOS. I did an initial analysis in this [sheet](https://docs.google.com/spreadsheets/d/11KJLkHXFpECMX7tw-trNkYSr5MHDG15XNGv6TgLjfQs/edit?resourcekey=0-j4qdvsOEEg3wQW79YlY1-g#gid=0) to identify all the call sites
  - Found in several files, highlighted in the sheet above
2023-11-22 12:25:10 +00:00
Jackson Gardner
b186c69684
Revert "Reland VelocityTracker update (again)" (#138863)
Reverts flutter/flutter#138843

This has broken the Mac_ios microbenchmarks_ios. Example failure:
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20microbenchmarks_ios/9339/overview
2023-11-21 19:17:46 -08:00
Andrew Kolos
cf09a8a24f
In flutter doctor -v, when JRE is too out-of-date to run sdkmanager, print a helpful error message (#138762)
Closes https://github.com/flutter/flutter/issues/138132. See this issue for more information.
2023-11-21 23:16:08 +00:00
Kate Lovett
3e4e280914
Reland VelocityTracker update (again) (#138843)
This updates the implementation to use the stopwatch from the Clock object and piping it through to the TestWidgetsFlutterBinding so it will be kept in sync with FakeAsync.

Relands https://github.com/flutter/flutter/pull/137381 which attempted to reland #132291
Fixes https://github.com/flutter/flutter/issues/97761

The original change was reverted due to flakiness it introduced in tests that use fling gestures.
* https://github.com/flutter/flutter/issues/135728

It was reverted again due to a change in the leak tracking tests that broke it.
2023-11-21 22:21:22 +00:00
Taha Tesser
ccc3622e17
Fix M3 Tabs Specs links (#138808)
fixes [Material 3 Tab Specs links are broken/outdated ](https://github.com/flutter/flutter/issues/138805)
2023-11-21 21:46:07 +00:00
Taha Tesser
e6d43ac6d4
Fix Chips with Tooltip throw an assertion when enabling or disabling (#138799)
fixes [Enabling or disabling a `Chip`/`RawChip` with a tooltip throws an exception](https://github.com/flutter/flutter/issues/138287) 

### 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) {
    bool isEnabled = true;

    return MaterialApp(
      home: Material(
        child: Center(
          child: StatefulBuilder(
              builder: (BuildContext context, StateSetter setState) {
            return Column(
              mainAxisSize: MainAxisSize.min,
              children: [
                RawChip(
                  tooltip: 'This is a tooltip',
                  isEnabled: isEnabled,
                  label: const Text('RawChip'),
                  onPressed: isEnabled ? () {} : null,
                ),
                const SizedBox(height: 20),
                ElevatedButton(
                  onPressed: () {
                    setState(() {
                      isEnabled = !isEnabled;
                    });
                  },
                  child: Text('${isEnabled ? 'Disable' : 'Enable'} Chip'),
                )
              ],
            );
          }),
        ),
      ),
    );
  }
}
```

</details>
2023-11-21 17:00:06 +00:00
Mahdi Bagheri
1dafa400af
Added Features requested in #137530 (#137532)
This PR will add new parameters to `ExpansionTile` widget to manage `dense`, `visualDensity` and `enableFeedback` of the main ListTile.

Solves #137530 

It is not a breaking change.
2023-11-20 23:50:49 +00:00
Taha Tesser
fc917c7184
[Reland] Introduce AnimationStyle (#138721)
This PR introduces `AnimationStyle`, it is used to override default
animation curves and durations in several widgets.

fixes [Add the ability to customize MaterialApp theme animation
duration](https://github.com/flutter/flutter/issues/78372)
fixes [Allow customization of showMenu transition animation curves and
duration](https://github.com/flutter/flutter/issues/135638)
fixes [`AnimationStyle.noAnimation` needs to replace `AnimatedTheme`
with just `Theme` in the
`MaterialApp`](https://github.com/flutter/flutter/issues/138618)

Here is an example where popup menu curve and transition duration is
overridden:

```dart
          popUpAnimationStyle: AnimationStyle(
            curve: Easing.emphasizedAccelerate,
            duration: Durations.medium4,
          ),
```

Set `AnimationStyle.noAnimation` to disable animation.
```dart
    return MaterialApp(
      themeAnimationStyle: AnimationStyle.noAnimation,
```

## 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-11-20 15:24:41 -08:00
Bruno Leroux
1a9e866f69
Reland update bottom navigation bar test for m3 (#137998)
This is a reland of https://github.com/flutter/flutter/pull/136624 which was reverted because one new M3 golden test failed. The failure was related to the ink sparkle animation.

Ink sparkle is the M3 default animation, it does not play well with golden because it introduces an element of randomness.
One way to avoid this randomness is to use the `InkSparkle.constantTurbulenceSeedSplashFactory`.

This PR has two commits:
- the first one is the original PR (https://github.com/flutter/flutter/pull/136624).
- the second one updates the failing test using `InkSparkle.constantTurbulenceSeedSplashFactory`.
2023-11-20 22:18:38 +00:00
Victoria Ashworth
e826c63aec
Fix file deletion crash in BuildIOSArchiveCommand.runCommand (#138734)
Fixes https://github.com/flutter/flutter/issues/138030
2023-11-20 19:25:17 +00:00
Parker Lougheed
096cdc39a9
Update links and surrounding text for new main-api docs (#138602)
Issue reference: https://github.com/flutter/flutter/issues/133877
2023-11-17 22:27:53 +00:00
林洵锋
3c80df5040
Fix NoSplash not being disposed (#138542)
Fix https://github.com/flutter/flutter/issues/136441
2023-11-17 18:50:33 +00:00
auto-submit[bot]
0135a3310a
Reverts "Introduce AnimationStyle" (#138628)
Reverts flutter/flutter#137945
Initiated by: HansMuller
This change reverts the following previous change:
Original Description:
This PR introduces `AnimationStyle`, it is used to override default animation curves and durations in several widgets.

fixes  [Add the ability to customize MaterialApp theme animation duration](https://github.com/flutter/flutter/issues/78372)
fixes [Allow customization of showMenu transition animation curves and duration](https://github.com/flutter/flutter/issues/135638)

Here is an example where popup menu curve and transition duration is overriden:

```dart
          popUpAnimationStyle: AnimationStyle(
            curve: Easing.emphasizedAccelerate,
            duration: Durations.medium4,
          ),
```

Set `AnimationStyle.noAnimation` to disable animation.
```dart
    return MaterialApp(
      themeAnimationStyle: AnimationStyle.noAnimation,
```
2023-11-17 16:59:19 +00:00
Victor Eronmosele
e9de448420
Enable flutter screenshot outside Flutter project directory (#138160)
This PR enables the `flutter screenshot` to work outside a Flutter project. 

This works by enabling `ScreenshotCommand` to find target devices not supported by the project. 

Before: 
```bash
$ cd $HOME # not a Flutter directory

$ flutter screenshot

No devices found yet. Checking for wireless devices...

No supported devices connected.

The following devices were found, but are not supported by this project:
sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64  • Android 13 (API 33) (emulator)
macOS (desktop)             • macos         • darwin-arm64   • macOS 13.3.1 22E772610a darwin-arm64
Chrome (web)                • chrome        • web-javascript • Google Chrome 119.0.6045.105
If you would like your app to run on android or macos or web, consider running `flutter create .` to generate projects for these platforms.
Must have a connected device for screenshot type device
```

After: 

```bash
$ cd $HOME # not a Flutter directory

$ flutter_source screenshot

Screenshot written to flutter_01.png (313kB).
```

Fixes #115790
2023-11-17 01:08:13 +00:00
chunhtai
d8a5f3d11b
Improves output file path logic in Android analyze (#136981) 2023-11-16 22:59:02 +00:00