From 05f9a96ea4c521844a19b55fa3b51b8e19c03584 Mon Sep 17 00:00:00 2001 From: Taha Tesser Date: Fri, 4 Aug 2023 20:38:07 +0300 Subject: [PATCH] Mention `showTimePicker` function be can be used to show dialog with the time picker in the `TimePickerDialog` docs (#131932) fixes https://github.com/flutter/flutter/issues/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. --- packages/flutter/lib/src/material/time_picker.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/time_picker.dart b/packages/flutter/lib/src/material/time_picker.dart index 7a4b526eb8..d2d9e428fd 100644 --- a/packages/flutter/lib/src/material/time_picker.dart +++ b/packages/flutter/lib/src/material/time_picker.dart @@ -2104,6 +2104,8 @@ typedef EntryModeChangeCallback = void Function(TimePickerEntryMode); /// selected [TimeOfDay] if the user taps the "OK" button, or null if the user /// taps the "CANCEL" button. The selected time is reported by calling /// [Navigator.pop]. +/// +/// Use [showTimePicker] to show a dialog already containing a [TimePickerDialog]. class TimePickerDialog extends StatefulWidget { /// Creates a Material Design time picker. /// @@ -3590,7 +3592,7 @@ class _TimePickerDefaultsM3 extends _TimePickerDefaults { @override TextStyle get hourMinuteTextStyle { return MaterialStateTextStyle.resolveWith((Set states) { - // TODO(tahatesser): Update this when https://github.com/flutter/flutter/issues/127035 is fixed. + // TODO(tahatesser): Update this when https://github.com/flutter/flutter/issues/131247 is fixed. // This is using the correct text style from Material 3 spec. // https://m3.material.io/components/time-pickers/specs#fd0b6939-edab-4058-82e1-93d163945215 return _textTheme.displayMedium!.copyWith(color: _hourMinuteTextColor.resolve(states));