Skip to content

Commit 05f9a96

Browse files
authored
Mention showTimePicker function be can be used to show dialog with the time picker in the TimePickerDialog docs (flutter#131932)
fixes flutter#131931 Every time I search for the time picker in the API docs I end up in the `TimePickerDialog` docs. We should link `showTimePicker` so it can be easier to reach it and mention it can be used directly to show a dialog with a time picker.
1 parent b39604e commit 05f9a96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/flutter/lib/src/material/time_picker.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2104,6 +2104,8 @@ typedef EntryModeChangeCallback = void Function(TimePickerEntryMode);
21042104
/// selected [TimeOfDay] if the user taps the "OK" button, or null if the user
21052105
/// taps the "CANCEL" button. The selected time is reported by calling
21062106
/// [Navigator.pop].
2107+
///
2108+
/// Use [showTimePicker] to show a dialog already containing a [TimePickerDialog].
21072109
class TimePickerDialog extends StatefulWidget {
21082110
/// Creates a Material Design time picker.
21092111
///
@@ -3590,7 +3592,7 @@ class _TimePickerDefaultsM3 extends _TimePickerDefaults {
35903592
@override
35913593
TextStyle get hourMinuteTextStyle {
35923594
return MaterialStateTextStyle.resolveWith((Set<MaterialState> states) {
3593-
// TODO(tahatesser): Update this when https://github.com/flutter/flutter/issues/127035 is fixed.
3595+
// TODO(tahatesser): Update this when https://github.com/flutter/flutter/issues/131247 is fixed.
35943596
// This is using the correct text style from Material 3 spec.
35953597
// https://m3.material.io/components/time-pickers/specs#fd0b6939-edab-4058-82e1-93d163945215
35963598
return _textTheme.displayMedium!.copyWith(color: _hourMinuteTextColor.resolve(states));

0 commit comments

Comments
 (0)