QuranAutoNightMode class

Auto night mode — switches between light and dark themes based on time.

Properties

currentTheme ValueNotifier<QuranReadingTheme>
Current theme notifier — listen to this for automatic theme changes.
final
hashCode int
The hash code for this object.
no setterinherited
isEnabled Future<bool>
Whether auto night mode is enabled.
no setter
isNightTime Future<bool>
Check if it's currently nighttime.
no setter
nightEndHour Future<int>
Night end hour (24h). Default 6 (6 AM).
no setter
nightStartHour Future<int>
Night start hour (24h). Default 18 (6 PM).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage QuranStorage
getter/setter pair

Methods

evaluate() Future<void>
Evaluate and update the current theme based on time. Call this on app resume or periodically.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDarkTheme(String themeId) Future<void>
Set the dark theme to use during nighttime.
setEnabled(bool value) Future<void>
Enable or disable auto night mode.
setLightTheme(String themeId) Future<void>
Set the light theme to use during daytime.
setNightHours(int startHour, int endHour) Future<void>
Set night time range.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance QuranAutoNightMode
final