Victor Sanni
ceeeb7d090
Use correct locale for CupertinoDatePicker
weekday ( #151494 )
...
#120052 introduces the `showDayOfWeek` flag to `CupertinoDatePicker` for mode `CupertinoDatePickerMode.date`, but the default `en` locale from `DefaultCupertinoLocalizations` is always used for the day of the week:
5103d75743/packages/flutter_localizations/lib/src/cupertino_localizations.dart (L116-L119)
This PR introduces a new `intl.DateFormat` `weekdayFormat` to replace the default with the abbreviated weekday for any supported locales.
| Before | After |
| --- | --- |
| <img width="379" alt="Screenshot 2024-07-09 at 5 08 43â¯PM" src="https://github.com/flutter/flutter/assets/77553258/d6899c6b-bd0a-4484-a6a8-3ef1512aeae1 "> | <img width="379" alt="Screenshot 2024-07-09 at 5 08 11â¯PM" src="https://github.com/flutter/flutter/assets/77553258/f320c634-80d1-4f3b-adfd-ed85a9dfc3f6 "> |
Fixes #141875
2024-07-11 00:10:17 +00:00
Loïc Sharma
8d54abfc22
Roll pub packages manually ( #145170 )
...
The automated roll failed as a test needs to be updated: https://github.com/flutter/flutter/pull/145167
Fixes: https://github.com/flutter/flutter/issues/139861
2024-03-15 14:12:22 +00: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

### 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
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
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:

## Related Issue
Step 2 for https://github.com/flutter/flutter/issues/138728
## Tests
Adds 1 test.
2023-12-01 23:32:57 +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
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
godofredoc
938bb217fb
Update localizations. ( #135691 )
...
Updates the localization files.
2023-09-29 04:11:31 +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
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
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
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
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
chunhtai
5764404f5c
fix localization typo for expansionTileExpandedHint ( #125212 )
...
as title
2023-04-20 18:23:06 +00:00
Tae Hyung Kim
c0c5901c0b
Fix gen_date_localizations script and regenerate ( #124547 )
...
Internal bug: b/256596915
Turns out we need to regenerate date localizations in order for the
`intl` package to be setup properly within Flutter. This PR fixes the
script (since it assumes the use of the old `.packages` way of handling
packages), and regenerates the `generated_date_localizations.dart` file.
2023-04-11 16:54:54 -07:00
chunhtai
f662f2efe8
ExpansionTile audit ( #124281 )
...
ExpansionTile audit
2023-04-10 20:22:54 +00:00
chunhtai
9e4b5fb7d9
Adds i18n to widget layer ( #123620 )
...
Adds i18n to widget layer
2023-04-04 22:57:35 +00:00
Tae Hyung Kim
fb6e83a6fd
Add Welsh to Material Flutter (and update some other translations) ( #124094 )
...
Reverts flutter/flutter#124088
This PR should properly incorporate the new Welsh translations into
Flutter (and maybe some other strings that seem to be updated in TC).
I think the other translation changes come from this issue:
https://github.com/flutter/flutter/issues/115181 .
Fixes https://github.com/flutter/flutter/issues/120124 .
2023-04-03 21:36:04 -07:00
pdblasi-google
45c94ec3f0
Updates flutter_localizations/test
to stop using TestWindow
( #122564 )
...
Reland: Updates `flutter_localizations/test` to stop using `TestWindow`
2023-03-14 20:03:20 +00:00
Casey Hillers
1f42612323
Revert PRs relating to single window assumption ( #122369 )
...
* Revert "Remove references to BindingBase.window (#122119 )"
This reverts commit c7681f00cf
.
* Revert "Remove another reference to BindingBase.window (#122341 )"
This reverts commit 6ec4445063
.
* Revert "Reland (2): Removes single window assumptions from `flutter_test` (#122233 )"
This reverts commit eb3d317ea0
.
* Revert "Remove single view assumption from TestViewConfiguration (#122352 )"
This reverts commit 927289fb4e
.
* Revert "Updates `flutter/test/cupertino` to no longer use `TestWindow` (#122325 )"
This reverts commit 67e17e45f0
.
* Revert "Updates `flutter/test/gestures` to no longer reference `TestWindow` (#122327 )"
This reverts commit c2a5111cc0
.
* Revert "Updates `flutter/test/rendering` to no longer use `TestWindow` (#122347 )"
This reverts commit 28b65e089b
.
* Revert "Updates `flutter_localizations/test` to stop using `TestWindow` (#122321 )"
This reverts commit 01367d52d7
.
2023-03-09 22:53:38 -08:00
pdblasi-google
01367d52d7
Updates flutter_localizations/test
to stop using TestWindow
( #122321 )
...
Updates `flutter_localizations/test` to stop using `TestWindow`
2023-03-09 22:29:48 +00:00
Xilai Zhang
153fce4d45
Revert "Fix ExpansionTile
hint for Android ( #120881 )" ( #121624 )
...
This reverts commit fd65fd1b16
.
2023-02-28 13:15:47 -08:00
Skandar Munir
681b72c304
fixes Show Week Day in CupertinoDatePicker with CupertinoDatePickerMo… ( #120052 )
...
fixes Show Week Day in CupertinoDatePicker with CupertinoDatePickerMoâ¦
2023-02-28 01:52:51 +00:00
Taha Tesser
fd65fd1b16
Fix ExpansionTile
hint for Android ( #120881 )
...
Fix `ExpansionTile` double tap to collapse/expanded and expanded/collapsed states semantics announcements
2023-02-27 18:40:17 +00:00
Tae Hyung Kim
b13f83a2ba
Fix Finnish TimeOfDate format ( #118204 )
...
* init
* add test
2023-01-10 17:41:54 -08:00
Greg Spencer
fae458b925
Convert TimePicker to Material 3 ( #116396 )
...
* Make some minor changes in preparation for updating the Time Picker to M3
* Revert OutlineInputBorder.borderRadius type change
* Revert more OutlineInputBorder.borderRadius changes.
* Convert TimePicker to Material 3
* Add example test
* Revert OutlineInputBorder.borderRadius type change
* Fix test
* Review Changes
* Merge changes
* Some sizing and elevation fixes
* Fix localization tests
2022-12-14 00:09:52 +00:00
Kate Lovett
7e12b37111
Deprecate 2018 text theme parameters ( #109817 )
2022-08-22 20:00:34 +00:00
Tae Hyung Kim
e3b851a634
Fix Tamil DateTime representation of AM/PM ( #108185 )
...
* init
* testS
* init
* accidentally committed wrong file
2022-07-25 11:33:06 -07:00
Pierre-Louis
74cfc3db67
Use curly_braces_in_flow_control_structures
for non-flutter
packages ( #104629 )
...
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_driver`
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_goldens`
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_goldens_client`
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_localizations`
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_test`
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_web_plugins`
* fix comments
* Use `curly_braces_in_flow_control_structures` for `packages/integration_test`
* fix indentation
2022-05-25 20:01:11 +02:00
Phil Quitslund
20f029e3bc
[devicelab, flutter_test, ...] rename local functions with _
s ( #102833 )
2022-05-03 10:29:06 -07:00
Michael Goderbauer
a01424773e
Enable unnecessary_import ( #101600 )
2022-04-08 12:56:45 -07:00
Michael Goderbauer
3e406c6781
Prepare packages
(minus tools,framework) for use_super_parameters
( #100510 )
2022-03-30 15:31:59 -07:00
Michael Goderbauer
7f2c1cd772
Use PlatformDispatcher.instance
over window
where possible ( #99496 )
2022-03-03 14:46:16 -08:00
Ian Hickson
eb00598bec
Use FlutterError.reportError
instead of debugPrint
for l10n warning ( #93076 )
2021-11-30 17:24:05 -08:00
Konstantin Scheglov
59d8aca3fc
Fix a few prefer_const_declarations and avoid_redundant_argument_values. ( #92929 )
2021-11-03 11:26:24 -07:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint ( #91409 ) ( #91462 )
2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint ( #91409 )" ( #91461 )
...
This reverts commit 5fd259be24
.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint ( #91409 )
2021-10-07 20:13:02 -07:00
Fernando Moraes
7ff13ca405
Update TabPageSelector Semantics Label Localization ( #87430 )
2021-10-01 14:28:04 -07:00
Alexandre Ardhuin
80990c21e2
code formatting ( #85783 )
2021-07-07 23:06:05 -07:00
greymag
f8d73be84c
Remove stripping scriptCodes for localization. ( #83903 )
2021-06-16 13:39:05 -07:00
Greg Spencer
88f3811055
Turn on avoid_dynamic_calls lint, except packages/flutter tests, make appropriate changes. ( #84476 )
...
This adds avoid_dynamic_calls to the list of lints, and fixes all instances where it was violated.
Importantly, this lint is NOT turned on for flutter/packages/test, because those changes are happening in another PR: #84478
2021-06-14 14:16:57 -07:00
Anis Alibegić
c99ed373b3
Fixed large amount of spelling errors ( #83744 )
2021-06-02 10:14:06 -07:00
Phil Quitslund
9c0270d960
sort directives ( #80901 )
2021-04-22 10:14:02 -07:00
Ray Rischpater, KF6GPE
2c9062c43a
l10n updates ( #80541 )
2021-04-16 11:09:02 -07:00
Michael Goderbauer
0f568298d8
enable use_key_in_widget_constructors lint ( #77032 )
2021-03-02 10:14:02 -08:00
Sam Rawlins
c6a74e0a5e
Remove "unnecessary" imports. ( #76159 )
2021-02-19 17:36:02 -08:00