Unverified Commit 05f9a96e authored by Taha Tesser's avatar Taha Tesser Committed by GitHub

Mention `showTimePicker` function be can be used to show dialog with the time...

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.
parent b39604e0
......@@ -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<MaterialState> 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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment