Commit Graph

23822 Commits

Author SHA1 Message Date
Loïc Sharma
ebfaa45c7d [Windows] Improve symlink ERROR_ACCESS_DENIED error message (#154030)
Currently, if creating a symlink on Windows fails due to `ERROR_ACCESS_DENIED`, you'll get an error message like:

```
Error: ERROR_ACCESS_DENIED file system exception thrown while trying to create a symlink from source to dest
```

The `source` and `dest` paths are incorrect.

This will help us debug: https://github.com/flutter/flutter/issues/153758
2024-08-26 17:52:11 +00:00
Lau Ching Jun
9032717eac Add ability to provide selectableDayPredicate for showDateRangePicker (#154090)
This PR is a reland of #150355

The PR was reverted due to a failing test, but it was later determined that the test was flaky.
2024-08-26 17:52:08 +00:00
auto-submit[bot]
a7eaca934d Reverts "Add ability to provide selectableDayPredicate for showDateRangePicker (#150355)" (#154089)
Reverts: flutter/flutter#150355
Initiated by: chingjun
Reason for reverting: this is breaking an internal test.
Original PR Author: Chuckame

Reviewed By: {victorsanni, MitchellGoodwin}

This change reverts the following previous change:
- Closes #63973
- Now able to provide a `selectableDayPredicate`
- No breaking change (same behavior as before if not set)
- Reuse the same feature as the DatePicker: non-selectable days are greyed and not clickable
- Reuse the same error message as if the user set a wrong date range
- Made public `CalendarDateRangePicker`, actually the same for `CalendarDatePicker`, to allow using the range picker outside the `showDateRangePicker` bottom sheet modal

## Examples
- Disable days after the next non selectable day when start day has been selected

https://github.com/flutter/flutter/assets/16419143/2a2be325-1e2f-470c-8b17-b4ed5b2ad43e

- Select a range including non-selectable days

<img width="363" alt="image" src="https://github.com/flutter/flutter/assets/16419143/21e32def-46f0-41d6-974f-281a0405e28e">
2024-08-26 04:33:30 +00:00
Chuckame
950af9515a Add ability to provide selectableDayPredicate for showDateRangePicker (#150355)
- Closes #63973
- Now able to provide a `selectableDayPredicate`
- No breaking change (same behavior as before if not set)
- Reuse the same feature as the DatePicker: non-selectable days are greyed and not clickable
- Reuse the same error message as if the user set a wrong date range
- Made public `CalendarDateRangePicker`, actually the same for `CalendarDatePicker`, to allow using the range picker outside the `showDateRangePicker` bottom sheet modal

## Examples
- Disable days after the next non selectable day when start day has been selected

https://github.com/flutter/flutter/assets/16419143/2a2be325-1e2f-470c-8b17-b4ed5b2ad43e

- Select a range including non-selectable days

<img width="363" alt="image" src="https://github.com/flutter/flutter/assets/16419143/21e32def-46f0-41d6-974f-281a0405e28e">
2024-08-25 20:14:06 +00:00
Chris Bracken
11ab37ee81 macOS: Copy macOS framwork dSYM into build outputs (#153975)
As of Xcode 16, App Store validation now requires that apps uploaded to the App store bundle dSYM debug information bundles for each Framework they embed.

dSYM bundles are packaged in the FlutterMacOS.xcframework shipped in the `darwin-x64-release` tools archive as of engine patches:
* https://github.com/flutter/engine/pull/54696

This copies the FlutterMacOS.framework.dSYM bundle from the tools cache to the build outputs produced by `flutter build macOS`.

Fixes: https://github.com/flutter/flutter/issues/153879
2024-08-24 00:14:15 +00:00
flutter-pub-roller-bot
53805d5ba9 Roll pub packages (#154026)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-23 21:46:04 +00:00
yim
37ba70cef5 Fix Cupertino route animation. (#153765)
Fixes: #48225 
Fixes: #73026 
Fixes: #62848

After some research, I found that the issue might simply be that our animation curve is too steep, causing the animation to continue while the page visually appears very close to popping. This PR modifies the animation curve and duration after the drag gesture is released (iOS native animation duration is not related to swipe distance). I recorded a video comparing the curves. From top to bottom, the video shows the iOS native curve, the curve modified by this PR, and the original curve. The animation duration is slowed down by 10 times.

1/2

https://github.com/user-attachments/assets/77d0a782-b56d-431b-b925-8ff4e825c14a

1/4

https://github.com/user-attachments/assets/a4c50219-e86d-4cce-8a92-b266eb6260a8

forward  1/2

https://github.com/user-attachments/assets/067fffc2-203b-4686-ba4c-3b61a2c98cf8

forward  1/4

https://github.com/user-attachments/assets/c1ae938f-76ab-42f8-a832-d2d0e6c0758d
2024-08-23 20:45:22 +00:00
Pavlo Kochylo
a4b0d973fb Added new constructor RefreshIndicator.noSpinner() (#152075)
This PR adds a new constructor to the RefreshIndicator's class, which is `noSpinner`.
The purpose of this new constructor is to create a RefreshIndicator that doesn't show a spinner when the user arms it by pulling.

The work is based on a partial that is here: https://github.com/flutter/flutter/pull/133507

I addressed the following issues reported in the PR above:
- in the example for `noSpinner`, arming the RefreshIndicator now shows a CircularProgressIndicator, instead of just printing text to the console;
- added a test for the new example;
- added a doc comment on the new constructor;

Fixes https://github.com/flutter/flutter/issues/132775
2024-08-23 20:37:24 +00:00
Matan Lurey
5e194383af Add a test of an Android platform view that draws a gradient (#153878)
Closes https://github.com/flutter/flutter/issues/152376.

The gradient, for posterity, looks like this:

<img src="https://github.com/user-attachments/assets/bed9599a-4e16-499c-af79-b51980095e89" width="150">

Let's see if CI agrees!

/cc @johnmccutchan
2024-08-23 18:25:40 +00:00
Andrew Kolos
327193af9a override Analytics in TestBed defaults (#153990)
Fixes https://github.com/flutter/flutter/issues/150663
2024-08-23 18:13:10 +00:00
chunhtai
dde2328185 Android analyze command should run pub (#153953)
The android command will build the android project partially and thus will need to run pub
2024-08-23 17:57:07 +00:00
Taha Tesser
d7b092e42d Fix TimePicker hour and minute inputs are resized on error (#154008)
Fixes [Defining inputDecorationTheme in TimePickerThemeData Causes Misalignment of Hour and Minute Input Boxes](https://github.com/flutter/flutter/issues/153549)

### 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(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        timePickerTheme: const TimePickerThemeData(
          inputDecorationTheme: InputDecorationTheme(),
        ),
      ),
      home: Scaffold(
        body: Center(
          child: Builder(builder: (BuildContext context) {
            return ElevatedButton(
              onPressed: () async {
                await showTimePicker(
                  context: context,
                  initialEntryMode: TimePickerEntryMode.input,
                  initialTime: TimeOfDay.now(),
                );
              },
              child: const Text('Show Time Picker'),
            );
          }),
        ),
      ),
    );
  }
}

```

</details>

### Before

<img width="578" alt="Screenshot 2024-08-23 at 16 49 25" src="https://github.com/user-attachments/assets/f5da2495-551e-4110-85ea-120323cd38d2">

### After

<img width="578" alt="Screenshot 2024-08-23 at 16 51 03" src="https://github.com/user-attachments/assets/80224a10-e9d2-46d1-b2eb-f16358699744">
2024-08-23 17:15:36 +00:00
Gray Mackall
b2de4dfc2b Re-land "Ensure flutter build apk --release optimizes+shrinks platform code" (#153868)
Re-lands https://github.com/flutter/flutter/pull/136880, fixes https://github.com/flutter/flutter/issues/136879.

Additions to/things that are different from the original PR:
- Adds an entry to `gradle_errors.dart` that tells people when they run into the R8 bug because of using AGP 7.3.0 (https://issuetracker.google.com/issues/242308990).
- Previous PR moved templates off of AGP 7.3.0.
- Packages repo has been moved off AGP 7.3.0 (https://github.com/flutter/packages/pull/7432).

Also, unrelatedly:
- Deletes an entry in `gradle_errors.dart` that informed people to build with `--no-shrink`. This flag [doesn't do anything](https://github.com/flutter/website/pull/11022#issuecomment-2297294421), so it can't be the solution to any error.
- Uniquely lowers the priority of the `incompatibleKotlinVersionHandler`. This is necessary because the ordering of the errors doesn't fully determine the priority of which handler we decide to use, but also the order of the log lines. The kotlin error lines often print before the other error lines, so putting it last in the list of handlers isn't sufficient to lower it to be the lowest priority handler.
2024-08-23 16:44:08 +00:00
Bruno Leroux
402ed6c503 Fix DropdownMenu focus traversal (#153931)
## Description

This PR fixes `DropdownMenu` focus traversal.

Before this PR, if a `DropdownMenu` contains several items, the 'tab' key had to be pressed many times before the focus move to the inner text field.

This fix is based on https://github.com/flutter/flutter/issues/131120#issuecomment-1654233358.

## Related Issue

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

## Tests

Adds 1 test.
2024-08-23 07:57:08 +00:00
Greg Spencer
aa934ac119 Fix broken macro reference (#153881)
## Description

This fixes a bogus macro reference.  It's in the doc comment for a private function, so it's unlikely to ever see the docs website, but still, it shouldn't reference a non-existent template.

## Tests
 - Doc only change.
2024-08-22 22:54:20 +00:00
PurplePolyhedron
8e50a17d94 Stop DropdownMenu internal scrolling from moving parent Scrollable (#153360)
fixes https://github.com/flutter/flutter/issues/151854
fixes #139113

The regression test uses nested `ListView` because I could not reproduce the issue without using nested `Scrollable`.

The issue is masked when there is only one `Scrollable` outside `DropdownMenu`. While `Scrollable.ensureVisible` can find all the `Scrollable`, the actual scrolling is performed by `ScrollPosition.ensureVisible` , which uses the `RenderObject` tree to find nearest Viewport but it could not find one due to `OverlayPortal` putting the target `RenderObject` at different point. So no scrolling will occur.

However when there are nested `Scrollable`, `Scrollable.ensureVisible` can scroll the outside `Scrollable` normally since no `RenderObject` tree gap exist between the two `Scrollable`
2024-08-22 21:14:22 +00:00
August
e0cd56b52b fix: A referenced default package must be a plugin package (#152134)
Clarify that a referenced default package must also be a plugin package (one, which provides a pluginClass or a dartPluginClass).

Fixes #152037
More precisely https://github.com/flutter/flutter/issues/152037#issuecomment-2239909463.
Introduced in #137040
2024-08-22 21:02:25 +00:00
Seth Ladd
1b234858f2 Update README.md to clarify who flutter-dev is for and what the trade-offs are (#153947)
*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

*List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.*

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2024-08-22 17:49:50 +00:00
RamonFarizel
ef098c2aa4 Document scale parameter for Image and RawImage (#153728)
This PR documents the scale parameter for Image and RawImage.
It adds the quote from the [Image.memory](https://main-api.flutter.dev/flutter/widgets/Image/Image.memory.html) for other constructors like: `Image.asset`, `Image.new`, `Image.network`, `Image.file` and `RawImage`

> The scale argument specifies the linear scale factor for drawing this image at its intended size and applies to both the width and the height. For example, if this is 2.0, it means that there are four image pixels for every one logical pixel, and the image's actual width and height (as given by the [dart:ui.Image.width](https://main-api.flutter.dev/flutter/dart-ui/Image/width.html) and [dart:ui.Image.height](https://main-api.flutter.dev/flutter/dart-ui/Image/height.html) properties) are double the height and width that should be used when painting the image (e.g. in the arguments given to [Canvas.drawImage](https://main-api.flutter.dev/flutter/dart-ui/Canvas/drawImage.html)).

#148623
2024-08-22 16:42:18 +00:00
Matan Lurey
a9e94d9045 Do not silently fail pub get even if output-mode is "none" (#153596)
I am making an assumption `OutputMode.none` should _really_ mean
`OutputMode.failuresOnly`, that is, if we ever get a non-zero exit code,
we still want to know why. If I've somehow misunderstood that, LMK and
I'm happy to revert this PR or make adjustments.

This fixes the bug where if you were to do:

```sh
git clone https://github.com/myuser/fork-of-flutter
cd fork-of-flutter
./bin/flutter update-packages
```

You now get:

1. An actual error message, versus no output at all.
2. A warning that a common reason is not tracking a remote, with
instructions to fix it.

Closes https://github.com/flutter/flutter/issues/148569.
2024-08-22 09:12:54 -07:00
Sigurd Meldgaard
dfdd5f80f2 Fix flutter test in workspace (#153919)
Follow-up to #153754.
2024-08-22 15:34:47 +02:00
Koji Wakamiya
7a44392f3f Remove destinations length hard limit in NavigationRail widget (#152972)
> Remove destinations length hard limit in NavigationRail.

Because of https://github.com/flutter/flutter/pull/104914#issuecomment-1318871496, a new PR was opened with some new tests ([comment](https://github.com/flutter/flutter/pull/104914#discussion_r927044117)) added.

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

Related 

* https://github.com/flutter/flutter/issues/58367
* https://github.com/flutter/flutter/pull/104914
* https://github.com/flutter/flutter/issues/104913
2024-08-22 07:25:34 +00:00
Denis Bowen
a57eb8fefc fixed issue to where screen reader reads all buttons when opening datepicker (#152705)
removed container=true property from Semantics wrapper of datepicker dialog. This prevents the screen reader from reading every button in the datepicker dialog whenever a user opens it, reducing SR noise.

Before: https://screencast.googleplex.com/cast/Njc0Mzc1MDA5MTk5NzE4NHw2NTU5ODI4YS0xNA
After: https://screencast.googleplex.com/cast/NTYxMDUwOTIxMzYzMDQ2NHxjOWQ2M2YzNy1hYQ

fixes b/345297872

NOTE: Please let me know if a test is needed for this, since it is only deleting code.
2024-08-22 03:30:22 +00:00
Renzo Olivares
f6054ae521 Fix: Deleting text in EditableText with CJK keyboard while in CupertinoPageRoute throws exception (#153822)
Fixes #153003

Pressing backspace on CJK keyboards to delete text may trigger a key event which in turns triggers the `DeleteTextIntent`. This is different than English keyboards where the updated `TextEditingValue` from the `TextInputPlugin` will come through `updateEditingValue` which allows us to hit the codepath that hides the text selection toolbar. 23883b13d4/packages/flutter/lib/src/widgets/editable_text.dart (L3245-L3250) Because CJK keyboards may not hit this codepath, when the text is long and editable text tries to bring the new selection into view by scrolling, this triggers the hide context menu scroll listener in a weird state 23883b13d4/packages/flutter/lib/src/widgets/editable_text.dart (L3865-L3869) causing an exception to be thrown.

This PR tries to work around the issue above by hiding the toolbar when a `DeleteTextIntent` is received.
2024-08-22 03:19:24 +00:00
Loïc Sharma
88d9f61d12 Add test that app builds if migrated to SwiftPM but SwiftPM is turned off (#153800)
When a Flutter app is migrated to add Swift Package Manager integration, the Xcode project is modified to depend on a local Swift package that's generated by the Flutter tool. This generated package is how plugins are added to the Xcode project if the SwiftPM feature is enabled.

If an app has been migrated to SwiftPM but Flutter's SwiftPM feature is disabled, the [tool must continue to generate a Swift package](47c1df9640/packages/flutter_tools/lib/src/macos/darwin_dependency_management.dart (L69-L78)) to ensure the app continues to build. Otherwise, the Xcode project would depend on a local package that does not exist.

This adds a high-level integration test that ensures this behavior works as expected, which mirrors this finer-grained unit test: 47c1df9640/packages/flutter_tools/test/general.shard/macos/darwin_dependency_management_test.dart (L340-L382)

Part of https://github.com/flutter/flutter/issues/153448
2024-08-21 22:18:05 +00:00
Taha Tesser
17ad052792 Make TextField read only when the text input is disabled by setting DropdownMenu.requestFocusOnTap to false (#153566)
Fixes [[DropdownMenu] Semantics still reads out "EditBox" when text editing is disabled](https://github.com/flutter/flutter/issues/151686)

### Code sample

<details>
<summary>expand to view the code sample</summary> 

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

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

enum ColorLabel {
  blue('Blue', Colors.blue),
  pink('Pink', Colors.pink),
  green('Green', Colors.green),
  yellow('Orange', Colors.orange),
  grey('Grey', Colors.grey);

  const ColorLabel(this.label, this.color);
  final String label;
  final Color color;
}

class DropdownMenuExample extends StatefulWidget {
  const DropdownMenuExample({super.key});

  @override
  State<DropdownMenuExample> createState() => _DropdownMenuExampleState();
}

class _DropdownMenuExampleState extends State<DropdownMenuExample> {
  ColorLabel? selectedColor;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: SafeArea(
          child: Padding(
            padding: const EdgeInsets.all(16.0),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              spacing: 16.0,
              children: <Widget>[
                const ExcludeSemantics(child: Text('TexField')),
                const TextField(
                  readOnly: true,
                  decoration: InputDecoration(
                    labelText: 'Color',
                    border: OutlineInputBorder(),
                  ),
                ),
                const ExcludeSemantics(child: Text('DropdownMenu')),
                DropdownMenu<ColorLabel>(
                  requestFocusOnTap: false,
                  label: const Text('Color'),
                  dropdownMenuEntries: ColorLabel.values
                      .map<DropdownMenuEntry<ColorLabel>>((ColorLabel color) {
                    return DropdownMenuEntry<ColorLabel>(
                      value: color,
                      label: color.label,
                      style: MenuItemButton.styleFrom(
                        foregroundColor: color.color,
                      ),
                    );
                  }).toList(),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

```

</details>

### Preview (with Talkback captions)
|Before | After |
| --------------- | --------------- |
| <img src="https://github.com/user-attachments/assets/0d9f79f3-de5d-4c42-adea-3d700464d001" /> | <img src="https://github.com/user-attachments/assets/cf38508e-61f7-43ff-b420-ffe24cc8e28f" /> |

### Before demo
DropdownMenu announces "EditBox" and "double tap to activate" when setting `DropdownMenu.requestFocusOnTap` to `false` shouldn't allow that

https://github.com/user-attachments/assets/f692a4f6-9d6a-4834-8df0-baf6c65fae29

### After demo
When setting `DropdownMenu.requestFocusOnTap` to `false`, the underlying `TextField` gets read only state which changes the semantics to be not editable or focusable  and remove"EditBox" and "double tap to activate" announcments

https://github.com/user-attachments/assets/0e14a636-6b81-4535-a5d1-c8f301c4f89e
2024-08-21 18:30:39 +00:00
Gray Mackall
919bed6e0a Reland "Update template/test compileSdk, targetSdk, ndk versions" (#153795)
Relands https://github.com/flutter/flutter/pull/152487.

The difference is in the two new commits:
-1354c6d77b
-931788aa5a, short version is that:
- I forgot that I need to override the compileSdkVersion in the AGP 8.0 [instance of this test](ef9cd32f5a/dev/devicelab/bin/tasks/android_java17_dependency_smoke_tests.dart (L19))
- A postsubmit integration test needed new lockfiles + the package attribute -> AGP namespace change.

These were the only two postsubmit failures: [dashboard](https://flutter-dashboard.appspot.com/#/build).
2024-08-21 18:27:00 +00:00
Kishan Rathore
b8f89f70bf docs: Update doc for scale behaviour of floating label (#151835)
In input decoration if we are showing label as floating when it is focused, it scales down to `_kFinalLabelScale` i.e. 0.75 right now, but it was not mentioned anywhere.

Resolves #151406
2024-08-21 17:56:16 +00:00
PurplePolyhedron
e13e9a08e1 Disable Dropdown menu search during keyboard navigation (#152378)
fixes https://github.com/flutter/flutter/issues/152375

PR https://github.com/flutter/flutter/pull/147294 fix keyboard navigation issue https://github.com/flutter/flutter/issues/147253 by prioritising current selection in default search.

This revert PR https://github.com/flutter/flutter/pull/147294 and fix the issue by disabling `DropdownMenu` search during keyboard navigation instead.

also fixes https://github.com/flutter/flutter/issues/151878 as it is a regression caused by PR https://github.com/flutter/flutter/pull/147294.

Reason for reverting https://github.com/flutter/flutter/pull/147294 : it doesn't fix the keyboard navigation issue if a custom searchCallback(Issue https://github.com/flutter/flutter/issues/152375) is provided, and "prioritising current selection" is ambiguous for a custom searchCallback, so it would be tricky to have searchCallback behave the same way as the default search. Additionally the original search function was agnostic about the state of `DropdownMenu` other than the entry value type, might be good to keep it that way unless needed.
2024-08-21 17:00:15 +00:00
Matan Lurey
f0a37e70e5 Add a bin/flutter-dev script, for running the flutter command-line tool from source (#153599)
Not so long ago I remember a very informal conversation that went something like this:

> @matanlurey: I wish I could pass `--dev` or something to `flutter` to run from source.
>
> @christopherfujino: I get what you want, but I don't want to overload the tool with more dev-only things. I would consider a script like `flutter-dev` that does that thing, though.
>
> @matanlurey: Cool, I might send a PR!

So uh, here it is 6-9 months later. Suggestions welcome.
2024-08-21 16:56:22 +00:00
Jason Simmons
565de5ab47 Remove unnecessary breaks in default clauses of switch statements (#153843)
See https://dart.googlesource.com/sdk.git/+/045d26bc74209f5acc6466669f89686344e83de2
2024-08-21 14:26:39 +00:00
flutter-pub-roller-bot
fbed99fd4b Roll pub packages (#153838)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-21 12:25:21 +00:00
Nate Wilson
1cbf1a4cbf _InteractiveViewerState code cleanup (#153645)
This pull request makes the interactive viewer's `TransformationController` a non-nullable value, initialized at its declaration site. (related: #153644)

It also renames a few private methods to follow the [style guide](https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md#naming-rules-for-typedefs-and-function-variables).
2024-08-21 00:52:08 +00:00
Polina Cherkasova
528a2c68da Fix leaky test. (#153798) 2024-08-20 23:14:15 +00:00
Polina Cherkasova
82b4c6eabd Fix leaky tests. (#153786) 2024-08-20 15:33:21 -07:00
auto-submit[bot]
7730f29024 Reverts "Update template/test compileSdk, targetSdk, ndk versions (#152487)" (#153793)
Reverts: flutter/flutter#152487
Initiated by: gmackall
Reason for reverting: I forgot that I need to override the compileSdkVersion in the AGP 8.0 [instance of this test](ef9cd32f5a/dev/devicelab/bin/tasks/android_java17_dependency_smoke_tests.dart (L19))
Original PR Author: gmackall

Reviewed By: {reidbaker}

This change reverts the following previous change:
Updates `compileSdk`, `targetSdk`, and `ndk` versions (former 2 to latest, latter to the version of the ndk we are hosting on CIPD).

Summary of changes:
- Updates mentioned template values
- `compileSdk` 35 requires AGP 8.0+, so updated to 8.1 in many places.
- This also necessitated Gradle upgrades in most places
- This also necessitated moving the `package` xml attribute to the AGP `namespace` field in a couple places (test + template).
- Some tests use the output of `flutter create` but then use intentionally lower AGP versions. [I downgraded the `compileSdk` in these tests.](fee34fd61a)
- [Stopped lockfile generation](82324a2570) script from hitting the `hello_world` example because it uses `.kts` gradle files.
- One test needed [some Gradle options we had already added to templates](6aa187b4b6).
2024-08-20 21:45:25 +00:00
Gray Mackall
ef9cd32f5a Update template/test compileSdk, targetSdk, ndk versions (#152487)
Updates `compileSdk`, `targetSdk`, and `ndk` versions (former 2 to latest, latter to the version of the ndk we are hosting on CIPD).

Summary of changes:
- Updates mentioned template values
- `compileSdk` 35 requires AGP 8.0+, so updated to 8.1 in many places.
- This also necessitated Gradle upgrades in most places
- This also necessitated moving the `package` xml attribute to the AGP `namespace` field in a couple places (test + template).
- Some tests use the output of `flutter create` but then use intentionally lower AGP versions. [I downgraded the `compileSdk` in these tests.](fee34fd61a)
- [Stopped lockfile generation](82324a2570) script from hitting the `hello_world` example because it uses `.kts` gradle files.
- One test needed [some Gradle options we had already added to templates](6aa187b4b6).
2024-08-20 21:33:12 +00:00
Victor Sanni
c631ad91a8 Implement tap to scroll to item in CupertinoPicker (#153386)
Finishes the work started by @Kavantix in #110733.

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

Before:

https://github.com/user-attachments/assets/7ca0d346-7538-44a0-b0b2-41cf96eee6eb

After:

https://github.com/user-attachments/assets/8da91188-28a0-4738-a216-e03946f00284

Native picker:

https://github.com/user-attachments/assets/8662b3c0-0443-4f8d-818b-cabd97d37de8
2024-08-20 20:22:47 +00:00
Polina Cherkasova
ba7d7d5bb1 Fix leaky test. (#153780) 2024-08-20 13:08:39 -07:00
chunhtai
e7da16df76 Fixes page.onPopInvoked type mismatches (#153593)
fixes https://github.com/flutter/flutter/issues/153150
2024-08-20 18:23:54 +00:00
Jason Simmons
cdab9d509b When the app enters the detached state, clear the record of the last SystemChrome style sent to the host (#153586)
This ensures that the style will be sent again after the host is reattached

Fixes https://github.com/flutter/flutter/issues/150418
2024-08-20 17:33:13 +00:00
Andrew Kolos
4a03b76c68 Handle "Service connection disposed" error from VmService disconnecting while requests are outstanding (#153714)
Fixes umbrella issue https://github.com/flutter/flutter/issues/153471, including its children: https://github.com/flutter/flutter/issues/153472, https://github.com/flutter/flutter/issues/153473, and https://github.com/flutter/flutter/issues/153474.

The VM service can be disposed at any time during requests (e.g. the user closes the app or stops debugging in VSCode)[^1]. a479f91e80 and a7d8707a59 updated package:vm_service to throw new `RPCError`s when the service disconnects while requests are inflight. Therefore, we need to handle these exceptions in the tool. See umbrella issue for more details.

I plan on cherry-picking this change to the stable channel.

[^1]: https://github.com/flutter/flutter/issues/153471#issuecomment-2296294221
2024-08-20 16:39:19 +00:00
Sigurd Meldgaard
a9daf58829 Reland "Load parent package config" (#153754)
Reverts flutter/flutter#153752
Relands https://github.com/flutter/flutter/pull/150850

Now with attached g3fix
2024-08-20 15:30:46 +02:00
Sigurd Meldgaard
276674e760 Revert "Load parent package config" (#153752)
Reverts flutter/flutter#150850

Seems we need a G3Fix
2024-08-20 12:49:42 +02:00
Sigurd Meldgaard
1a2e25c2d8 Load parent package config (#150850)
Fixes #150196
2024-08-20 09:34:35 +02:00
Jason Simmons
31c3d0927b Do not cancel the VmService's subscription to the isolate event stream in FlutterVmService.findExtensionIsolate (#153607)
The stream subscriptions in the device's VmService are used by other parts of FlutterVmService and other components throughout flutter_tools.  Components that listen to streams should not call VmService.streamCancel because that will interfere with other users who still want the events.

See https://github.com/flutter/flutter/issues/153049
See https://github.com/flutter/flutter/issues/153563
2024-08-19 17:40:07 +00:00
kzrnm
ea477d5981 [gen_l10n] isCustomDateFormat accepts an actual boolean (#153439)
Fixes #153420

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2024-08-18 08:57:30 -07:00
flutter-pub-roller-bot
55b9c5a571 Roll pub packages (#153581)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-08-17 00:44:08 +00:00
Michael Goderbauer
d9dbefc949 fix some unintended HTML tags in docs (#153507)
I used the `unintended_html_in_doc_comment` to find these, but sadly the lint is not ready to be enabled yet due to https://github.com/dart-lang/linter/issues/5065.
2024-08-16 23:17:14 +00:00
Andrew Kolos
080928dda3 add HttpException to the list of handled exceptions within ResidentWebRunner::run (#153527)
Resolves https://github.com/flutter/flutter/issues/153298, a major crasher of the flutter tool. I plan on cherry-picking this change.

In `ResidentWebRunner::run`, many connection-related exceptions are caught, logged, and have `ToolExit`s thrown in their place ([code](d23be7a07d/packages/flutter_tools/lib/src/isolated/resident_web_runner.dart (L370-L385)), [PR that introduced this](https://github.com/flutter/flutter/pull/50895)). However, `HttpException` is not included in this list. See https://github.com/flutter/flutter/issues/153298#issuecomment-2290900158 for details if interested.
2024-08-16 16:40:19 +00:00