Commit graph

541 commits

Author SHA1 Message Date
Polina Cherkasova a04fe3169a
Upgrade vm_service. (#144845) 2024-03-08 17:09:07 -08:00
Taha Tesser 5d2353c105
CalendarDatePicker doesn't announce selected date on desktop (#143583)
fixes [Screen reader is not announcing the selected date as selected on DatePicker](https://github.com/flutter/flutter/issues/143439)

### Descriptions
- This fixes an issue where `CalendarDatePicker` doesn't announce selected date on desktop.
- Add semantic label to describe the selected date is indeed "Selected".

### 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(
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  MyHomePageState createState() => MyHomePageState();
}

class MyHomePageState extends State<MyHomePage> {
  void _showDatePicker() async {
    await showDatePicker(
      context: context,
      initialDate: DateTime.now(),
      firstDate: DateTime(1900),
      lastDate: DateTime(2200),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title,
            style: const TextStyle(fontFamily: 'ProductSans')),
      ),
      body: const Center(
        child: Text('Click the button to show date picker.'),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _showDatePicker,
        tooltip: 'Show date picker',
        child: const Icon(Icons.edit_calendar),
      ),
    );
  }
}

// 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,
//       home: Scaffold(
//         body: Center(
//           child: CalendarDatePicker(
//             initialDate: DateTime.now(),
//             firstDate: DateTime(2020),
//             lastDate: DateTime(2050),
//             onDateChanged: (date) {
//               print(date);
//             },
//           ),
//         ),
//       ),
//     );
//   }
// }
```

</details>

### Before

https://github.com/flutter/flutter/assets/48603081/c82e1f15-f067-4865-8a5a-1f3c0c8d91da

### After

https://github.com/flutter/flutter/assets/48603081/193d9e26-df9e-4d89-97ce-265c3d564607
2024-02-21 08:59:24 +00:00
Taha Tesser 95cdebedae
Add timeSelectorSeparatorColor and timeSelectorSeparatorTextStyle for Material 3 Time Picker (#143739)
fixes [`Time selector separator` in TimePicker is not centered vertically](https://github.com/flutter/flutter/issues/143691)

Separator currently `hourMinuteTextStyle` to style itself.

This introduces `timeSelectorSeparatorColor` and `timeSelectorSeparatorTextStyle` from Material 3 specs to correctly style  the separator. This also adds ability to change separator color without changing `hourMinuteTextColor`.

### Specs for the time selector separator
https://m3.material.io/components/time-pickers/specs
![image](https://github.com/flutter/flutter/assets/48603081/0c84f649-545d-441b-adbf-2b9ec872b14c)

### Code sample

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

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        // timePickerTheme: TimePickerThemeData(
        //   hourMinuteTextColor: Colors.amber,
        // )
      ),
      home: Scaffold(
        body: Center(
          child: Builder(builder: (context) {
            return ElevatedButton(
              onPressed: () async {
                await showTimePicker(
                  context: context,
                  initialTime: TimeOfDay.now(),
                );
              },
              child: const Text('Pick Time'),
            );
          }),
        ),
      ),
    );
  }
}

```

</details>

| Before | After |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/20beeba4-5cc2-49ee-bba8-1c552c0d1e44" /> | <img src="https://github.com/flutter/flutter/assets/48603081/24927187-aff7-4191-930c-bceab6a4b4c2" /> |
2024-02-21 08:10:01 +00:00
Polina Cherkasova b48dfca382
Upgrade leak_tracker. (#143236) 2024-02-09 14:41:22 -08:00
Christopher Fujino a80333349a
Unpin test (#141427)
Fixes https://github.com/flutter/flutter/issues/140169
2024-02-01 18:53:23 +00:00
LouiseHsu caba667ed4
Fix incorrect zh-cn translation for Look Up Label in selection controls (#142158)
Fixes https://github.com/flutter/flutter/issues/141764

Translation suggestion here:

https://tc.corp.google.com/btviewer/edittranslation?project=Flutter&msgId=8222331119728136330&language=zh-CN

## 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.
2024-01-25 10:24:42 -08:00
Polina Cherkasova a522b38e96
Upgrade leak_tracker. (#142162) 2024-01-24 15:33:17 -08:00
Qun Cheng e86c1c88e2
Add tooltip for the clear button on SearchAnchor's search view (#141804)
Fixes #141347
This PR is to add a "clear text" tooltip for the clear button on `SearchAnchor`'s search view and also add a `clearButtonTooltip` entry for `material_localizations`.
2024-01-23 17:47:06 +00:00
Polina Cherkasova 1f3103e50d
Upgrade leak_tracker. (#141153) 2024-01-09 12:02:35 -08:00
Elliott Brooks 55ba27d3bc
Link to wiki page about updating dependencies in each pubspec.yaml file (#140826)
Added a minimal wiki page about how to use the `update-packages` tool: https://github.com/flutter/flutter/wiki/Updating-dependencies-in-Flutter

This PR adds a link to that wiki page at the top of each pubspec.yaml file
2024-01-03 18:28:52 +00:00
Polina Cherkasova 45c611f040
Upgrade leak_tracker. (#140758) 2024-01-02 20:58:16 +00:00
flutter-pub-roller-bot 2d75f76b44
Roll pub packages (#140472)
This PR was generated by `flutter update-packages --force-upgrade`.
2023-12-20 22:57:21 +00:00
Polina Cherkasova 6368d65622
Upgrade to version of leak tracker that does not depend on test_widgets. (#140247)
Contributes to: https://github.com/flutter/flutter/issues/135856
2023-12-19 04:28:09 +00:00
Polina Cherkasova bda158adf0
Reorganize dependencies on leak_tracker. (#140233)
1. Move leak_tracker and leak_tracker_testing out of direct dependencies.
2. Move leak_tracker_flutter_testing from dev to prod dependencies for flutter_test

It is prerequisite for https://github.com/flutter/flutter/issues/135856
2023-12-15 19:33:23 +00:00
Srujan Gaddam 2407f699e9
Move package:web dependency to dev dependency (#139696)
Pinning the package:web dependency constrains downstream packages from
using newer versions and making sure they support the version pinned in
Flutter. Since the usage of package:web in Flutter is light, we should
instead have a small shim like the engine and keep package:web as a dev
dependency only.
2023-12-15 08:53:27 -08:00
Polina Cherkasova 6a85684877
Increase versions of leak tracker libraries. (#140018)
Contributes to https://github.com/flutter/flutter/issues/135856
2023-12-15 05:18:23 +00:00
Mitchell Goodwin f0051d8b12
Cupertino text clear label (#129727)
Fixes #123107

Adds a customizable semantic label so that the clear button on the Cupertino text field will be picked up by screen readers.

https://github.com/flutter/flutter/assets/58190796/de31d9dd-923c-402f-a55b-e5cc77ea68bb
2023-12-15 04:55:55 +00:00
Ian Hickson fca7bc9e28
Roll dependencies (#139606)
test-exempt: rolling dependencies
2023-12-06 19:22:06 +00:00
Bruno Leroux b6fa041808
[l10n] Update Material shareButtonLabel (#138899)
## Description

This PR updates the Material label for the share option, currently it is "**Share...**" (the expected label on iOS), on Android it should be "**Share**".

Native Android TextField screenshot:

![Capture d’écran du 2023-11-20 17-19-02](https://github.com/flutter/flutter/assets/840911/6004b900-0ba4-441e-a814-4afd0c0e2fe2)

## Related Issue

Step 2 for https://github.com/flutter/flutter/issues/138728

## Tests

Adds 1 test.
2023-12-01 23:32:57 +00:00
Srujan Gaddam d8ffc7390c
Pin package:web 0.4.0 (#138428)
This version is needed so that dart:js_interop can move to extension
types. Also adds some code to handle some breaking changes:

- Body -> Response. Body was an IDL interface mixin type we exposed in
dart:html. Going forward, users should either use Request or Response.
- Casts to JSAny. These are temporary until we move package:web types to
extension types. Currently, package:web types can't implement JSObject
as JSObject will move to be an extension type itself.

Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>
2023-11-15 15:03:21 -08:00
Polina Cherkasova 793827d98a
Upgrade leak tracker. (#138283) 2023-11-13 09:47:55 -08:00
Polina Cherkasova e1b420cd5b
Upgrade leak_tracker and remove some deps in allow list. (#137806) 2023-11-03 06:20:47 -07:00
Polina Cherkasova d50f1fa9c9
Add dependency on leak_tracker and leak_tracker_testing to flutter_test. (#137646) 2023-10-31 19:19:12 -07:00
Polina Cherkasova bcf267359c
Move dependency on leak_tracker from dependencies to dev_dependencies in flutter_test. (#137633)
Analyzer's dependency on autosnapshotting causes issues.

Because every version of integration_test from sdk depends on leak_tracker from hosted and autosnapshotting depends on leak_tracker from path, integration_test from sdk is forbidden.
So, because autosnapshotting depends on integration_test from sdk, version solving failed.
2023-10-31 21:12:52 +00:00
Polina Cherkasova dcbb2de0ad
Add dependency on leak_tracker to flutter_test. (#137069)
Contributes to: https://github.com/flutter/flutter/issues/135856

This PR also adds transitive dependency on  web_socket_channel, crypto, typed_data. `web_socket_channel` is needed to request retaining path for not GCed objects from VM Service. Two others are needed to serve web_socket_channel.

The dependency on leak_tracker is pinned:
aea562114c/packages/flutter_tools/lib/src/commands/update_packages.dart (L40)
2023-10-25 02:45:26 +00:00
Hans Muller 6eea6e277e
Removed TBD translations for optional remainingTextFieldCharacterCounZero message (#136684)
Fixes https://github.com/flutter/flutter/issues/136090
2023-10-17 10:34:49 -07:00
Kevin Moore 3e60999b11
Allow latest pkg:material_color_utilities (#132445)
* Allow latest pkg:material_color_utilities
* Bump other dependencies to their latest - including pkg:web
2023-10-11 23:57:16 +00:00
Mitchell Goodwin daa52b2501
Seperate localization tests for Material2 and Material3 (#135779)
Seperates tests for the localizations package into Material2 and Material3 versions and removes dependency on theme.

More info in #127064
2023-10-10 21:46:20 +00:00
Polina Cherkasova 9d9f213eed
Upgrade leak_tracker to fix flackiness. (#135760)
Fixes: https://github.com/flutter/flutter/issues/135716
leak_tracker is left pinned because future updates are going to be breaking.
2023-09-29 18:55:21 +00:00
godofredoc 938bb217fb
Update localizations. (#135691)
Updates the localization files.
2023-09-29 04:11:31 +00:00
David Iglesias a4bc894616
[deps] Update package:web dependency. (#135174)
This PR is the result of running:

```console
$ flutter upgrade-packages --force-upgrade
```

### Issues

* Fixes https://github.com/flutter/flutter/issues/135075
* Supersedes #135081
2023-09-20 22:55:52 +00:00
Gray Mackall f4b5fc1803
Unpin url launcher (remake) (#134958)
More up to date version of https://github.com/flutter/flutter/pull/133786.

Fixes https://github.com/flutter/flutter/issues/111304
2023-09-20 02:43:57 +00:00
Michael Goderbauer 983ecf069c
Enable private field promotion for other packages (#134475)
New feature in upcoming Dart 3.2. See https://github.com/dart-lang/language/issues/2020. Feature is enabled by bumping the min SDK version to 3.2.

Part of https://github.com/flutter/flutter/issues/134476.
2023-09-12 21:08:19 +00:00
Ian Hickson 5fa8de05ee
l10n-related documentation improvements (#133114) 2023-08-24 21:54:56 +00:00
Andrey Suvorov 1cfba2620a
fixes l10n for CupertinoDatePicker in monthYear mode (#130934)
This PR fixes l10n issue when months names are being used in incorrect form in CupertinoDatePicker in CupertinoDatePickerMode.yearMonth (#130930).

The idea of this proposal is to add an optional parameter `standalone` for `CupertinoLocalizations.datePickerMonth` to be able to choose when to use months names in base form (intl DateSymbols.STANDALONEMONTHS) and when in day-dependent form (intl DateSymbols.MONTHS)

<details>
<summary>Before</summary>

<img width="366" alt="image" src="https://github.com/flutter/flutter/assets/32621121/1dd54fa7-6dd9-4053-889b-57134c145432">

<img width="387" alt="image" src="https://github.com/flutter/flutter/assets/32621121/c176070e-73e4-49d3-883b-ba31eca6d1d7">

</details>

<details>
<summary>After</summary>

<img width="369" alt="image" src="https://github.com/flutter/flutter/assets/32621121/255594f1-219d-4bd4-9b75-1012912f8ab0">

<img width="378" alt="image" src="https://github.com/flutter/flutter/assets/32621121/16bbb41f-3f62-4446-bf41-e27140b649a9">

</details>
2023-08-18 16:38:54 +00:00
LouiseHsu 3f34b480c8
[Framework] Add Share to selection controls (#132599)
In native iOS, users are able to select text and initiate a share menu, which provides several standard services, such as copy, sharing to social media, direct ability to send to various contacts through messaging apps, etc. 

https://github.com/flutter/engine/assets/36148254/d0af7034-31fd-412e-8636-a06bbff54765

This PR is the framework portion of the changes that will allow Share to be implemented.
The corresponding merged engine PR is [here](https://github.com/flutter/engine/pull/44554)
This PR addresses https://github.com/flutter/flutter/issues/107578
More details are available in this [design doc](https://github.com/flutter/engine/pull/flutter.dev/go/add-missing-features-to-selection-controls)
2023-08-17 23:36:11 +00:00
Michael Goderbauer 14f9ed28d0
Analyze doc code snippets for all packages for which we publish docs (#132607)
Fixes TODO in the analyzer script :)
2023-08-16 22:24:48 +00:00
LongCatIsLooong 3f831b694f
Making TextPainter rounding hack disabled by default (#132094)
Migrate tests in flutter/flutter. Once the tests here and in `*_customer_testing` are migrated, the default value of the migration flag will be changed from false to true, making the rounding hack disabled by default.
2023-08-10 00:30:52 +00:00
Tae Hyung Kim fa88170a4f
Update material and cupertino localizations (#131212)
See title.

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

---------

Co-authored-by: Xilai Zhang <xilaizhang@google.com>
2023-08-09 10:05:27 -07:00
LouiseHsu d9cb50e63d
[framework] Add Search Web to selection controls for iOS (#131898)
This PR adds framework support for the Search Web feature in iOS. 

https://github.com/flutter/flutter/assets/36148254/c159f0d9-8f14-45e7-b295-e065b0826fab

The corresponding merged engine PR can be found [here](https://github.com/flutter/engine/pull/43324).
This PR addresses https://github.com/flutter/flutter/issues/82907 
More details are available in this [design doc](https://docs.google.com/document/d/1QizXwBiO-2REIcEovl5pK06BaLPOWYmNwOE5jactJZA/edit?resourcekey=0-1pb9mJiAq29Gesmt25GAug)
2023-08-08 17:34:17 +00:00
LouiseHsu f019789565
[framework] Add Look Up to selection controls for iOS (#131798)
This PR adds framework support for the Look Up feature in iOS. 

https://github.com/flutter/flutter/assets/36148254/d301df79-4e23-454f-8742-2f8e39c2960c

The corresponding merged engine PR can be found [here](https://github.com/flutter/engine/pull/43308).
This PR addresses https://github.com/flutter/flutter/issues/82907 
More details are available in this [design doc.](flutter.dev/go/add-missing-features-to-selection-controls)

This is the same PR as https://github.com/flutter/flutter/pull/130532, this is an attempt to fix the Google Testing issue
2023-08-02 20:20:39 +00:00
Jason Simmons 8a84437989
Manual roll to engine commit 9b14c382 using Dart SDK version 3.2.x (#131371)
Dart SDK 3.2.x requires a new version of the dart_internal package.
2023-07-27 17:33:07 +00:00
Greg Spencer 258382c594
Add menu dismiss localization (#128613)
## Description

Modifies the semantic label for popup and context menus to be "Dismiss menu" instead of just "Dismiss".

## Related Issues
 - Fixes https://github.com/flutter/flutter/issues/118994

## Tests
 - Updated tests
2023-07-19 22:48:40 +00:00
Bruno Leroux ef312048e5
Fix finish translation for tab labels (#130333)
## Description

This PR update the finnish translations for tab label.

## Related Issue

fixes https://github.com/flutter/flutter/issues/110451

## Tests

Adds 2 tests.
2023-07-14 15:04:40 +00:00
Tae Hyung Kim bd18e78c9c
Fix timeOfDayFormat for Danish (#130437)
See title. According to
[CLDR](https://icu4c-demos.unicode.org/icu-bin/locexp?_=da_DK&d_=en&_l=da),
proper time of day format should be `HH.mm`.

Fixes https://github.com/flutter/flutter/issues/130234.
2023-07-13 16:46:49 -07:00
Alexander Aprelev 3b8f6c4020
Upgrade framework pub dependencies, roll engine with rolled dart sdk (#130163)
Manual roll is needed because incoming dart sdk requires updated version
vm_snapshot_analysis (>=0.7.4).


5ae09b8b4f...7c83ea3e85

```
7c83ea3e85 Reland "Manual roll Dart SDK from 2d98d9e27dae to 0b07debd5862 (21 revisions) (#43457)" (#43472)
9ef3e8d533 Roll Skia from 5eba922297bb to 93c92f97f5ab (2 revisions) (#43471)
```

Remove implementation of SuitePlatform from the test as well. Remove use
of fake cwd from SuitePlatform as it can't be properly faked.
2023-07-07 13:55:35 -07:00
luckysmg e0ad12969f
[framework] Add textField OCR support for framework side (#96637)
iOS OCR keyboard input support.
2023-07-06 08:51:06 -07:00
Mouad Debbar a162d7546a
flutter update-packages --force-upgrade (#128908)
- Bumps `vm_service` from `11.6.0` to `11.7.1`
- Bumps `web` from `0.1.3-beta` to `0.1.4-beta` and adds it everywhere.
- Moves `js` from `dependencies` to `dev_dependencies`
2023-06-15 18:17:09 +00:00
Hans Muller 9c3bfde5c0
Updated flutter_localizations tests for Material3; (#128521)
Updated the localization tests so that they'll DTRT when useMaterial3:true becomes the default for ThemeData. In a few cases there are M2 and M3 tests now, to check features that are significantly different in Material3, notably the double ring for the 24  hour input dial. 

| Material 2 | Material 3|
|---------|---------|
|   <img width="250" alt="Screenshot 2023-06-08 at 10 47 37 AM" src="https://github.com/flutter/flutter/assets/1377460/6ca95e22-b3f1-4f6b-9e39-79c888ba58f1"> | <img width="257" alt="Screenshot 2023-06-08 at 10 47 13 AM" src="https://github.com/flutter/flutter/assets/1377460/19b685bf-c812-4c87-baed-70fa56efaad8"> | 

In M3, most aspects of the ideographic text styles are the same as for alphabetic styles, so there are some tweaks here to account for that.
2023-06-09 17:11:23 +00:00
Tomasz Gucio 2520838afb
Fixes in Cupertino translations (#127872) 2023-06-01 11:17:36 +02:00