TimePickerThemeData class

Defines the visual properties of the widget displayed with showTimePicker.

Descendant widgets obtain the current TimePickerThemeData object using TimePickerTheme.of(context). Instances of TimePickerThemeData can be customized with TimePickerThemeData.copyWith.

Typically a TimePickerThemeData is specified as part of the overall Theme with ThemeData.timePickerTheme.

All TimePickerThemeData properties are null by default. When null, showTimePicker will provide its own defaults.

See also:

  • ThemeData, which describes the overall theme information for the application.
  • TimePickerTheme, which describes the actual configuration of a time picker theme.
Mixed-in types
Annotations

Constructors

TimePickerThemeData({Color? backgroundColor, ButtonStyle? cancelButtonStyle, ButtonStyle? confirmButtonStyle, BorderSide? dayPeriodBorderSide, Color? dayPeriodColor, OutlinedBorder? dayPeriodShape, Color? dayPeriodTextColor, TextStyle? dayPeriodTextStyle, Color? dialBackgroundColor, Color? dialHandColor, Color? dialTextColor, TextStyle? dialTextStyle, double? elevation, Color? entryModeIconColor, TextStyle? helpTextStyle, Color? hourMinuteColor, ShapeBorder? hourMinuteShape, Color? hourMinuteTextColor, TextStyle? hourMinuteTextStyle, InputDecorationTheme? inputDecorationTheme, EdgeInsetsGeometry? padding, ShapeBorder? shape, MaterialStateProperty<Color?>? timeSelectorSeparatorColor, MaterialStateProperty<TextStyle?>? timeSelectorSeparatorTextStyle})
Creates a theme that can be used for TimePickerTheme or ThemeData.timePickerTheme.
const

Properties

backgroundColor Color?
The background color of a time picker.
final
cancelButtonStyle ButtonStyle?
The style of the cancel button of a TimePickerDialog.
final
confirmButtonStyle ButtonStyle?
The style of the confirm (OK) button of a TimePickerDialog.
final
dayPeriodBorderSide BorderSide?
The color and weight of the day period's outline.
final
dayPeriodColor Color?
The background color of the AM/PM toggle.
no setter
dayPeriodShape OutlinedBorder?
The shape of the day period that the time picker uses.
final
dayPeriodTextColor Color?
The color of the day period text that represents AM/PM.
final
dayPeriodTextStyle TextStyle?
Used to configure the TextStyles for the day period control.
final
dialBackgroundColor Color?
The background color of the time picker dial when the entry mode is TimePickerEntryMode.dial or TimePickerEntryMode.dialOnly.
final
dialHandColor Color?
The color of the time picker dial's hand when the entry mode is TimePickerEntryMode.dial or TimePickerEntryMode.dialOnly.
final
dialTextColor Color?
The color of the dial text that represents specific hours and minutes.
final
dialTextStyle TextStyle?
The TextStyle for the numbers on the time selection dial.
final
elevation double?
The Material elevation for the time picker dialog.
final
entryModeIconColor Color?
The color of the entry mode IconButton.
final
hashCode int
The hash code for this object.
no setteroverride
helpTextStyle TextStyle?
Used to configure the TextStyles for the helper text in the header.
final
hourMinuteColor Color?
The background color of the hour and minute header segments.
final
hourMinuteShape ShapeBorder?
The shape of the hour and minute controls that the time picker uses.
final
hourMinuteTextColor Color?
The color of the header text that represents hours and minutes.
final
hourMinuteTextStyle TextStyle?
Used to configure the TextStyles for the hour/minute controls.
final
inputDecorationTheme InputDecorationTheme?
The input decoration theme for the TextFields in the time picker.
final
padding EdgeInsetsGeometry?
The padding around the time picker dialog when the entry mode is TimePickerEntryMode.dial or TimePickerEntryMode.dialOnly.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape ShapeBorder?
The shape of the Dialog that the time picker is presented in.
final
timeSelectorSeparatorColor MaterialStateProperty<Color?>?
The color of the time selector separator between the hour and minute controls.
final
timeSelectorSeparatorTextStyle MaterialStateProperty<TextStyle?>?
Used to configure the text style for the time selector separator between the hour and minute controls.
final

Methods

copyWith({Color? backgroundColor, ButtonStyle? cancelButtonStyle, ButtonStyle? confirmButtonStyle, ButtonStyle? dayPeriodButtonStyle, BorderSide? dayPeriodBorderSide, Color? dayPeriodColor, OutlinedBorder? dayPeriodShape, Color? dayPeriodTextColor, TextStyle? dayPeriodTextStyle, Color? dialBackgroundColor, Color? dialHandColor, Color? dialTextColor, TextStyle? dialTextStyle, double? elevation, Color? entryModeIconColor, TextStyle? helpTextStyle, Color? hourMinuteColor, ShapeBorder? hourMinuteShape, Color? hourMinuteTextColor, TextStyle? hourMinuteTextStyle, InputDecorationTheme? inputDecorationTheme, EdgeInsetsGeometry? padding, ShapeBorder? shape, MaterialStateProperty<Color?>? timeSelectorSeparatorColor, MaterialStateProperty<TextStyle?>? timeSelectorSeparatorTextStyle}) TimePickerThemeData
Creates a copy of this object with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

lerp(TimePickerThemeData? a, TimePickerThemeData? b, double t) TimePickerThemeData
Linearly interpolate between two time picker themes.