WaktuSolatClient class

A client for interacting with the Waktu Solat API v2 (https://api.waktusolat.app/docs).

Provides methods to fetch prayer times, state lists, and zone lists.

Constructors

WaktuSolatClient.new({Client? httpClient})
Creates a new WaktuSolatClient.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Closes the HTTP client if it was created internally.
getPrayerTimeByDate(String zone, DateTime date) Future<PrayerTime?>
Fetches prayer times for a specific date.
getPrayerTimeByDateGps(double latitude, double longitude, DateTime date) Future<PrayerTime?>
Fetches prayer times for a specific date using GPS coordinates.
getPrayerTimesByGps(double latitude, double longitude, {int? year, int? month}) Future<SolatV2>
Fetches prayer times based on GPS coordinates, optionally for a given year and month.
getPrayerTimesByZone(String zone, {int? year, int? month}) Future<SolatV2>
Fetches prayer times for a specific zone, optionally for a given year and month.
getStates() Future<List<State>>
Fetches the list of all Malaysian states and their corresponding zones.
getZones() Future<List<ZoneInfo>>
Fetches the list of all prayer zone information.
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