DayPeriodConfig class
dayPeriod 模式下的整体配置
- Available extensions
Constructors
- DayPeriodConfig({required DayPeriodHalfDefinition firstHalf, required DayPeriodHalfDefinition secondHalf})
-
const
- DayPeriodConfig.materialDefault()
-
默认配置:使用 Material 本地化的上午/下午文案,
时间区间为
00:00, 11:59/12:00, 23:59factory
Properties
- firstHalf → DayPeriodHalfDefinition
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondHalf → DayPeriodHalfDefinition
-
final
Methods
-
labelFor(
BuildContext context, DayPeriod period) → String -
Available on DayPeriodConfig, provided by the DayPeriodConfigExt extension
获取指定半程在当前上下文中的展示文案 -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolvePeriod(
TimeOfDay timeOfDay) → DayPeriod -
Available on DayPeriodConfig, provided by the DayPeriodConfigExt extension
基于配置的时间区间解析当前timeOfDay属于上半程还是下半程 -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited