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.
This commit is contained in:
parent
b39604e02d
commit
05f9a96ea4
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user