OpeningHours class

Opening hours information for a place.

Contains current open/closed status, detailed period information for each day, and human-readable weekday text descriptions.

This is similar to CurrentOpeningHours and may represent regular or special hours.

Example weekdayText:

  • "Monday: 9:00 AM – 5:00 PM"
  • "Sunday: Closed"

Constructors

OpeningHours({bool? openNow, List<Period>? periods, List<String>? weekdayText})
Creates an OpeningHours instance.
OpeningHours.fromJson(Map<String, dynamic> json)
Creates an OpeningHours from JSON data.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
openNow bool?
Whether the place is currently open
getter/setter pair
periods List<Period>?
Detailed opening/closing periods for each day
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
weekdayText List<String>?
Human-readable opening hours for each weekday
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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