Allow empty initial time when using text input mode in showTimePicker dialog#172847
Merged
auto-submit[bot] merged 6 commits intoflutter:masterfrom Aug 14, 2025
Merged
Allow empty initial time when using text input mode in showTimePicker dialog#172847auto-submit[bot] merged 6 commits intoflutter:masterfrom
auto-submit[bot] merged 6 commits intoflutter:masterfrom
Conversation
Contributor
Author
|
Created a new PR to address issues found in the previously reviewed one. Old PR link: #170694 |
Contributor
|
Linux analyze is complaining about formatting. Copying from the logs in the check: Found 1 Dart file which was formatted incorrectly.
To fix, run `dart format packages/flutter/test/material/time_picker_test.dart` or:
git apply <<DONE
diff --git a/packages/flutter/test/material/time_picker_test.dart b/packages/flutter/test/material/time_picker_test.dart
index 59f9f506c56..00000000000 100644
--- a/packages/flutter/test/material/time_picker_test.dart
+++ b/packages/flutter/test/material/time_picker_test.dart
@@ -2273,28 +2273,28 @@ void main() {
});
group('Time picker - emptyInitialInput (${materialType.name})', () {
- testWidgets(
- 'Fields are empty and show correct hints when emptyInitialInput is true',
- (WidgetTester tester) async {
- await startPicker(
- tester,
- (_) {},
- entryMode: TimePickerEntryMode.input,
- materialType: materialType,
- emptyInitialInput: true,
- );
- await tester.pump();
+ testWidgets('Fields are empty and show correct hints when emptyInitialInput is true', (
+ WidgetTester tester,
+ ) async {
+ await startPicker(
+ tester,
+ (_) {},
+ entryMode: TimePickerEntryMode.input,
+ materialType: materialType,
+ emptyInitialInput: true,
+ );
+ await tester.pump();
- final List<TextField> textFields =
- tester.widgetList<TextField>(find.byType(TextField)).toList();
+ final List<TextField> textFields = tester
+ .widgetList<TextField>(find.byType(TextField))
+ .toList();
- expect(textFields[0].controller?.text, isEmpty); // hour
- expect(textFields[1].controller?.text, isEmpty); // minute
- expect(textFields[0].decoration?.hintText, isNull);
- expect(textFields[1].decoration?.hintText, isNull);
- await finishPicker(tester);
- },
- );
+ expect(textFields[0].controller?.text, isEmpty); // hour
+ expect(textFields[1].controller?.text, isEmpty); // minute
+ expect(textFields[0].decoration?.hintText, isNull);
+ expect(textFields[1].decoration?.hintText, isNull);
+ await finishPicker(tester);
+ });
testWidgets('User sets hour/minute after initially empty fields', (
WidgetTester tester,
@@ -2310,8 +2310,9 @@ void main() {
emptyInitialInput: true,
);
- final List<TextField> textFields =
- tester.widgetList<TextField>(find.byType(TextField)).toList();
+ final List<TextField> textFields = tester
+ .widgetList<TextField>(find.byType(TextField))
+ .toList();
expect(textFields[0].controller?.text, isEmpty); // hour
expect(textFields[1].controller?.text, isEmpty); // minute
@@ -2338,8 +2339,9 @@ void main() {
materialType: materialType,
);
- final List<TextField> textFields =
- tester.widgetList<TextField>(find.byType(TextField)).toList();
+ final List<TextField> textFields = tester
+ .widgetList<TextField>(find.byType(TextField))
+ .toList();
expect(textFields[0].controller?.text, '7'); // hour
expect(textFields[1].controller?.text, '00'); // minute
@@ -2797,3 +2799,4 @@ Future<void> finishPicker(WidgetTester tester) async {
await tester.tap(find.text(materialLocalizations.okButtonLabel));
await tester.pumpAndSettle(const Duration(seconds: 1));
}
DONE |
Contributor
|
(You should be able to automatically apply them by running |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 14, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 14, 2025
auto-submit bot
pushed a commit
to flutter/packages
that referenced
this pull request
Aug 14, 2025
flutter/flutter@34c2a3b...f4334d2 2025-08-14 [email protected] Roll Dart SDK from 9b4691f35139 to 214a7f829913 (2 revisions) (flutter/flutter#173769) 2025-08-14 [email protected] Roll Skia from b3e86773dae1 to dca5f05fee87 (4 revisions) (flutter/flutter#173763) 2025-08-14 [email protected] Roll Dart SDK from 73153bdc1459 to 9b4691f35139 (3 revisions) (flutter/flutter#173755) 2025-08-14 [email protected] Roll Skia from 5852eddfd404 to b3e86773dae1 (1 revision) (flutter/flutter#173750) 2025-08-14 [email protected] Allow empty initial time when using text input mode in showTimePicker dialog (flutter/flutter#172847) 2025-08-13 [email protected] Roll Skia from 525e2bf80559 to 5852eddfd404 (2 revisions) (flutter/flutter#173740) 2025-08-13 [email protected] [web] Popping a nameless route should preserve the correct route name (flutter/flutter#173652) 2025-08-13 [email protected] Make sure that a ChoiceChip doesn't crash in 0x0 environment (flutter/flutter#173322) 2025-08-13 [email protected] [ Tool ] Fix missing import for widget_preview.dart (flutter/flutter#173731) 2025-08-13 [email protected] Roll Skia from f7fdda3cd0e6 to 525e2bf80559 (7 revisions) (flutter/flutter#173727) 2025-08-13 [email protected] Do not include `:unittests` unless `enable_unittests` (flutter/flutter#173729) 2025-08-13 [email protected] Roll Packages from 08a9b2c to 6cb9113 (1 revision) (flutter/flutter#173726) 2025-08-13 [email protected] fix: selected date decorator renders outside PageView in `DatePickerDialog` dialog (flutter/flutter#171718) 2025-08-13 [email protected] [ Widget Preview ] Add `--machine` mode (flutter/flutter#173654) 2025-08-13 [email protected] Make sure that a Chip doesn't crash in 0x0 environment (flutter/flutter#173245) 2025-08-13 [email protected] feat: Cupertino sheet implement upward stretch on full sheet (flutter/flutter#168547) 2025-08-13 [email protected] Fix visual overlap of transparent routes barrier when using FadeForwardsPageTransitionsBuilder (flutter/flutter#167032) 2025-08-13 [email protected] Fix `ChipThemeData` lerp for `BorderSide` (flutter/flutter#173160) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
SydneyBao
pushed a commit
to SydneyBao/flutter
that referenced
this pull request
Aug 14, 2025
… dialog (flutter#172847) Added ability to allow empty initial time when using text input mode in showTimePicker dialog flutter#169131 - [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] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Tong Mu <[email protected]>
ksokolovskyi
pushed a commit
to ksokolovskyi/flutter
that referenced
this pull request
Aug 19, 2025
… dialog (flutter#172847) Added ability to allow empty initial time when using text input mode in showTimePicker dialog flutter#169131 - [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] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Tong Mu <[email protected]>
WillBLogical
pushed a commit
to WillBLogical/packages
that referenced
this pull request
Aug 20, 2025
flutter/flutter@34c2a3b...f4334d2 2025-08-14 [email protected] Roll Dart SDK from 9b4691f35139 to 214a7f829913 (2 revisions) (flutter/flutter#173769) 2025-08-14 [email protected] Roll Skia from b3e86773dae1 to dca5f05fee87 (4 revisions) (flutter/flutter#173763) 2025-08-14 [email protected] Roll Dart SDK from 73153bdc1459 to 9b4691f35139 (3 revisions) (flutter/flutter#173755) 2025-08-14 [email protected] Roll Skia from 5852eddfd404 to b3e86773dae1 (1 revision) (flutter/flutter#173750) 2025-08-14 [email protected] Allow empty initial time when using text input mode in showTimePicker dialog (flutter/flutter#172847) 2025-08-13 [email protected] Roll Skia from 525e2bf80559 to 5852eddfd404 (2 revisions) (flutter/flutter#173740) 2025-08-13 [email protected] [web] Popping a nameless route should preserve the correct route name (flutter/flutter#173652) 2025-08-13 [email protected] Make sure that a ChoiceChip doesn't crash in 0x0 environment (flutter/flutter#173322) 2025-08-13 [email protected] [ Tool ] Fix missing import for widget_preview.dart (flutter/flutter#173731) 2025-08-13 [email protected] Roll Skia from f7fdda3cd0e6 to 525e2bf80559 (7 revisions) (flutter/flutter#173727) 2025-08-13 [email protected] Do not include `:unittests` unless `enable_unittests` (flutter/flutter#173729) 2025-08-13 [email protected] Roll Packages from 08a9b2c to 6cb9113 (1 revision) (flutter/flutter#173726) 2025-08-13 [email protected] fix: selected date decorator renders outside PageView in `DatePickerDialog` dialog (flutter/flutter#171718) 2025-08-13 [email protected] [ Widget Preview ] Add `--machine` mode (flutter/flutter#173654) 2025-08-13 [email protected] Make sure that a Chip doesn't crash in 0x0 environment (flutter/flutter#173245) 2025-08-13 [email protected] feat: Cupertino sheet implement upward stretch on full sheet (flutter/flutter#168547) 2025-08-13 [email protected] Fix visual overlap of transparent routes barrier when using FadeForwardsPageTransitionsBuilder (flutter/flutter#167032) 2025-08-13 [email protected] Fix `ChipThemeData` lerp for `BorderSide` (flutter/flutter#173160) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
mboetger
pushed a commit
to mboetger/flutter
that referenced
this pull request
Sep 18, 2025
… dialog (flutter#172847) Added ability to allow empty initial time when using text input mode in showTimePicker dialog flutter#169131 - [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] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Tong Mu <[email protected]>
korca0220
pushed a commit
to korca0220/flutter
that referenced
this pull request
Sep 22, 2025
… dialog (flutter#172847) Added ability to allow empty initial time when using text input mode in showTimePicker dialog flutter#169131 - [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] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Tong Mu <[email protected]>
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 12, 2025
lucaantonelli
pushed a commit
to lucaantonelli/flutter
that referenced
this pull request
Nov 21, 2025
… dialog (flutter#172847) Added ability to allow empty initial time when using text input mode in showTimePicker dialog flutter#169131 - [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] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Tong Mu <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added ability to allow empty initial time when using text input mode in showTimePicker dialog #169131
///).